[Bug tree-optimization/39203] New: LTO and -fwhole-program do not play along well
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Feb 16 15:10:00 GMT 2009
There needs to be a convenient way to specify that at link time the whole
program
is seen, or rather, that -fwhole-program -flto during compile-time doesn't have
-fwhole-program effects.
Building SPEC int 2000 with -flto -fwhole-program otherwise (obviously) results
in undefined symbols, like forOutput from make 'specmake -j2 build 2> make.err
| tee make.out':
/gcc/spec/sb-haydn-df-64/x86_64/install-200902142206/bin/gcc -c -o bzip2.o
-O3 -ffast-math -flto -fwhole-program bzip2.c
/gcc/spec/sb-haydn-df-64/x86_64/install-200902142206/bin/gcc -c -o spec.o
-O3 -ffast-math -flto -fwhole-program spec.c
/gcc/spec/sb-haydn-df-64/x86_64/install-200902142206/bin/gcc -O3
-ffast-math -flto -fwhole-program bzip2.o spec.o -o bzip2
Error from make 'specmake -j2 build 2> make.err | tee make.out':
spec.o: In function `main':
spec.c:(.text+0x207): undefined reference to `smallMode'
spec.c:(.text+0x20e): undefined reference to `verbosity'
spec.c:(.text+0x218): undefined reference to `blockSize100k'
spec.c:(.text+0x222): undefined reference to `bsStream'
spec.c:(.text+0x22c): undefined reference to `workFactor'
spec.c:(.text+0x235): undefined reference to `allocateCompressStructures'
spec.c:(.text+0x252): undefined reference to `blockSize100k'
spec.c:(.text+0x257): undefined reference to `compressStream'
spec.c:(.text+0x2b3): undefined reference to `blockSize100k'
spec.c:(.text+0x2bc): undefined reference to `uncompressStream'
collect2: ld returned 1 exit status
specmake: *** [bzip2] Error 1
bzip2:
--
Summary: LTO and -fwhole-program do not play along well
Product: gcc
Version: lto
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39203
More information about the Gcc-bugs
mailing list