Commit 02540df4 by Steven Bosscher Committed by Iain Sandoe

add lto to powerpc-*darwin and enable for 32bit darwin

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
parent 451078b5
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> 2010-05-12 Sriraman Tallam <tmsriram@google.com>
* MAINTAINERS (Write After Approval): Add myself. * MAINTAINERS (Write After Approval): Add myself.
......
...@@ -6686,7 +6686,7 @@ else ...@@ -6686,7 +6686,7 @@ else
# -flto it won't be needed until after installation anyway. # -flto it won't be needed until after installation anyway.
case $target in case $target in
*-cygwin*|*-mingw*) ;; *-cygwin*|*-mingw*) ;;
x86_64-apple-darwin*) ;; *-apple-darwin*) ;;
*) if test x"$enable_lto" = x"yes"; then *) if test x"$enable_lto" = x"yes"; then
as_fn_error "LTO support is not enabled for this target." "$LINENO" 5 as_fn_error "LTO support is not enabled for this target." "$LINENO" 5
fi fi
......
...@@ -1803,7 +1803,7 @@ fi],[if test x"$default_enable_lto" = x"yes" ; then ...@@ -1803,7 +1803,7 @@ fi],[if test x"$default_enable_lto" = x"yes" ; then
# -flto it won't be needed until after installation anyway. # -flto it won't be needed until after installation anyway.
case $target in case $target in
*-cygwin*|*-mingw*) ;; *-cygwin*|*-mingw*) ;;
x86_64-apple-darwin*) ;; *-apple-darwin*) ;;
*) if test x"$enable_lto" = x"yes"; then *) if test x"$enable_lto" = x"yes"; then
AC_MSG_ERROR([LTO support is not enabled for this target.]) AC_MSG_ERROR([LTO support is not enabled for this target.])
fi fi
......
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> 2010-05-17 Jan Hubicka <jh@suse.cz>
* cgraph.c (cgraph_create_virtual_clone): Only check * cgraph.c (cgraph_create_virtual_clone): Only check
......
...@@ -1891,12 +1891,14 @@ powerpc-*-darwin*) ...@@ -1891,12 +1891,14 @@ powerpc-*-darwin*)
*-darwin[0-6]*) *-darwin[0-6]*)
;; ;;
esac esac
lto_binary_reader=lto-macho
extra_headers=altivec.h extra_headers=altivec.h
;; ;;
powerpc64-*-darwin*) powerpc64-*-darwin*)
tm_file="${tm_file} ${cpu_type}/darwin8.h ${cpu_type}/darwin64.h" tm_file="${tm_file} ${cpu_type}/darwin8.h ${cpu_type}/darwin64.h"
extra_options="${extra_options} ${cpu_type}/darwin.opt" extra_options="${extra_options} ${cpu_type}/darwin.opt"
# We're omitting t-darwin8 to avoid building any multilibs # We're omitting t-darwin8 to avoid building any multilibs
lto_binary_reader=lto-macho
extra_headers=altivec.h extra_headers=altivec.h
;; ;;
powerpc*-*-freebsd*) powerpc*-*-freebsd*)
......
...@@ -1460,8 +1460,9 @@ darwin_asm_named_section (const char *name, ...@@ -1460,8 +1460,9 @@ darwin_asm_named_section (const char *name,
obstack_grow (&lto_section_names_obstack, "\\0\"\n", 4); obstack_grow (&lto_section_names_obstack, "\\0\"\n", 4);
/* Output the dummy section name. */ /* Output the dummy section name. */
fprintf (asm_out_file, "\t.section %s,__%08X,regular,debug\t# %s\n", fprintf (asm_out_file, "\t# %s\n", name);
LTO_SEGMENT_NAME, lto_section_names_offset, 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 /* Update the offset for the next section name. Make sure we stay
within reasonable length. */ within reasonable length. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment