On 2/21/2014 04:04, Guo, Gcwenken wrote: > Hi: > > > I want to build a cross compiler mingw-w64 gcc in x86_64-unknown-linux-gnu to > i686-w64-mingw32 with winphreads. From the document in the source package > mingw-w64-v3.1.0/mingw-w64-doc, I know how to build cross gcc with win32 > thread. However, I need to use c++11 thread, so I need to build cross gcc > with posix thread. Moreover I know that mingw-w64 support posix thread in > mingw-w64-v3.1.0/mingw-w64-libraries/winpthreads. Unfortunately, the above > document does not explain how to build cross compiler mingw-w64 gcc. > > Additional requirement, I need gcc, g++ gfortran and dwarf2 exception mode >
FYI dwarf2 exception is known to be broken for Windows. > As a result, I try the following procedure: > > However, when I do the last step build full gcc, I get the error as the > following: > > .libs/compatibility-atomic-c++0x.o: In function `_gthread_mutex_lock': > > /home/cguo/gcc-4.8.2/build/i686-w64-mingw32/libstdc++-v3/include/i686-w64-mingw32/bits/gthr-default.h:748: > undefined reference to `_imp__pthread_mutex_lock' > .libs/compatibility-atomic-c++0x.o: In function `_gthread_mutex_unlock': > > /home/cguo/gcc-4.8.2/build/i686-w64-mingw32/libstdc++-v3/include/i686-w64-mingw32/bits/gthr-default.h:778: > undefined reference to `_imp__pthread_mutex_unlock' > .libs/compatibility-atomic-c++0x.o: In function `_gthread_mutex_lock': > > /home/cguo/gcc-4.8.2/build/i686-w64-mingw32/libstdc++-v3/include/i686-w64-mingw32/bits/gthr-default.h:748: > undefined reference to `_imp__pthread_mutex_lock' > .libs/compatibility-atomic-c++0x.o: In function `_gthread_mutex_unlock': > > /home/cguo/gcc-4.8.2/build/i686-w64-mingw32/libstdc++-v3/include/i686-w64-mingw32/bits/gthr-default.h:778: > undefined reference to `_imp__pthread_mutex_unlock' > collect2: error: ld returned 1 exit status Rebuild winpthreads as shared.
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public