This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [LTO merge][11/15][RFH] Build libiberty with --enable-shared if LTO+gold are used


Diego Novillo <dnovillo@google.com> writes:

> I'm not actually looking to commit this patch, but a variant that
> tests whether gold + LTO are enabled.  Since the linker plugin
> uses libiberty and is itself a shared object, it needs libiberty
> to be a shared library (although building it with PIC would also
> work, I think).
>
> What is the best way of doing this?  I need to be able to read
> the values of enable_gold and enable_lto from the toplevel
> configure script.

Just have --enable-lto pass --enable-shared to libiberty, I suppose.
This shouldn't have a big effect on the tools which use libiberty,
since everything I checked explicitly links against libiberty.a.  Then
I think the linker plugin can link against libiberty/pic/libiberty.a.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]