add lto to powerpc-*darwin and enable for 32bit darwin
authorSteven Bosscher <steven@gcc.gnu.org>
Tue, 18 May 2010 08:12:56 +0000 (08:12 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Tue, 18 May 2010 08:12:56 +0000 (08:12 +0000)
Steven Bosscher  <steven@gcc.gnu.org>
ChangeLog:
* configure.ac (--enable-lto): All *-apple-darwin* now support LTO.
* configure: Regenerate.

gcc/ChangeLog:
* config.gcc (powerpc-*-darwin*, powerpc64-*-darwin*): Add
lto-macho as lto_binary_reader.

* darwin.c (darwin_asm_named_section): Do not add assembler comment
after .section directive; just print it before the directive instead.

M    gcc/config.gcc
M    gcc/config/darwin.c
M    ChangeLog
M    gcc/ChangeLog

From-SVN: r159527

ChangeLog
configure
configure.ac
gcc/ChangeLog
gcc/config.gcc
gcc/config/darwin.c

index 8811342148d2129b0c2f9bf4efc061c6ffaad5c2..2aa46dec8fea51737a273980f1e36f66720f3acf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-05-18  Steven Bosscher  <steven@gcc.gnu.org>
+
+       * configure.ac (--enable-lto): All *-apple-darwin* now support LTO.
+       * configure: Regenerate.
+
 2010-05-12  Sriraman Tallam  <tmsriram@google.com>
 
        * MAINTAINERS (Write After Approval): Add myself.
index 6fc9b0f7a57ec23a89662f96b3c215c19d1edb2c..8edfde3da4d753dd410214c5e75f5b53b91b9f3d 100755 (executable)
--- a/configure
+++ b/configure
@@ -6686,7 +6686,7 @@ else
   # -flto it won't be needed until after installation anyway.
     case $target in
       *-cygwin*|*-mingw*) ;;
-      x86_64-apple-darwin*) ;;
+      *-apple-darwin*) ;;
       *) if test x"$enable_lto" = x"yes"; then
        as_fn_error "LTO support is not enabled for this target." "$LINENO" 5
         fi
index 920457464e57319e637debde345bfb333b989f14..f78c5273084a06aa9299d8431b6745363815229e 100644 (file)
@@ -1803,7 +1803,7 @@ fi],[if test x"$default_enable_lto" = x"yes" ; then
   # -flto it won't be needed until after installation anyway.
     case $target in
       *-cygwin*|*-mingw*) ;;
-      x86_64-apple-darwin*) ;;
+      *-apple-darwin*) ;;
       *) if test x"$enable_lto" = x"yes"; then
        AC_MSG_ERROR([LTO support is not enabled for this target.])
         fi
index e677aeb94f578956737764f44b8c7458d2876c11..56d1b0bef2ef4e39ae66eb7ec1e2c2748d5b4e5e 100644 (file)
@@ -1,3 +1,11 @@
+2010-05-18  Steven Bosscher  <steven@gcc.gnu.org>
+
+       * config.gcc (powerpc-*-darwin*, powerpc64-*-darwin*): Add
+       lto-macho as lto_binary_reader.
+
+       * darwin.c (darwin_asm_named_section): Do not add assembler comment
+       after .section directive; just print it before the directive instead.
+
 2010-05-17  Jan Hubicka  <jh@suse.cz>
 
        * cgraph.c (cgraph_create_virtual_clone): Only check
index da56fbecc20b8c7932b312a04d00de0850d7b1f9..2c4d1213c35aa96ae45fc1bb4c570b73d804da74 100644 (file)
@@ -1891,12 +1891,14 @@ powerpc-*-darwin*)
          *-darwin[0-6]*)
            ;;
        esac
+       lto_binary_reader=lto-macho
        extra_headers=altivec.h
        ;;
 powerpc64-*-darwin*)
        tm_file="${tm_file} ${cpu_type}/darwin8.h ${cpu_type}/darwin64.h"
        extra_options="${extra_options} ${cpu_type}/darwin.opt"
        # We're omitting t-darwin8 to avoid building any multilibs
+       lto_binary_reader=lto-macho
        extra_headers=altivec.h
        ;;
 powerpc*-*-freebsd*)
index 93f7babbd6fcf4dbc988774e6f5974df7c936b1b..6c63d7a32b4b89fefdce59ed676c8e1487a01bcb 100644 (file)
@@ -1460,8 +1460,9 @@ darwin_asm_named_section (const char *name,
       obstack_grow (&lto_section_names_obstack, "\\0\"\n", 4);
 
       /* Output the dummy section name.  */
-      fprintf (asm_out_file, "\t.section %s,__%08X,regular,debug\t# %s\n",
-              LTO_SEGMENT_NAME, lto_section_names_offset, name);
+      fprintf (asm_out_file, "\t# %s\n", name);
+      fprintf (asm_out_file, "\t.section %s,__%08X,regular,debug\n",
+              LTO_SEGMENT_NAME, lto_section_names_offset);
 
       /* Update the offset for the next section name.  Make sure we stay
         within reasonable length.  */