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] Add --enable-lto and --with-libelf


On Wed, May 20, 2009 at 9:48 PM, Diego Novillo <dnovillo@google.com> wrote:
>
> This patch fixes a long standing wart in the branch. ?LTO is not
> really a language from the user's perspective, so having to use
> --enable-languages to enable it is odd.
>
> Additionally, the dependency on libelf has always required using
> libelf.h in system headers or hacking CPPFLAGS/BOOT_LDFLAGS to
> get it from other places.
>
> With this patch, the compiler can now enable LTO functionality
> automatically (if it detects a working libelf), or it can be
> requested with --enable-lto.
>
> If --enable-lto is used and no there isn't a working libelf.h,
> configure emits an error. ?If --with-libelf is used and/or a
> working libelf.h is found in the system paths, then LTO is
> enabled automatically.
>
> Finally, if LTO has been disabled, using -flto/-fwhopr produces
> an error at runtime. ?The testsuite uses this to determine
> whether to run the LTO tests.
>
> Bootstrapped and tested on hosts with a system libelf.h and hosts
> with a libelf.h in a different directory.
>
> Paolo, could you review the changes so I can make fixes in the
> branch before they are merged to mainline?

What about the target dependency on being a ELF target?  Or isn't
that present anymore?

Richard.


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