Patchwork [PING] Enable LTO on darwin

login
register
mail settings
Submitter IainS
Date Sept. 18, 2010, 3:38 p.m.
Message ID <23C8F05C-74C9-4AE8-81FA-3E0CFB64EA8F@sandoe-acoustics.co.uk>
Download mbox | patch
Permalink /patch/65130/
State New
Headers show

Comments

IainS - Sept. 18, 2010, 3:38 p.m.
Hi Chaps,

On 3 Sep 2010, at 21:00, Jack Howarth wrote:

> On Fri, Sep 03, 2010 at 03:55:19PM -0400, Diego Novillo wrote:
>> On Fri, Sep 3, 2010 at 10:26, Diego Novillo <dnovillo@google.com>  
>> wrote:
>>> On Fri, Sep 3, 2010 at 10:22, Jack Howarth  
>>> <howarth@bromo.med.uc.edu> wrote:
>>>
>>>> http://gcc.gnu.org/ml/gcc-patches/2010-08/msg01827.html
>>>
>>> OK.
>>
>> Committed as revision 163839.  Please watch for any fallout, I don't
>> have a darwin system able to do gcc builds.

I think we also need the following or else configuring with "--enable- 
lto" fails (although lto is now correctly enabled by default).

Iain


	* configure.ac (enable-lto): Add darwin to the list of supported lto  
targets, amend comment.

  	AC_MSG_ERROR([LTO support is not enabled for this target.])
          fi
Mike Stump - Sept. 20, 2010, 5:45 p.m.
On Sep 18, 2010, at 8:38 AM, IainS wrote:
> I think we also need the following or else configuring with "--enable-lto" fails (although lto is now correctly enabled by default).

Ok.
IainS - Sept. 21, 2010, 2:33 p.m.
On 20 Sep 2010, at 18:45, Mike Stump wrote:

> On Sep 18, 2010, at 8:38 AM, IainS wrote:
>> I think we also need the following or else configuring with "-- 
>> enable-lto" fails (although lto is now correctly enabled by default).
>
> Ok.
r164481
Iain

Patch

Index: configure.ac
===================================================================
--- configure.ac	(revision 164389)
+++ configure.ac	(working copy)
@@ -1793,13 +1793,13 @@  fi],[if test x"$default_enable_lto" = x"yes" ;  
the
        *) enable_lto=no ;;
      esac
    else
-  # Apart from ELF platforms, only Windows supports LTO so far.  It
-  # would also be nice to check the binutils support, but we don't
+  # Apart from ELF platforms, only Windows and Darwin support LTO so  
far.
+  # It would also be nice to check the binutils support, but we don't
    # have gcc_GAS_CHECK_FEATURE available here.  For now, we'll just
    # warn during gcc/ subconfigure; unless you're bootstrapping with
    # -flto it won't be needed until after installation anyway.
      case $target in
-      *-cygwin*|*-mingw*) ;;
+      *-cygwin*|*-mingw* | *-apple-darwin*) ;;
        *) if test x"$enable_lto" = x"yes"; then