Matt <matt@xxxxxxx> writes: > On Mon, 14 Nov 2011, Ian Lance Taylor wrote: > >> Matt <matt@xxxxxxx> writes: >> >>> I am getting this on Ubuntu 11.10/amd64. If I remove the >>> --with-build-config=bootstrap-lto, the build succeeds just fine. Is >>> this a known problem, or should I file a bug? (A search of bugzilla >>> didn't bring up this specific symptom.) >> >>> libcpp/lex.o differs >> >> What are the differences between stage2-libcpp/lex.o and >> stage3-libcpp/lex.o? Ignore the fact that one will have debug info and >> the other will not. Look at the readelf -S output for both files, and >> see if there are any differences in sections whose names do not start >> with ".debug". > > in stage2-libcpp/lex.o: > [79] .init_array INIT_ARRAY 0000000000000000 00021280 > 0000000000000008 0000000000000000 WA 0 0 8 > [80] .rela.init_array RELA 0000000000000000 0003a8e8 > 0000000000000018 0000000000000018 101 79 8 > > > > in stage3-libcpp/lex.o: > [79] .ctors PROGBITS 0000000000000000 00021280 > 0000000000000008 0000000000000000 WA 0 0 8 > [80] .rela.ctors RELA 0000000000000000 0003a8e0 > 0000000000000018 0000000000000018 101 79 8 > > > There's a few other minor differences, but they're related to debug > stuff, as far as I can tell. > > >> Also, what linker are you using? > > ld --version outputs: > GNU ld (GNU Binutils for Ubuntu) 2.21.53.20110810 > > AFAIK, I'm using the default linker for Ubuntu 11.10/amd64. Thanks. It appears that for some reason your stage2 build is using --enable-initfini-array while your stage3 build is using --disable-initfini-array. The default value for this configure option is set by the configure script. grep for gcc_cv_initfini_array in stage1-gcc/config.log and stage2-gcc/config.log. I am guessing that they will have different values. Look in stage1-gcc/config.log and stage2-gcc/config.log. Look for "checking for .preinit_array/.init_array/.fini_array support". It should be followed by a compile and run of conftest. I'm guessing that one of those runs succeeded and one failed. See if config.log says why. Ian