public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/49677] New: GCC 4.6.0 LTO files not compatible with GCC 4.6.1
@ 2011-07-08 14:56 edwintorok at gmail dot com
2011-08-21 15:52 ` [Bug lto/49677] " xunxun1982 at gmail dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: edwintorok at gmail dot com @ 2011-07-08 14:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49677
Summary: GCC 4.6.0 LTO files not compatible with GCC 4.6.1
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: edwintorok@gmail.com
Created attachment 24714
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24714
test.o
Using gcc 4.6.1 to link objects compiled with GCC 4.6.0 -flto produces this
error:
$ gcc test.o -flto -shared
lto1: error: bad value (generic) for -mtls-dialect= switch
lto-wrapper: /usr/bin/gcc returned 1 exit status
/usr/bin/ld: lto-wrapper failed
collect2: ld returned 1 exit status
There is no -mtls-dialect=generic flag, (and there wasn't either).
Instead there is an -mtune=generic flag:
COLLECT_GCC_OPTIONS='-flto' '-shared' '-v' '-mtune=generic' '-march=x86-64'
I think 4.6.1 confuses -mtune and -mtls-dialect when loading 4.6.0 LTO objects.
Maybe the LTO version should be bumped to make these objects incompatible?
Fixing this compile error is possible if:
- make clean in all the projects that you link in
- ccache -C, ccache -c to delete all cached objects from previous version
It'd be better if GCC automatically detected that a certain LTO object file is
not compatible, and say which one it is.
In any case it'd be useful if there would be a -Wlto-mismatch, that would warn
if LTO objects were produced with different GCC versions (.comment section
should contain full version), or if the LTO objects and current compiler
version are different.
gcc -v output:
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.1-2'
--with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr
--program-suffix=-4.6 --enable-shared --enable-multiarch
--with-multiarch-defaults=x86_64-linux-gnu --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib/x86_64-linux-gnu
--without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib/x86_64-linux-gnu
--enable-nls --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc
--with-arch-32=i586 --with-tune=generic --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.1 (Debian 4.6.1-2)
I'm attaching the test.o file, because it the bug doesn't reproduce if I
compile it again from source with 4.6.1, only if I use the object file compiled
by 4.6.0.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-01-10 15:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-08 14:56 [Bug lto/49677] New: GCC 4.6.0 LTO files not compatible with GCC 4.6.1 edwintorok at gmail dot com
2011-08-21 15:52 ` [Bug lto/49677] " xunxun1982 at gmail dot com
2011-10-30 16:14 ` andi-gcc at firstfloor dot org
2012-01-10 15:05 ` rguenth at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).