This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [LTO merge][2/15][RFA] Configury
On Tue, Sep 29, 2009 at 12:57, Joseph S. Myers <joseph@codesourcery.com> wrote:
> On Mon, 28 Sep 2009, Diego Novillo wrote:
>
>> +# Check for LTO support.
>> +AC_ARG_ENABLE(lto,
>> +[ Â--enable-lto      Âenable link time optimization support],
>> +enable_lto=$enableval,
>> +enable_lto=yes; default_enable_lto=yes)
> [...]
>
> You enable LTO by default if a suitable libelf is found. ÂBut what if
> libelf is present but the target for which GCC is being configured is not
> an ELF target? ÂPresumably LTO will not work in that case (i.e., it
> requires the target to be an ELF target rather than producing ELF files
> separate from the normal objects for that target)? ÂSo shouldn't LTO be
> disabled for non-ELF targets even when libelf is present? ÂWe discussed a
> patch to do that back in May (e.g.
> <http://gcc.gnu.org/ml/gcc-patches/2009-05/msg01609.html>); what happened
> to that? Â(On the whole I think a blacklist of targets that are (a)
> supported by GCC and (b) not ELF is better than trying to list all ELF
> targets. ÂCertainly various ELF targets are missing from the list used to
> set is_elf for --enable-gold.)
I completely forgot about it. Thanks for the reminder. PR 41529.
>
>> + Â# If LTO is enabled, add the LTO front end.
>> + Âif test "$enable_lto" = "yes" ; then
>> + Â Ânew_enable_languages="${new_enable_languages}lto,"
>> + Â Âif test "${ENABLE_GOLD}" = "yes" ; then
>> + Â Â Âconfigdirs="$configdirs lto-plugin"
>> + Â Âfi
>> + Âfi
>
> To confirm: --enable-gold is a configure option for the binutils tree, you
> are making it also an option for the GCC tree
No. --enable-gold already existed.
> and building the plugin
> does not need a unified source tree with gold sources, just certain
> headers that other patches in the series will ensure are part of the GCC
> tree as well as the src tree?
Correct.
> I don't have a better patch to which to attach this comment: since zlib
> will now be used by LTO not just by java, you should change
> maintainer-scripts/gcc_release to remove zlib from JAVA_DIRS (so causing
> it to go in the "core" tarballs).
Like this?
* gcc_release (JAVA_DIRS): Remove zlib.
Index: gcc_release
===================================================================
--- gcc_release (revision 152279)
+++ gcc_release (working copy)
@@ -547,7 +547,7 @@ SOURCE_DIRECTORY=""
ADA_DIRS="gcc/ada libada gnattools"
CPLUSPLUS_DIRS="gcc/cp libstdc++-v3"
FORTRAN95_DIRS="gcc/fortran libgfortran"
-JAVA_DIRS="gcc/java libjava libffi zlib boehm-gc"
+JAVA_DIRS="gcc/java libjava libffi boehm-gc"
OBJECTIVEC_DIRS="gcc/objc gcc/objcp libobjc"
TESTSUITE_DIRS="gcc/testsuite"
Thanks. Diego.