This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [LTO merge][11/15][RFH] Build libiberty with --enable-shared if LTO+gold are used
- From: Ian Lance Taylor <iant at google dot com>
- To: Diego Novillo <dnovillo at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org, dj at redhat dot com
- Date: Mon, 28 Sep 2009 22:11:43 -0700
- Subject: Re: [LTO merge][11/15][RFH] Build libiberty with --enable-shared if LTO+gold are used
- References: <20090929012821.GA14239@google.com>
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