[Bug lto/45375] [meta-bug] Issues with building Mozilla with LTO
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Dec 2 09:42:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45375
--- Comment #15 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-12-02 09:41:58 UTC ---
(In reply to comment #10)
> I am just trying to get Mozilla building with GNU ld instead of gold. First
> problem is that Mozilla links some of libraries as:
>
> /abuild/jh/trunk-install/bin/gcc -O3 -flto -flto-partition=none
> -fuse-linker-plugin -shared -Wl,-soname -Wl,libplds4.so -o libplds4.so
> ./plarena.o ./plhash.o ./plvrsion.o -L/abuild/jh/build-mozilla-new7/dist/lib
> -lnspr4
>
> i.e. there is missing -fPIC that means that we compile into non-PIC code and
> GNU LD eventually complains about PC32 relocations into symbols that can be
> overwritten.
>
> Is this valid? If so, we need to work out -fPIC ourselves at LTO time....
It's valid I think and we try to work out fPIC ourselves in the funny
LTO option handling code (but the options are not re-applied at ltrans
stage I think, so it doesn't work at all with WHOPR).
Richard.
> Honza
More information about the Gcc-bugs
mailing list