[...@gnu-6 gcc]$ ./xgcc -B. -o t t1.o t2.o -fwhopr -O -fdump-tree-optimized -v Reading specs from ./specs COLLECT_GCC=./xgcc COLLECT_LTO_WRAPPER=./lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /export/gnu/import/git/gcc/configure --enable-languages=c,c++ --disable-bootstrap --prefix=/usr/gcc-4.5.0 --with-local-prefix=/usr/local --with-plugin-ld=ld.gold --enable-gold Thread model: posix gcc version 4.5.0 20100102 (experimental) (GCC) COMPILER_PATH=./ LIBRARY_PATH=./:/lib/../lib64/:/usr/lib/../lib64/:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-B.' '-o' 't' '-fwhopr' '-O' '-fdump-tree-optimized' '-v' '-mtune=generic' ./collect2 -fwhopr --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o t /usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o ./crtbegin.o -L. -L/lib/../lib64 -L/usr/lib/../lib64 t1.o t2.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed ./crtend.o /usr/lib/../lib64/crtn.o Reading specs from ./specs COLLECT_GCC=././xgcc COLLECT_LTO_WRAPPER=./lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /export/gnu/import/git/gcc/configure --enable-languages=c,c++ --disable-bootstrap --prefix=/usr/gcc-4.5.0 --with-local-prefix=/usr/local --with-plugin-ld=ld.gold --enable-gold Thread model: posix gcc version 4.5.0 20100102 (experimental) (GCC) COLLECT_GCC_OPTIONS='-combine' '-c' '-fltrans-output-list=/tmp/ccFzFDK6.ltrans.out' '-fwpa' '-B.' '-dumpbase' 't' '-dumpdir' './' '-O' '-fdump-tree-optimized' '-v' '-mtune=generic' ./lto1 -quiet -dumpbase t1.o -dumpbase t -dumpdir ./ -mtune=generic -auxbase t1 -O -version -fltrans-output-list=/tmp/ccFzFDK6.ltrans.out -fwpa -fdump-tree-optimized @/tmp/cc1mIiH6 GNU GIMPLE (GCC) version 4.5.0 20100102 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.4.2 20091222 (Red Hat 4.4.2-20), GMP version 4.3.1, MPFR version 2.4.2, MPC version 0.8 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 GNU GIMPLE (GCC) version 4.5.0 20100102 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.4.2 20091222 (Red Hat 4.4.2-20), GMP version 4.3.1, MPFR version 2.4.2, MPC version 0.8 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Reading specs from ./specs COLLECT_GCC=././xgcc COLLECT_LTO_WRAPPER=./lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /export/gnu/import/git/gcc/configure --enable-languages=c,c++ --disable-bootstrap --prefix=/usr/gcc-4.5.0 --with-local-prefix=/usr/local --with-plugin-ld=ld.gold --enable-gold Thread model: posix gcc version 4.5.0 20100102 (experimental) (GCC) COLLECT_GCC_OPTIONS='-combine' '-c' '-B.' '-dumpbase' 't' '-dumpdir' './' '-O' '-fdump-tree-optimized' '-v' '-mtune=generic' '-fltrans' '-o' 't2.wpa.ltrans.o' ./lto1 -quiet -dumpbase t2.wpa.o -dumpbase t -dumpdir ./ -mtune=generic -auxbase-strip t2.wpa.ltrans.o -O -version -fdump-tree-optimized -fltrans t2.wpa.o -o /tmp/ccMCxira.s GNU GIMPLE (GCC) version 4.5.0 20100102 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.4.2 20091222 (Red Hat 4.4.2-20), GMP version 4.3.1, MPFR version 2.4.2, MPC version 0.8 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 GNU GIMPLE (GCC) version 4.5.0 20100102 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.4.2 20091222 (Red Hat 4.4.2-20), GMP version 4.3.1, MPFR version 2.4.2, MPC version 0.8 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 COLLECT_GCC_OPTIONS='-combine' '-c' '-B.' '-dumpbase' 't' '-dumpdir' './' '-O' '-fdump-tree-optimized' '-v' '-mtune=generic' '-fltrans' '-o' 't2.wpa.ltrans.o' ./as -V -Qy -o t2.wpa.ltrans.o /tmp/ccMCxira.s GNU assembler version 2.20.51.0.5 (x86_64-unknown-linux-gnu) using BFD version (Linux/GNU Binutils) 2.20.51.0.5.20091221 COMPILER_PATH=./:./ LIBRARY_PATH=./:/lib/../lib64/../lib64/:/usr/lib/../lib64/../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/lib/../lib64/:/usr/lib/../lib64/:./:/lib/../lib64/:/usr/lib/../lib64/:/lib/:/usr/lib/:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-combine' '-c' '-B.' '-dumpbase' 't' '-dumpdir' './' '-O' '-fdump-tree-optimized' '-v' '-mtune=generic' '-fltrans' '-o' 't2.wpa.ltrans.o' Reading specs from ./specs COLLECT_GCC=././xgcc COLLECT_LTO_WRAPPER=./lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /export/gnu/import/git/gcc/configure --enable-languages=c,c++ --disable-bootstrap --prefix=/usr/gcc-4.5.0 --with-local-prefix=/usr/local --with-plugin-ld=ld.gold --enable-gold Thread model: posix gcc version 4.5.0 20100102 (experimental) (GCC) COLLECT_GCC_OPTIONS='-combine' '-c' '-B.' '-dumpbase' 't' '-dumpdir' './' '-O' '-fdump-tree-optimized' '-v' '-mtune=generic' '-fltrans' '-o' 't1.wpa.ltrans.o' ./lto1 -quiet -dumpbase t1.wpa.o -dumpbase t -dumpdir ./ -mtune=generic -auxbase-strip t1.wpa.ltrans.o -O -version -fdump-tree-optimized -fltrans t1.wpa.o -o /tmp/cc0ADOW8.s GNU GIMPLE (GCC) version 4.5.0 20100102 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.4.2 20091222 (Red Hat 4.4.2-20), GMP version 4.3.1, MPFR version 2.4.2, MPC version 0.8 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 GNU GIMPLE (GCC) version 4.5.0 20100102 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.4.2 20091222 (Red Hat 4.4.2-20), GMP version 4.3.1, MPFR version 2.4.2, MPC version 0.8 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 COLLECT_GCC_OPTIONS='-combine' '-c' '-B.' '-dumpbase' 't' '-dumpdir' './' '-O' '-fdump-tree-optimized' '-v' '-mtune=generic' '-fltrans' '-o' 't1.wpa.ltrans.o' ./as -V -Qy -o t1.wpa.ltrans.o /tmp/cc0ADOW8.s GNU assembler version 2.20.51.0.5 (x86_64-unknown-linux-gnu) using BFD version (Linux/GNU Binutils) 2.20.51.0.5.20091221 COMPILER_PATH=./:./ LIBRARY_PATH=./:/lib/../lib64/../lib64/:/usr/lib/../lib64/../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/lib/../lib64/:/usr/lib/../lib64/:./:/lib/../lib64/:/usr/lib/../lib64/:/lib/:/usr/lib/:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-combine' '-c' '-B.' '-dumpbase' 't' '-dumpdir' './' '-O' '-fdump-tree-optimized' '-v' '-mtune=generic' '-fltrans' '-o' 't1.wpa.ltrans.o' COMPILER_PATH=./:./ LIBRARY_PATH=./:/lib/../lib64/../lib64/:/usr/lib/../lib64/../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/lib/../lib64/:/usr/lib/../lib64/:./:/lib/../lib64/:/usr/lib/../lib64/:/lib/:/usr/lib/:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-combine' '-c' '-fltrans-output-list=/tmp/ccFzFDK6.ltrans.out' '-fwpa' '-B.' '-dumpbase' 't' '-dumpdir' './' '-O' '-fdump-tree-optimized' '-v' '-mtune=generic' [...@gnu-6 gcc]$
It doesn't show what gcc is doing with lto. I have to add "-Wl,-v": [...@gnu-6 gcc]$ ./xgcc -B. -o t t1.o t2.o -fwhopr -O -fdump-tree-optimized -v -Wl,-v Reading specs from ./specs COLLECT_GCC=./xgcc COLLECT_LTO_WRAPPER=./lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /export/gnu/import/git/gcc/configure --enable-languages=c,c++ --disable-bootstrap --prefix=/usr/gcc-4.5.0 --with-local-prefix=/usr/local --with-plugin-ld=ld.gold --enable-gold Thread model: posix gcc version 4.5.0 20100102 (experimental) (GCC) COMPILER_PATH=./ LIBRARY_PATH=./:/lib/../lib64/:/usr/lib/../lib64/:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-B.' '-o' 't' '-fwhopr' '-O' '-fdump-tree-optimized' '-v' '-mtune=generic' ./collect2 -fwhopr --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o t /usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o ./crtbegin.o -L. -L/lib/../lib64 -L/usr/lib/../lib64 t1.o t2.o -v -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed ./crtend.o /usr/lib/../lib64/crtn.o collect2 version 4.5.0 20100102 (experimental) (x86-64 Linux/ELF) ./collect-ld --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o t /usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o ./crtbegin.o -L. -L/lib/../lib64 -L/usr/lib/../lib64 t1.o t2.o -v -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed ./crtend.o /usr/lib/../lib64/crtn.o GNU ld (Linux/GNU Binutils) 2.20.51.0.5.20091221 ./nm -n /usr/lib/../lib64/crt1.o ./nm -n /usr/lib/../lib64/crti.o ./nm -n ./crtbegin.o ./nm -n t1.o ./nm -n t2.o ./nm -n ./crtend.o ./nm -n /usr/lib/../lib64/crtn.o ./lto-wrapper ././xgcc -B. -o t -fwhopr -O -fdump-tree-optimized -v -mtune=generic t1.o t2.o Reading specs from ./specs COLLECT_GCC=././xgcc COLLECT_LTO_WRAPPER=./lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /export/gnu/import/git/gcc/configure --enable-languages=c,c++ --disable-bootstrap --prefix=/usr/gcc-4.5.0 --with-local-prefix=/usr/local --with-plugin-ld=ld.gold --enable-gold Thread model: posix gcc version 4.5.0 20100102 (experimental) (GCC) COLLECT_GCC_OPTIONS='-combine' '-c' '-fltrans-output-list=/tmp/ccjvu7WH.ltrans.out' '-fwpa' '-B.' '-dumpbase' 't' '-dumpdir' './' '-O' '-fdump-tree-optimized' '-v' '-mtune=generic' ./lto1 -quiet -dumpbase t1.o -dumpbase t -dumpdir ./ -mtune=generic -auxbase t1 -O -version -fltrans-output-list=/tmp/ccjvu7WH.ltrans.out -fwpa -fdump-tree-optimized @/tmp/ccglEdLH GNU GIMPLE (GCC) version 4.5.0 20100102 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.4.2 20091222 (Red Hat 4.4.2-20), GMP version 4.3.1, MPFR version 2.4.2, MPC version 0.8 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 GNU GIMPLE (GCC) version 4.5.0 20100102 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.4.2 20091222 (Red Hat 4.4.2-20), GMP version 4.3.1, MPFR version 2.4.2, MPC version 0.8 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Reading specs from ./specs COLLECT_GCC=././xgcc COLLECT_LTO_WRAPPER=./lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /export/gnu/import/git/gcc/configure --enable-languages=c,c++ --disable-bootstrap --prefix=/usr/gcc-4.5.0 --with-local-prefix=/usr/local --with-plugin-ld=ld.gold --enable-gold Thread model: posix gcc version 4.5.0 20100102 (experimental) (GCC) COLLECT_GCC_OPTIONS='-combine' '-c' '-B.' '-dumpbase' 't' '-dumpdir' './' '-O' '-fdump-tree-optimized' '-v' '-mtune=generic' '-fltrans' '-o' 't2.wpa.ltrans.o' ./lto1 -quiet -dumpbase t2.wpa.o -dumpbase t -dumpdir ./ -mtune=generic -auxbase-strip t2.wpa.ltrans.o -O -version -fdump-tree-optimized -fltrans t2.wpa.o -o /tmp/ccn6yo2K.s GNU GIMPLE (GCC) version 4.5.0 20100102 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.4.2 20091222 (Red Hat 4.4.2-20), GMP version 4.3.1, MPFR version 2.4.2, MPC version 0.8 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 GNU GIMPLE (GCC) version 4.5.0 20100102 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.4.2 20091222 (Red Hat 4.4.2-20), GMP version 4.3.1, MPFR version 2.4.2, MPC version 0.8 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 COLLECT_GCC_OPTIONS='-combine' '-c' '-B.' '-dumpbase' 't' '-dumpdir' './' '-O' '-fdump-tree-optimized' '-v' '-mtune=generic' '-fltrans' '-o' 't2.wpa.ltrans.o' ./as -V -Qy -o t2.wpa.ltrans.o /tmp/ccn6yo2K.s GNU assembler version 2.20.51.0.5 (x86_64-unknown-linux-gnu) using BFD version (Linux/GNU Binutils) 2.20.51.0.5.20091221 COMPILER_PATH=./:./ LIBRARY_PATH=./:/lib/../lib64/../lib64/:/usr/lib/../lib64/../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/lib/../lib64/:/usr/lib/../lib64/:./:/lib/../lib64/:/usr/lib/../lib64/:/lib/:/usr/lib/:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-combine' '-c' '-B.' '-dumpbase' 't' '-dumpdir' './' '-O' '-fdump-tree-optimized' '-v' '-mtune=generic' '-fltrans' '-o' 't2.wpa.ltrans.o' Reading specs from ./specs COLLECT_GCC=././xgcc COLLECT_LTO_WRAPPER=./lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: /export/gnu/import/git/gcc/configure --enable-languages=c,c++ --disable-bootstrap --prefix=/usr/gcc-4.5.0 --with-local-prefix=/usr/local --with-plugin-ld=ld.gold --enable-gold Thread model: posix gcc version 4.5.0 20100102 (experimental) (GCC) COLLECT_GCC_OPTIONS='-combine' '-c' '-B.' '-dumpbase' 't' '-dumpdir' './' '-O' '-fdump-tree-optimized' '-v' '-mtune=generic' '-fltrans' '-o' 't1.wpa.ltrans.o' ./lto1 -quiet -dumpbase t1.wpa.o -dumpbase t -dumpdir ./ -mtune=generic -auxbase-strip t1.wpa.ltrans.o -O -version -fdump-tree-optimized -fltrans t1.wpa.o -o /tmp/ccmzHqSJ.s GNU GIMPLE (GCC) version 4.5.0 20100102 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.4.2 20091222 (Red Hat 4.4.2-20), GMP version 4.3.1, MPFR version 2.4.2, MPC version 0.8 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 GNU GIMPLE (GCC) version 4.5.0 20100102 (experimental) (x86_64-unknown-linux-gnu) compiled by GNU C version 4.4.2 20091222 (Red Hat 4.4.2-20), GMP version 4.3.1, MPFR version 2.4.2, MPC version 0.8 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 COLLECT_GCC_OPTIONS='-combine' '-c' '-B.' '-dumpbase' 't' '-dumpdir' './' '-O' '-fdump-tree-optimized' '-v' '-mtune=generic' '-fltrans' '-o' 't1.wpa.ltrans.o' ./as -V -Qy -o t1.wpa.ltrans.o /tmp/ccmzHqSJ.s GNU assembler version 2.20.51.0.5 (x86_64-unknown-linux-gnu) using BFD version (Linux/GNU Binutils) 2.20.51.0.5.20091221 COMPILER_PATH=./:./ LIBRARY_PATH=./:/lib/../lib64/../lib64/:/usr/lib/../lib64/../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/lib/../lib64/:/usr/lib/../lib64/:./:/lib/../lib64/:/usr/lib/../lib64/:/lib/:/usr/lib/:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-combine' '-c' '-B.' '-dumpbase' 't' '-dumpdir' './' '-O' '-fdump-tree-optimized' '-v' '-mtune=generic' '-fltrans' '-o' 't1.wpa.ltrans.o' COMPILER_PATH=./:./ LIBRARY_PATH=./:/lib/../lib64/../lib64/:/usr/lib/../lib64/../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/lib/../lib64/:/usr/lib/../lib64/:./:/lib/../lib64/:/usr/lib/../lib64/:/lib/:/usr/lib/:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS='-combine' '-c' '-fltrans-output-list=/tmp/ccjvu7WH.ltrans.out' '-fwpa' '-B.' '-dumpbase' 't' '-dumpdir' './' '-O' '-fdump-tree-optimized' '-v' '-mtune=generic' ./collect-ld --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o t /usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o ./crtbegin.o -L. -L/lib/../lib64 -L/usr/lib/../lib64 t2.wpa.ltrans.o t1.wpa.ltrans.o -v -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed ./crtend.o /usr/lib/../lib64/crtn.o GNU ld (Linux/GNU Binutils) 2.20.51.0.5.20091221 [...@gnu-6 gcc]$ -- Summary: "gcc -v" doesn't work with lto Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: lto AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: hjl dot tools at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42581