Hi Jon,

2012/3/15 Jon <[email protected]>:
> 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.

> 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.

Of course mingw.org's version doesn't need posix-threading library
here, as it uses default win32-threading model.

Regards,
Kai

------------------------------------------------------------------------------
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

Reply via email to