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

Ruben,

What do expect as problems if your releases built gcc using the default win32 
threading model and g++ built with posix threading for c++11 std::thread 
support?

If no technical concerns, would updates to your repo look similar to:

  * copy gcc-c.sh to gcc-only.sh
  * tweak gcc-only.sh for 
https://github.com/rubenvb/MinGW-w64-build-scripts/blob/master/toolchain/scripts/gcc-c.sh#L9-20
 to build only gcc if that's even possible
  * update buildcrossfromnative.sh and buildfromcross.sh to add ". 
$SCRIPTS/gcc-only.sh || exit 1" after lines like 
https://github.com/rubenvb/MinGW-w64-build-scripts/blob/master/toolchain/scripts/buildfromcross.sh#L51
 Probably need some intermediate clean as well.
  * update top-level build*.sh

I'm hoping to get time in May to start looking more seriously at your repo as 
I'd like to find an elegant way to get rid of the libwinpthread-1.dll dep for C 
stuff so as to not maintain tweaked Makefiles for projects.

If this is overcomplicating things, what would you suggest?

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

Reply via email to