On my Debian 3.0 PowerPC system (with a private build of binutils 2.14), GCC fails to bootstrap as follows: `/home/kraai/dev/gcc/build/powerpc-unknown-linux-gnu/nof/libstdc++-v3/scripts/testsuite_flags --build-cxx` -DHAVE_CONFIG_H -I. -I../../../../../gcc/libstdc++-v3/testsuite -I.. -nostdinc++ -I/home/kraai/dev/gcc/build/powerpc-unknown-linux-gnu/nof/libstdc++-v3/include/powerpc-unknown-linux-gnu -I/home/kraai/dev/gcc/build/powerpc-unknown-linux-gnu/nof/libstdc++-v3/include -I../../../../../gcc/libstdc++-v3/libsupc++ -O2 -g -O2 -g -O2 -D_GNU_SOURCE -msoft-float -fPIC -mstrict-align -c ../../../../../gcc/libstdc++-v3/testsuite/abi_check.cc ../../../../../gcc/libstdc++-v3/testsuite/abi_check.cc: In function `int main(int, char**)': ../../../../../gcc/libstdc++-v3/testsuite/abi_check.cc:456: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions.
As with any other bug can you provide the preprocessed file?
The problem is not reproducible with a preprocessed file. Should I still submit it? (Am I supposed to change the bug status back to NEW?)
Okay then this is a big bug as it is a memory corruption bug.
Please provide: - a log of the command line that causes segmentation fault, but with "-v" added to it. - a log of how you generated the preprocessed source - a log of the command line compiling the preprocessed source (and with -v) that shows that the bug is not reproducible this way.
I cannot reproduce the error. After I ran "cvs update -C", I now see a new and different error: /home/kraai/dev/gcc/build/gcc/xgcc -shared-libgcc -B/home/kraai/dev/gcc/build/gcc/ -nostdinc++ -L/home/kraai/dev/gcc/build/powerpc-unknown-linux-gnu/nof/libstdc++-v3/src -L/home/kraai/dev/gcc/build/powerpc-unknown-linux-gnu/nof/libstdc++-v3/src/.libs -B/home/kraai/dev/gcc/install/powerpc-unknown-linux-gnu/bin/ -B/home/kraai/dev/gcc/install/powerpc-unknown-linux-gnu/lib/ -isystem /home/kraai/dev/gcc/install/powerpc-unknown-linux-gnu/include -isystem /home/kraai/dev/gcc/install/powerpc-unknown-linux-gnu/sys-include -msoft-float -fPIC -mstrict-align -shared -nostdlib /usr/lib/crti.o /home/kraai/dev/gcc/build/gcc/nof/crtbeginS.o .libs/allocator-inst.o .libs/codecvt.o .libs/complex_io.o .libs/concept-inst.o .libs/ctype.o .libs/demangle.o .libs/ext-inst.o .libs/fstream-inst.o .libs/functexcept.o .libs/globals.o .libs/io-inst.o .libs/ios.o .libs/istream-inst.o .libs/limits.o .libs/locale.o .libs/locale-inst.o .libs/localename.o .libs/misc-inst.o .libs/ostream-inst.o .libs/sstream-inst.o .libs/stdexcept.o .libs/streambuf-inst.o .libs/string-inst.o .libs/strstream.o .libs/valarray-inst.o .libs/wstring-inst.o .libs/codecvt_members.o .libs/collate_members.o .libs/ctype_members.o .libs/messages_members.o .libs/monetary_members.o .libs/numeric_members.o .libs/time_members.o .libs/basic_file.o .libs/c++locale.o -Wl,--whole-archive ../libmath/.libs/libmath.a ../libsupc++/.libs/libsupc++convenience.a -Wl,--no-whole-archive -L/home/kraai/dev/gcc/build/powerpc-unknown-linux-gnu/nof/libstdc++-v3/src -L/home/kraai/dev/gcc/build/powerpc-unknown-linux-gnu/nof/libstdc++-v3/src/.libs -lm ../libmath/.libs/libmath.a -lm ../libsupc++/.libs/libsupc++convenience.a -lm -L/home/kraai/dev/gcc/build/gcc/nof -L/home/kraai/dev/gcc/build/gcc -L/home/kraai/dev/gcc/install/powerpc-unknown-linux-gnu/bin -L/home/kraai/dev/gcc/install/powerpc-unknown-linux-gnu/lib -L/home/kraai/dev/gcc/install/lib/../powerpc-unknown-linux-gnu/lib -L/home/kraai/dev/gcc/install/lib -lgcc_s_nof -lc -lgcc_s_nof -lm -lgcc_s_nof -lc -lgcc_s_nof /home/kraai/dev/gcc/build/gcc/nof/crtsavres.o /home/kraai/dev/gcc/build/gcc/nof/crtendS.o /usr/lib/crtn.o -Wl,-O1 -Wl,--version-script=libstdc++-symbol.ver -Wl,-soname -Wl,libstdc++.so.6 -o .libs/libstdc++.so.6.0.0 .libs/strstream.o: could not read symbols: Bad value collect2: ld returned 1 exit status make[7]: *** [libstdc++.la] Error 1 make[7]: Leaving directory `/home/kraai/dev/gcc/build/powerpc-unknown-linux-gnu/nof/libstdc++-v3/src' This problem is reproducible using a preprocessed source file, so I'll attach both it and a log of the relevant commands and their output.
Created attachment 4274 [details] log of relevant commands and their output
Created attachment 4275 [details] preprocessed source
ld produces an error because it is asked to generate a procedure linkage table entry for a local symbol (see binutils-2.14.90.0.4.1/bfd/elf32-ppc.c:3384). Here is an example of the assembly that produces a problem: .LLSDACSE1673: .section .text._ZNSt10istrstreamD1Ev .set .LTHUNK0,_ZNSt10istrstreamD1Ev .section .gnu.linkonce.t._ZTv0_n12_NSt10istrstreamD1Ev,"awx",@progbits .align 2 .weak _ZTv0_n12_NSt10istrstreamD1Ev .type _ZTv0_n12_NSt10istrstreamD1Ev, @function _ZTv0_n12_NSt10istrstreamD1Ev: .LFB1674: .file 9 "/home/kraai/dev/gcc/build/powerpc-unknown-linux-gnu/nof/libstdc++-v3/include/backward/strstream" .loc 9 120 0 lwz 12,0(3) addi 12,12,-12 lwz 12,0(12) add 3,3,12 b .LTHUNK0@plt If I change b .LTHUNK0@plt to b _ZNSt10istrstreamD1Ev@plt (and likewise for the other such .LTHUNK labels), it assembles and links successfully.
I think this related to bug 11331 which is for hppa but looks like the same bug.
From Olaf Hering <http://gcc.gnu.org/ml/gcc/2003-06/msg02204.html>: The bug was introduced here: cvs diff -pu -D 20030623 -D 20030624 I see no rs6000 specific names there.
http://gcc.gnu.org/ml/gcc-patches/2003-06/msg03025.html
The patch in comment #11 fixes the problem I encountered in comment #5, but not the original problem I reported. I am attaching a log of the commands requested in comment #4. Should I file a new report for the original bug?
Created attachment 4296 [details] log of commands for original problem
http://gcc.gnu.org/ml/gcc-patches/2003-06/msg03004.html fixes my original problem, and has been committed.
Assigning to jakub@gcc.gnu.org who thought he assigned to himself but bugzilla was bit old back then.
Jakub checked in the patch referenced in comment #11, fixing the bootstrap.