If -o<filename> is specified multiple -o options are passed to the assembler,
and the assembly from lto1 is compiled into file specified the user, and the
temporary objfile is empty.

r...@ryan:~/gcc/lto/x86-build/gcc$ ./xgcc -B. -flto t.c -c                      
r...@ryan:~/gcc/lto/x86-build/gcc$ ./xgcc -B. -shared -o libfoo.so t.o -flto    
r...@ryan:~/gcc/lto/x86-build/gcc$ ./xgcc -B. -shared -olibfoo.so t.o -flto
/tmp/cco4SVei.lto.o: file not recognized: File truncated
collect2: ld returned 1 exit status
r...@ryan:~/gcc/lto/x86-build/gcc$ ./xgcc -B. -shared -olibfoo.so t.o -flto -v
Reading specs from ./specs
COLLECT_GCC=./xgcc
COLLECT_LTO_WRAPPER=./lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../configure --enable-languages=c --enable-lto
--disable-bootstrap
Thread model: posix
gcc version 4.5.0 20090605 (experimental) (lto merged with rev 148228)
COMPILER_PATH=./
LIBRARY_PATH=./:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-B.' '-shared' '-olibfoo.so' '-flto' '-v' '-mtune=generic'
 ./collect2 -flto --eh-frame-hdr -m elf_i386 -shared -olibfoo.so
/usr/lib/crti.o ./crtbeginS.o -L. t.o -lgcc --as-needed -lgcc_s --no-as-needed
-lc -lgcc --as-needed -lgcc_s --no-as-needed ./crtendS.o /usr/lib/crtn.o
Reading specs from ./specs
COLLECT_GCC=././xgcc
COLLECT_LTO_WRAPPER=./lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../configure --enable-languages=c --enable-lto
--disable-bootstrap
Thread model: posix
gcc version 4.5.0 20090605 (experimental) (lto merged with rev 148228)
COLLECT_GCC_OPTIONS='-combine' '-c' '-o' '/tmp/ccnLb3Ia.lto.o' '-B.' '-shared'
'-olibfoo.so' '-v' '-mtune=generic'
 ./lto1 -quiet -dumpbase t.o -mtune=generic -auxbase-strip /tmp/ccnLb3Ia.lto.o
-auxbase-strip libfoo.so -version @/tmp/ccg3ryza -o /tmp/ccI1kpZa.s
GNU GIMPLE (lto merged with rev 148228) version 4.5.0 20090605 (experimental)
(i686-pc-linux-gnu)
        compiled by GNU C version 4.3.3, GMP version 4.2.1, MPFR version 2.3.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU GIMPLE (lto merged with rev 148228) version 4.5.0 20090605 (experimental)
(i686-pc-linux-gnu)
        compiled by GNU C version 4.3.3, GMP version 4.2.1, MPFR version 2.3.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
COLLECT_GCC_OPTIONS='-combine' '-c' '-o' '/tmp/ccnLb3Ia.lto.o' '-B.' '-shared'
'-olibfoo.so' '-v' '-mtune=generic'
 ./as -V -Qy -o /tmp/ccnLb3Ia.lto.o -olibfoo.so /tmp/ccI1kpZa.s
GNU assembler version 2.19.1 (i486-linux-gnu) using BFD version (GNU Binutils
for Debian) 2.19.1
COMPILER_PATH=./:./
LIBRARY_PATH=./:./:/lib/:/usr/lib/:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-combine' '-c' '-o' '/tmp/ccnLb3Ia.lto.o' '-B.' '-shared'
'-olibfoo.so' '-v' '-mtune=generic'
/tmp/ccnLb3Ia.lto.o: file not recognized: File truncated
collect2: ld returned 1 exit status


-- 
           Summary: [LTO] Handling of -o without space
           Product: gcc
           Version: lto
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rmansfield at qnx dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40429

Reply via email to