I'm seeing this very failure: http://gcc.gnu.org/ml/libstdc++/2003-11/msg00172.html on i686-pc-linux-gnu as well. Basically bootstrap fails like this: /home/rasky/gcc/mainline/out/gcc/g++ -shared-libgcc - B/home/rasky/gcc/mainline/out/gcc/ -nostdinc++ - B/home/rasky/gcc/mainline/install//i686-pc-linux-gnu/bin/ - B/home/rasky/gcc/mainline/install//i686-pc-linux-gnu/lib/ - isystem /home/rasky/gcc/mainline/install//i686-pc-linux-gnu/include - isystem /home/rasky/gcc/mainline/install//i686-pc-linux-gnu/sys-include - include bits/stdc++.h -O3 -fomit-frame-pointer -march=athlon-tbird -DNDEBUG - DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -pipe -fno-enforce-eh-specs -D_GNU_SOURCE - o abi_check abi_check.o -L/home/rasky/gcc/mainline/out/i686-pc-linux- gnu/libstdc++-v3/src -L/home/rasky/gcc/mainline/out/i686-pc-linux-gnu/libstdc++- v3/src/.libs -lm /home/rasky/gcc/mainline/out/i686-pc-linux-gnu/libstdc++- v3/src/.libs/libstdc++.so: undefined reference to `pthread_create' /home/rasky/gcc/mainline/out/i686-pc-linux-gnu/libstdc++- v3/src/.libs/libstdc++.so: undefined reference to `pthread_getspecific' /home/rasky/gcc/mainline/out/i686-pc-linux-gnu/libstdc++- v3/src/.libs/libstdc++.so: undefined reference to `pthread_once' /home/rasky/gcc/mainline/out/i686-pc-linux-gnu/libstdc++- v3/src/.libs/libstdc++.so: undefined reference to `pthread_key_create' /home/rasky/gcc/mainline/out/i686-pc-linux-gnu/libstdc++- v3/src/.libs/libstdc++.so: undefined reference to `pthread_setspecific' Adding "-lpthread" manually to the command line makes the compilation succeed (but then, the whole testsuite is broken). I wonder if the configuration is losing a -lpthread on the way. rasky@trinity:~/gcc/mainline/out$ gcc/g++ -v Reading specs from /home/rasky/gcc/mainline/install//lib/gcc/i686-pc-linux- gnu/3.4/specs Configured with: ../gcc/configure --prefix=/home/rasky/gcc/mainline/install/ -- enable-languages=c,c++,java --enable-shared --enable-threads=posix --with- system-zlib --enable-__cxa_atexit --disable-multilib --with-gcc-version- trigger=/home/rasky/gcc/mainline/gcc/gcc/version.c --no-create --no-recursion Thread model: posix gcc version 3.4 20031206 (experimental) rasky@trinity:~/gcc/mainline/out$ ld -v GNU ld version 2.14.90.0.6 20030820
*** Bug 13331 has been marked as a duplicate of this bug. ***
Tomorrow can you try without setting CXXFLAGS? The CXXFLAGS (-O3 -fomit-frame-pointer -march=athlon-tbird -DNDEBUG -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -pipe -fno-enforce-eh-specs -D_GNU_SOURCE), you use might be causing this (I think it is either -fno-enforce-eh-specs, -O3 (if it is -O3 then that is a bug), or -D_GNU_SOURCE. Minor as you are using non-standard CXXFLAGS while bootstrapping.
It's the same: /home/rasky/gcc/mainline/out/gcc/g++ -shared-libgcc - B/home/rasky/gcc/mainline/out/gcc/ -nostdinc++ - B/home/rasky/gcc/mainline/install//i686-pc-linux-gnu/bin/ - B/home/rasky/gcc/mainline/install//i686-pc-linux-gnu/lib/ - isystem /home/rasky/gcc/mainline/install//i686-pc-linux-gnu/include - isystem /home/rasky/gcc/mainline/install//i686-pc-linux-gnu/sys-include - include bits/stdc++.h -D_GNU_SOURCE -o abi_check abi_check.o - L/home/rasky/gcc/mainline/out/i686-pc-linux-gnu/libstdc++-v3/src - L/home/rasky/gcc/mainline/out/i686-pc-linux-gnu/libstdc++-v3/src/.libs -lm /home/rasky/gcc/mainline/out/i686-pc-linux-gnu/libstdc++- v3/src/.libs/libstdc++.so: undefined reference to `pthread_create' /home/rasky/gcc/mainline/out/i686-pc-linux-gnu/libstdc++- v3/src/.libs/libstdc++.so: undefined reference to `pthread_getspecific' /home/rasky/gcc/mainline/out/i686-pc-linux-gnu/libstdc++- v3/src/.libs/libstdc++.so: undefined reference to `pthread_once' /home/rasky/gcc/mainline/out/i686-pc-linux-gnu/libstdc++- v3/src/.libs/libstdc++.so: undefined reference to `pthread_key_create' /home/rasky/gcc/mainline/out/i686-pc-linux-gnu/libstdc++- v3/src/.libs/libstdc++.so: undefined reference to `pthread_setspecific' collect2: ld returned 1 exit status _GNU_SOURCE was not in my CXXFLAGS anyway. Anyway, this bootstrap was done with no CFLAGS nor CXXFLAGS.
This is a dup of bug 13334 (the problem is that the CXXFLAGS and CFLAGS were set as environment variable). *** This bug has been marked as a duplicate of 13334 ***
Maybe not :(.
Another report of this: <http://gcc.gnu.org/ml/gcc-testresults/2003-12/msg00294.html>.
Again another report: http://gcc.gnu.org/ml/gcc/2003-12/msg00500.html
Patch which caused this was reverted, Giovanni becareful next time.