http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46760
--- Comment #4 from Dave Korn <davek at gcc dot gnu.org> 2010-12-02 07:14:34 UTC --- With my patch we no longer get the undefined symbols building lto-wrapper, but instead later on we hit this problem: ------------------------------------------------------------------------------ [ . . . ] /home/davek/gcc/obj-gold/./prev-gcc/xgcc -B/home/davek/gcc/obj-gold/./prev-gcc/ -B/n/10/davek/gcc/x86_64-unknown-linux-gnu/bin/ -B/n/10/davek/gcc/x86_64-unknown-linux-gnu/bin/ -B/n/10/davek/gcc/x86_64-unknown-linux-gnu/lib/ -isystem /n/10/davek/gcc/x86_64-unknown-linux-gnu/include -isystem /n/10/davek/gcc/x86_64-unknown-linux-gnu/sys-include -g -O2 -flto=jobserver -fuse-linker-plugin -frandom-seed=1 -fprofile-use -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -Wold-style-definition -Wc++-compat -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -o build/genchecksum \ build/genchecksum.o .././libiberty/libiberty.a lto1: sorry, unimplemented: combining units with different profiles is not supported lto1: internal compiler error: in lto_file_decl_data_get_fn_decl, at lto-streamer.h:1075 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. lto-wrapper: /home/davek/gcc/obj-gold/./prev-gcc/xgcc returned 1 exit status gold: fatal error: lto-wrapper failed collect2: ld returned 1 exit status make[3]: *** [build/genchecksum] Error 1 make[3]: *** Waiting for unfinished jobs.... rm gfdl.pod cpp.pod gfortran.pod gcov.pod fsf-funding.pod gcc.pod make[3]: Leaving directory `/home/davek/gcc/obj-gold/gcc' make[2]: *** [all-stagefeedback-gcc] Error 2 make[2]: Leaving directory `/home/davek/gcc/obj-gold' make[1]: *** [stagefeedback-bubble] Error 2 make[1]: Leaving directory `/home/davek/gcc/obj-gold' make: *** [profiledbootstrap] Error 2 ------------------------------------------------------------------------------ As far as I can see though, everything relevant was compiled with -fprofile-use in effect: ------------------------------------------------------------------------------ Configuring stage feedback in ./libiberty [ . . . ] /home/davek/gcc/obj-gold/./prev-gcc/xgcc -B/home/davek/gcc/obj-gold/./prev-gcc/ -B/n/10/davek/gcc/x86_64-unknown-linux-gnu/bin/ -B/n/10/davek/gcc/x86_64-unknown-linux-gnu/bin/ -B/n/10/davek/gcc/x86_64-unknown-linux-gnu/lib/ -isystem /n/10/davek/gcc/x86_64-unknown-linux-gnu/include -isystem /n/10/davek/gcc/x86_64-unknown-linux-gnu/sys-include -c -DHAVE_CONFIG_H -g -O2 -flto=jobserver -fuse-linker-plugin -frandom-seed=1 -fprofile-use -I. -I/n/10/davek/gcc/gcc/libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic /n/10/davek/gcc/gcc/libiberty/md5.c -o md5.o [ . . . ] /home/davek/gcc/obj-gold/./prev-gcc/xgcc -B/home/davek/gcc/obj-gold/./prev-gcc/ -B/n/10/davek/gcc/x86_64-unknown-linux-gnu/bin/ -B/n/10/davek/gcc/x86_64-unknown-linux-gnu/bin/ -B/n/10/davek/gcc/x86_64-unknown-linux-gnu/lib/ -isystem /n/10/davek/gcc/x86_64-unknown-linux-gnu/include -isystem /n/10/davek/gcc/x86_64-unknown-linux-gnu/sys-include -c -DHAVE_CONFIG_H -g -O2 -flto=jobserver -fuse-linker-plugin -frandom-seed=1 -fprofile-use -I. -I/n/10/davek/gcc/gcc/libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic /n/10/davek/gcc/gcc/libiberty/fopen_unlocked.c -o fopen_unlocked.o [ . . . ] /home/davek/gcc/obj-gold/./prev-gcc/xgcc -B/home/davek/gcc/obj-gold/./prev-gcc/ -B/n/10/davek/gcc/x86_64-unknown-linux-gnu/bin/ -B/n/10/davek/gcc/x86_64-unknown-linux-gnu/bin/ -B/n/10/davek/gcc/x86_64-unknown-linux-gnu/lib/ -isystem /n/10/davek/gcc/x86_64-unknown-linux-gnu/include -isystem /n/10/davek/gcc/x86_64-unknown-linux-gnu/sys-include -c -DHAVE_CONFIG_H -g -O2 -flto=jobserver -fuse-linker-plugin -frandom-seed=1 -fprofile-use -I. -I/n/10/davek/gcc/gcc/libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic /n/10/davek/gcc/gcc/libiberty/xstrerror.c -o xstrerror.o [ . . . ] /home/davek/gcc/obj-gold/./prev-gcc/xgcc -B/home/davek/gcc/obj-gold/./prev-gcc/ -B/n/10/davek/gcc/x86_64-unknown-linux-gnu/bin/ -B/n/10/davek/gcc/x86_64-unknown-linux-gnu/bin/ -B/n/10/davek/gcc/x86_64-unknown-linux-gnu/lib/ -isystem /n/10/davek/gcc/x86_64-unknown-linux-gnu/include -isystem /n/10/davek/gcc/x86_64-unknown-linux-gnu/sys-include -c -g -O2 -flto=jobserver -fuse-linker-plugin -frandom-seed=1 -fprofile-use -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -Wold-style-definition -Wc++-compat -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I/n/10/davek/gcc/gcc/gcc -I/n/10/davek/gcc/gcc/gcc/build -I/n/10/davek/gcc/gcc/gcc/../include -I/n/10/davek/gcc/gcc/gcc/../libcpp/include -I/opt/cfarm/gmp-4.2.4/include -I/opt/cfarm/mpfr-2.4.1/include -I/opt/cfarm/mpc-0.8/include -I/n/10/davek/gcc/gcc/gcc/../libdecnumber -I/n/10/davek/gcc/gcc/gcc/../libdecnumber/bid -I../libdecnumber \ -o build/genchecksum.o /n/10/davek/gcc/gcc/gcc/genchecksum.c [ . . . ] ------------------------------------------------------------------------------ ... but none the less input_profile_summary complains when it gets to the first libiberty input IR object file.