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]

[PATCH] Enable LTO on darwin


  The attached patch enables LTO support by default on *-apple-darwin*.
Okay for gcc trunk?
                Jack

2010-08-24  Jack Howarth <howarth@bromo.med.uc.edu>

	* configure.ac: Enable LTO by default on Darwin.
	* configure: Regenerate.

Index: configure.ac
===================================================================
--- configure.ac	(revision 163532)
+++ configure.ac	(working copy)
@@ -1787,8 +1787,11 @@
   AC_SUBST(libelflibs)
   AC_SUBST(libelfinc)
 fi],[if test x"$default_enable_lto" = x"yes" ; then
-    # On non-ELF platforms, LTO must be explicitly enabled.
-    enable_lto=no
+    case $target in
+      *-apple-darwin*) ;;
+      # On other non-ELF platforms, LTO must be explicitly enabled.
+      *) 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
@@ -1797,7 +1800,6 @@
   # -flto it won't be needed until after installation anyway.
     case $target in
       *-cygwin*|*-mingw*) ;;
-      *-apple-darwin*) ;;
       *) if test x"$enable_lto" = x"yes"; then
 	AC_MSG_ERROR([LTO support is not enabled for this target.])
         fi


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