Re: static linking of pthread crashes with segfault

2010-05-03 Thread Jonathan Wakely
On 3 May 2010 10:37, Klaus Rudolph wrote: > > g++ -static -O2 main.cpp /usr/lib/libpthread.a -o linux You could try -static -pthread instead of specifying the static lib Please take any follow up questions to the gcc-help list, your question is not appropriate for this list. Thanks, Jonathan

static linking of pthread crashes with segfault

2010-05-03 Thread Klaus Rudolph
Hi all, I tried to link a pthread application with -static and run into a segfault on x86, same on powerpc. I tried gcc 4.4.2 (linux/x86) and 4.0.2 for powerpc-unknown-linux-gnu For the x86 linux example I got in gdb: (gdb) bt #0 0x in ?? () #1 0x08094d49 in __cxa_guard_release () #