> > Using i686-w64-mingw32-gcc-4.7.0-3_rubenvb.7z to build from the > > http://luajit.org/luajit.html repo I get a lua51.dll with a dependency on > > libwinpthread-1.dll. Specifically, the lua51.dll imports the > > pthread_key_create and pthread_getspecific symbols. > > > > I don't get the libwinpthread dependency when using a mingw.org 4.6.2 based > > toolchain. I'd like to understand why this is and if/how to remove the > > dependency. This dependency is not created when building a helloworld.c exe > > or simple dll. > > The reason why you see here the dependencies to libwinpthread-1.dll is > that the toolchain provided by Ruben is using posix-threading instead > of win32-threading mechanism. > You can avoid the dependency to libwinpthread-1.dll by specifying on > link-time for lua51.dll the option '-static'. By it you force > compiler (and libtool) to use static instead of DLL libraries. By > default gcc uses DLLs over static-libraries.
I'll see if I can do some -Wl,-static XXX -Wl,-dy tricks that have worked for me in the past. > > objdump -x lua51.dll > > ... > > There is an import table in .idata at 0x66de1000 > > ... > > DLL Name: libwinpthread-1.dll > > vma: Hint/Ord Member-Name Bound-To > > 619bc 62 pthread_getspecific > > 619d4 64 pthread_key_create > > 619ec 84 pthread_once > > 619fc 105 pthread_setspecific > > Well, lua51.dll seems to use posix-threading calls. Maybe indirectly > via libgcc. I couldn't find any specific calls when greping the luajit source, but I'll look again. I bet it's indirect as you mention and due to Ruben using posix-threading. Thank you for the explanations :) Jon ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
