https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62077
Bug ID: 62077 Summary: --with-build-config=bootstrap-lto fails, Product: gcc Version: lto Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: sven.c.dack at virginmedia dot com Hello, I am having a problem bootstrapping GCC with LTO enabled. This used to work fine for 4.7, but has been failing for me with 4.8 and 4.9. It reports comparision errors between stage 2 and stage 3. I have not had a single success getting this to work past 4.7, but also have not found any clues in the bug database or simply googling for similar reports of this kind. The standard bootstrap and the profiled bootstrap are working correctly. I have disected some of the reported files including cc1 to see where exactly the differences occur. I do not believe there is a serious bug here, but that it has got to do with how LTO packs its data into the object files from one stage to the next, which is causing the comparison of stage 2 and 3 to fail. The resulting cc1's between stage2 and stage3 show no difference when disassembled. Sven ... $ configure --prefix="/home/sven/gnu" --with-gmp="/home/sven/gnu" --with-mpfr="/home/sven/gnu" --with-mpc="/home/sven/gnu" --with-arch=native --enable-multiarch --enable-lto --enable-stage1-languages=c,lto --enable-stage1-checking --enable-languages=c,c++,lto --with-build-config=bootstrap-lto ... $ make -j8 bootstrap ... Comparing stages 2 and 3 warning: gcc/cc1-checksum.o differs warning: gcc/cc1plus-checksum.o differs Bootstrap comparison failure! gcc/dwarf2out.o differs gcc/tree-ssa-loop-ivcanon.o differs gcc/sel-sched-ir.o differs gcc/regcprop.o differs gcc/emit-rtl.o differs gcc/cfgloopmanip.o differs gcc/tree-diagnostic.o differs gcc/cfgloop.o differs gcc/tree-inline.o differs gcc/function.o differs gcc/tree-ssa-uninit.o differs gcc/dwarf2cfi.o differs gcc/c/c-parser.o differs gcc/c/c-typeck.o differs gcc/tree-vrp.o differs gcc/tree.o differs gcc/c-family/c-pragma.o differs gcc/c-family/c-ada-spec.o differs gcc/cfgexpand.o differs gcc/tree-ssa-pre.o differs gcc/ipa-devirt.o differs gcc/cgraphunit.o differs gcc/tree-eh.o differs gcc/omp-low.o differs gcc/ipa-inline-analysis.o differs gcc/tree-outof-ssa.o differs gcc/lto-cgraph.o differs gcc/lto-streamer-out.o differs gcc/cp/cp-gimplify.o differs gcc/cp/pt.o differs gcc/cp/name-lookup.o differs gcc/cp/class.o differs gcc/cp/semantics.o differs gcc/cp/parser.o differs gcc/cfgrtl.o differs gcc/tree-cfg.o differs gcc/gimple.o differs gcc/dbxout.o differs gcc/except.o differs gcc/reload1.o differs gcc/coverage.o differs gcc/tree-sra.o differs gcc/i386.o differs gcc/sel-sched.o differs gcc/tree-switch-conversion.o differs gcc/tree-ssa-operands.o differs gcc/varasm.o differs gcc/gimple-low.o differs gcc/tree-ssa-propagate.o differs gcc/build/genconfig.o differs gcc/build/genpeep.o differs libcpp/directives.o differs libcpp/lex.o differs libcpp/macro.o differs Makefile:19836: recipe for target 'compare' failed $ # # No significant difference in config.log between stage 2 and 3 # other than the names of temporary files: # $ diff stage[23]-gcc/config.log 2314c2314 < /tmp/cc1wn6ag.ltrans0.ltrans.o: In function `main': --- > /tmp/ccVbm6x9.ltrans0.ltrans.o: In function `main': 2752c2752 < /tmp/ccdtyquJ.ltrans0.ltrans.o: In function `main': --- > /tmp/cc66S1GF.ltrans0.ltrans.o: In function `main': 2929c2929 < /tmp/ccgTPlF5.ltrans0.ltrans.o: In function `main': --- > /tmp/ccshOvII.ltrans0.ltrans.o: In function `main': 3141c3141 < /tmp/cc0Osz71.ltrans0.ltrans.o: In function `main': --- > /tmp/cc5a2nc2.ltrans0.ltrans.o: In function `main': 3328c3328 < /tmp/ccCMoCjR.ltrans0.ltrans.o: In function `main': --- > /tmp/ccDwogIJ.ltrans0.ltrans.o: In function `main': 4133c4133 < /tmp/ccJSSHN0.ltrans0.ltrans.o: In function `main': --- > /tmp/ccNPnSni.ltrans0.ltrans.o: In function `main': 6037c6037 < /tmp/ccQprl5u.ltrans0.ltrans.o: In function `main': --- > /tmp/ccCyPfzP.ltrans0.ltrans.o: In function `main': # # Disection of cc1-checksum.o: # $ du -b stage[23]-gcc/cc1-checksum.o 31824 stage2-gcc/cc1-checksum.o 31824 stage3-gcc/cc1-checksum.o $ (cd stage2-gcc;objdump -x cc1-checksum.o) >s2od $ (cd stage3-gcc;objdump -x cc1-checksum.o) >s3od $ diff s[23]od 26c26 < 8 .gnu.lto_.decls.0 000002eb 0000000000000000 0000000000000000 00000093 2**0 --- > 8 .gnu.lto_.decls.0 000002e8 0000000000000000 0000000000000000 00000093 > 2**0 28c28 < 9 .gnu.lto_.symtab.0 00000023 0000000000000000 0000000000000000 0000037e 2**0 --- > 9 .gnu.lto_.symtab.0 00000023 0000000000000000 0000000000000000 0000037b > 2**0 30c30 < 10 .gnu.lto_.opts 000002a4 0000000000000000 0000000000000000 000003a1 2**0 --- > 10 .gnu.lto_.opts 000002a4 0000000000000000 0000000000000000 0000039e > 2**0 # # Large difference in section .gnu.lto_.decls.0 of cc1-checksum.o: # $ objcopy stage2-gcc/cc1-checksum.o --dump-section .gnu.lto_.decls.0=s2_lto_decls0 $ objcopy stage3-gcc/cc1-checksum.o --dump-section .gnu.lto_.decls.0=s3_lto_decls0 $ cmp s[23]_lto_decls0 s2_lto_decls0 s3_lto_decls0 differ: byte 5, line 1 $ od -x s2_lto_decls0 | head -5 0000000 9c78 937d 485d 5193 c718 67df ceaf f87d 0000020 0651 c312 958b 8524 745a dd91 0444 645d 0000040 5d37 75d5 1ae8 d929 d22e 9745 0367 6269 0000060 94ea d334 99b0 ab9a 9afc cda9 35f9 cd35 0000100 56cf 5b53 9069 a228 d094 9686 191f 39eb $ od -x s3_lto_decls0 | head -5 0000000 9c78 937d 4c4b 5153 8610 f4ef 2942 296d 0000020 898a 0d31 268b 0424 6803 c85c 18ca 1713 0000040 72ba 6b25 b503 1411 0059 5c4d 9a1e 1490 0000060 2c51 1e44 4af2 452b 3c88 a3cb f2d6 3cb0 0000100 40ac 55e5 1a0a 8a31 8210 0c01 a025 2128 # # Small difference in section .gnu.lto_.symtab.0 of cc1-checksum.o: # $ objcopy stage2-gcc/cc1-checksum.o --dump-section .gnu.lto_.symtab.0=s2_lto_symtab0 $ objcopy stage3-gcc/cc1-checksum.o --dump-section .gnu.lto_.symtab.0=s3_lto_symtab0 $ cmp s[23]_lto_symtab0 s2_lto_symtab0 s3_lto_symtab0 differ: byte 32, line 1 $ od -x s2_lto_symtab0 0000000 7865 6365 7475 6261 656c 635f 6568 6b63 0000020 7573 006d 0000 0000 0000 0000 0000 d700 0000040 0000 0000 ^^ 0000043 $ od -x s3_lto_symtab0 0000000 7865 6365 7475 6261 656c 635f 6568 6b63 0000020 7573 006d 0000 0000 0000 0000 0000 d600 0000040 0000 0000 ^^ 0000043 # # No (or invisible) difference in section .gnu.lto_.opts of cc1-checksum.o: # $ objcopy stage2-gcc/cc1-checksum.o --dump-section .gnu.lto_.opts=s2_lto_opts $ objcopy stage3-gcc/cc1-checksum.o --dump-section .gnu.lto_.opts=s3_lto_opts $ du -b s[23]_lto_opts 676 s2_lto_opts 676 s3_lto_opts $ cmp s[23]_lto_opts $ cat s2_lto_opts '-fno-trapv' '-march=amdfam10' '-mmmx' '-m3dnow' '-msse' '-msse2' '-msse3' '-mno-ssse3' '-msse4a' '-mcx16' '-msahf' '-mno-movbe' '-mno-aes' '-mno-sha' '-mno-pclmul' '-mpopcnt' '-mabm' '-mno-lwp' '-mno-fma' '-mno-fma4' '-mno-xop' '-mno-bmi' '-mno-bmi2' '-mno-tbm' '-mno-avx' '-mno-avx2' '-mno-sse4.2' '-mno-sse4.1' '-mlzcnt' '-mno-rtm' '-mno-hle' '-mno-rdrnd' '-mno-f16c' '-mno-fsgsbase' '-mno-rdseed' '-mprfchw' '-mno-adx' '-mfxsr' '-mno-xsave' '-mno-xsaveopt' '-mno-avx512f' '-mno-avx512er' '-mno-avx512cd' '-mno-avx512pf' '-mno-prefetchwt1' '-mtune=generic' '-g' '-O2' '-flto=jobserver' '-frandom-seed=1' '-ffat-lto-objects' '-fno-exceptions' '-fasynchronous-unwind-tables' $ cat s3_lto_opts '-fno-trapv' '-march=amdfam10' '-mmmx' '-m3dnow' '-msse' '-msse2' '-msse3' '-mno-ssse3' '-msse4a' '-mcx16' '-msahf' '-mno-movbe' '-mno-aes' '-mno-sha' '-mno-pclmul' '-mpopcnt' '-mabm' '-mno-lwp' '-mno-fma' '-mno-fma4' '-mno-xop' '-mno-bmi' '-mno-bmi2' '-mno-tbm' '-mno-avx' '-mno-avx2' '-mno-sse4.2' '-mno-sse4.1' '-mlzcnt' '-mno-rtm' '-mno-hle' '-mno-rdrnd' '-mno-f16c' '-mno-fsgsbase' '-mno-rdseed' '-mprfchw' '-mno-adx' '-mfxsr' '-mno-xsave' '-mno-xsaveopt' '-mno-avx512f' '-mno-avx512er' '-mno-avx512cd' '-mno-avx512pf' '-mno-prefetchwt1' '-mtune=generic' '-g' '-O2' '-flto=jobserver' '-frandom-seed=1' '-ffat-lto-objects' '-fno-exceptions' '-fasynchronous-unwind-tables' # # Large difference in section .rodata of cc1-checksum.o: # $ objcopy stage2-gcc/cc1-checksum.o --dump-section .rodata=s2_rodata $ objcopy stage3-gcc/cc1-checksum.o --dump-section .rodata=s3_rodata $ cmp s[23]_rodata s2_rodata s3_rodata differ: byte 1, line 1 $ od -x s2_rodata 0000000 4849 6e81 e223 c9fc 8b37 210f 769a c061 0000020 $ od -x s3_rodata 0000000 68e3 9eb6 ae6a a572 9e55 94fa c6d4 b5a0 0000020 # # Stage 2 & 3 compiler invocation of cc1-checksum.o have been identical. # Stage 2: # /var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/./prev-gcc/xg++ -B/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/./prev-gcc/ -B/home/sven/gnu/x86_64-unknown-linux-gnu/bin/ -nostdinc++ -B/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -I/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu -I/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/libstdc++-v3/libsupc++ -L/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -c -DIN_GCC_FRONTEND -g -O2 -flto=jobserver -frandom-seed=1 -ffat-lto-objects -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/. -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/../include -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/../libcpp/include -I/home/sven/gnu/include -I/home/sven/gnu/include -I/home/sven/gnu/include -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/../libdecnumber -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/../libdecnumber/bid -I../libdecnumber -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/../libbacktrace -I/home/sven/gnu/include -o cc1-checksum.o -MT cc1-checksum.o -MMD -MP -MF ./.deps/cc1-checksum.TPo cc1-checksum.c # # Stage 3: # /var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/./prev-gcc/xg++ -B/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/./prev-gcc/ -B/home/sven/gnu/x86_64-unknown-linux-gnu/bin/ -nostdinc++ -B/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -I/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu -I/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/libstdc++-v3/libsupc++ -L/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -c -DIN_GCC_FRONTEND -g -O2 -flto=jobserver -frandom-seed=1 -ffat-lto-objects -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/. -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/../include -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/../libcpp/include -I/home/sven/gnu/include -I/home/sven/gnu/include -I/home/sven/gnu/include -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/../libdecnumber -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/../libdecnumber/bid -I../libdecnumber -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/../libbacktrace -I/home/sven/gnu/include -o cc1-checksum.o -MT cc1-checksum.o -MMD -MP -MF ./.deps/cc1-checksum.TPo cc1-checksum.c # # Disection of i386.o: # $ mkdir S2 S3 $ for s in $(objdump -h stage2-gcc/i386.o|sed -n '/^[ 0-9]*[0-9] .*/{s/^[ 0-9]*[0-9] \([^ ]*\) .*$/\1/;p}'|sort -u); do objcopy stage2-gcc/i386.o --dump-section "$s"="S2/oc$s"; done objcopy:stage2-gcc/i386.o[.bss]: can't dump section - it has no contents: File in wrong format objcopy:stage2-gcc/i386.o[.note.GNU-stack]: can't dump section - it is empty: File in wrong format objcopy:stage2-gcc/i386.o[.text.unlikely._ZN12rtl_opt_passD0Ev]: can't dump section - it is empty: File in wrong format objcopy:stage2-gcc/i386.o[.text.unlikely._ZN12rtl_opt_passD2Ev]: can't dump section - it is empty: File in wrong format $ for s in $(objdump -h stage3-gcc/i386.o|sed -n '/^[ 0-9]*[0-9] .*/{s/^[ 0-9]*[0-9] \([^ ]*\) .*$/\1/;p}'|sort -u); do objcopy stage3-gcc/i386.o --dump-section "$s"="S3/oc$s"; done objcopy:stage3-gcc/i386.o[.bss]: can't dump section - it has no contents: File in wrong format objcopy:stage3-gcc/i386.o[.note.GNU-stack]: can't dump section - it is empty: File in wrong format objcopy:stage3-gcc/i386.o[.text.unlikely._ZN12rtl_opt_passD0Ev]: can't dump section - it is empty: File in wrong format objcopy:stage3-gcc/i386.o[.text.unlikely._ZN12rtl_opt_passD2Ev]: can't dump section - it is empty: File in wrong format $ diff S2 S3 Binary files S2/oc.gnu.lto_.decls.0 and S3/oc.gnu.lto_.decls.0 differ Binary files S2/oc.gnu.lto_.symtab.0 and S3/oc.gnu.lto_.symtab.0 differ $ du -b S[23]/oc.gnu.lto_.decls.0 839593 S2/oc.gnu.lto_.decls.0 839660 S3/oc.gnu.lto_.decls.0 $ du -b S[23]/oc.gnu.lto_.symtab.0 61815 S2/oc.gnu.lto_.symtab.0 61815 S3/oc.gnu.lto_.symtab.0 # # Large difference in section .gnu.lto_.decls.0 of i386.o: # $ od -x S2/oc.gnu.lto_.decls.0|head -5 0000000 9c78 bde4 b809 558e fffb db7d 291b 84a4 0000020 1106 aa65 0d14 941a 8506 ce6d 40d0 24a4 0000040 94b3 9527 4734 2683 4a92 f69e 77be 541a 0000060 ec22 0d2d cd0a 3e34 8f29 3e32 939a 2a26 0000100 db7b 3f7a 6b5f 5d9d beeb b5f6 f9e5 fefd $ od -x S3/oc.gnu.lto_.decls.0|head -5 0000000 9c78 bde4 b809 558e fffb b37d 8525 4328 0000020 1483 3632 1a51 1295 a361 d0c8 5d80 424a 0000040 1ec6 9a8d 9a07 2a53 7a95 7dec 94ef 9126 0000060 96cd 4506 d273 3cac e532 3cd1 a250 37b2 0000100 f79e ddf3 9d6b eb5d eebe cb6b fbf3 fffd # # Large difference in section .gnu.lto_.symtab.0 of i386, # showing a repetitive pattern: # # A constant difference of '-2' between 113 individual bytes. # $ od -v -w1 -t u1 S2/oc.gnu.lto_.symtab.0 >s2od $ od -v -w1 -t u1 S3/oc.gnu.lto_.symtab.0 >s3od $ sdiff -w 27 -s s[23]od|head -5 0000435 116 | 0000435 114 0000477 123 | 0000477 121 0000626 184 | 0000626 182 0000663 8 | 0000663 6 0000714 199 | 0000714 197 $ sdiff -w 27 -s s[23]od|wc -l 113 $ sdiff -w 27 -s s[23]od|gawk '{print $5-$2}'|sort -u -2 # # Stage 2 & 3 compiler invocation of i386.o have been identical. # Stage 2: # /var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/./prev-gcc/xg++ -B/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/./prev-gcc/ -B/home/sven/gnu/x86_64-unknown-linux-gnu/bin/ -nostdinc++ -B/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -I/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu -I/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/libstdc++-v3/libsupc++ -L/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -c -g -O2 -flto=jobserver -frandom-seed=1 -ffat-lto-objects -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/. -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/../include -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/../libcpp/include -I/home/sven/gnu/include -I/home/sven/gnu/include -I/home/sven/gnu/include -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/../libdecnumber -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/../libdecnumber/bid -I../libdecnumber -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/../libbacktrace -I/home/sven/gnu/include -o i386.o -MT i386.o -MMD -MP -MF ./.deps/i386.TPo /var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/config/i386/i386.c # # Stage 3: # /var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/./prev-gcc/xg++ -B/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/./prev-gcc/ -B/home/sven/gnu/x86_64-unknown-linux-gnu/bin/ -nostdinc++ -B/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -B/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -I/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu -I/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/libstdc++-v3/libsupc++ -L/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/var/tmp/build-pkg-19462/obj/gcc-4.9-20140806/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -c -g -O2 -flto=jobserver -frandom-seed=1 -ffat-lto-objects -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/. -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/../include -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/../libcpp/include -I/home/sven/gnu/include -I/home/sven/gnu/include -I/home/sven/gnu/include -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/../libdecnumber -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/../libdecnumber/bid -I../libdecnumber -I/var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/../libbacktrace -I/home/sven/gnu/include -o i386.o -MT i386.o -MMD -MP -MF ./.deps/i386.TPo /var/tmp/build-pkg-19462/src/gcc-4.9-20140806/gcc/config/i386/i386.c # # Disection of cc1: # $ for s in $(objdump -h stage2-gcc/cc1|sed -n '/^[ 0-9]*[0-9] .*/{s/^[ 0-9]*[0-9] \([^ ]*\) .*$/\1/;p}'|sort -u); do objcopy stage2-gcc/cc1 --dump-section "$s"="S2/oc$s"; done objcopy:stage2-gcc/cc1[.bss]: can't dump section - it has no contents: File in wrong format objcopy:stage2-gcc/cc1[.tbss]: can't dump section - it has no contents: File in wrong format $ for s in $(objdump -h stage3-gcc/cc1|sed -n '/^[ 0-9]*[0-9] .*/{s/^[ 0-9]*[0-9] \([^ ]*\) .*$/\1/;p}'|sort -u); do objcopy stage3-gcc/cc1 --dump-section "$s"="S3/oc$s"; done objcopy:stage3-gcc/cc1[.bss]: can't dump section - it has no contents: File in wrong format objcopy:stage3-gcc/cc1[.tbss]: can't dump section - it has no contents: File in wrong format $ diff S2 S3 Binary files S2/oc.debug_info and S3/oc.debug_info differ Binary files S2/oc.debug_str and S3/oc.debug_str differ Binary files S2/oc.rodata and S3/oc.rodata differ # # Small (~3%) difference in section .debug_info of cc1: # $ du -b S[23]/oc.debug_info 27080517 S2/oc.debug_info 27080517 S3/oc.debug_info $ od -v -w1 -t u1 S2/oc.debug_info >s2od_dbginf $ od -v -w1 -t u1 S3/oc.debug_info >s3od_dbginf $ sdiff -s s[23]od_dbginf|wc -l 803317 # # Large (~54%) difference in section .debug_str of cc1. # The section seems to be composed of only text strings, # of which many are identical, but have got a # difference in their sorting order. The text strings # that are truly different are the names of the # temporary files. # $ du -b S[23]/oc.debug_str 1959617 S2/oc.debug_str 1959617 S3/oc.debug_str $ od -v -w1 -t u1 S2/oc.debug_str >s2od_dbgstr $ od -v -w1 -t u1 S3/oc.debug_str >s3od_dbgstr $ sdiff -s s[23]od_dbgstr|wc -l 1050232 $ strings S2/oc.debug_str >s2strings_dbgstr $ strings S3/oc.debug_str >s3strings_dbgstr $ wc s[23]strings_dbgstr 97147 97334 1959617 s2strings_dbgstr 97147 97334 1959617 s3strings_dbgstr 194294 194668 3919234 total $ sdiff -s s[23]strings_dbgstr|wc -l 84 $ sort s2strings_dbgstr >s2strings_dbgstr_sorted $ sort s3strings_dbgstr >s3strings_dbgstr_sorted $ sdiff -s s[23]strings_dbgstr_sorted|wc -l 31 $ sdiff -s s[23]strings_dbgstr_sorted|head -5 /tmp/ccWGjBRg.ltrans0.o | /tmp/ccpAN020.ltrans0.o /tmp/ccWGjBRg.ltrans10.o | /tmp/ccpAN020.ltrans10.o /tmp/ccWGjBRg.ltrans11.o | /tmp/ccpAN020.ltrans11.o /tmp/ccWGjBRg.ltrans12.o | /tmp/ccpAN020.ltrans12.o /tmp/ccWGjBRg.ltrans13.o | /tmp/ccpAN020.ltrans13.o # # Small difference in section .rodata of cc1: # $ od -v -w8 -t x8 S2/oc.rodata >s2od $ od -v -w8 -t x8 S3/oc.rodata >s3od $ sdiff -w 57 -s s[23]od 15541720 c9fce2236e814849 | 15541720 a572ae6a9eb668e3 15541730 c061769a210f8b37 | 15541730 b5a0c6d494fa9e55 # # Disassembly of cc1: # - no difference found - # $ objdump -d stage2-gcc/cc1 | tail -n +3 >s2od_cc1_dis $ objdump -d stage3-gcc/cc1 | tail -n +3 >s3od_cc1_dis $ wc -l s[23]od_cc1_dis 2325343 s2od_cc1_dis 2325343 s3od_cc1_dis 4650686 total $ diff -s s[23]od_cc1_dis Files s2od_cc1_dis and s3od_cc1_dis are identical $ uname -a Linux debian-linux 3.14.16-sven #1 SMP Fri Aug 8 11:50:49 BST 2014 x86_64 GNU/Linux $ gcc --version gcc (GCC) 4.9.2 20140806 (prerelease) Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.