diff mbox

renable lto on darwin9

Message ID 20110316144908.GA8523@bromo.med.uc.edu
State New
Headers show

Commit Message

Jack Howarth March 16, 2011, 2:49 p.m. UTC
The assembler bug in Xcode 3.2.6/4.0 only impacts darwin10, so lto can
be renabled for darwin9 (for which it has been well tested on the regress
server). Re-enabling lto for *-apple-darwin9 on darwin allows us to
continue to monitor the status of darwin lto support while the containerized
lto changes for PR48108 are completed. Okay for gcc trunk and 4.6.0?
      Jack
ps While we could in theory enable it for darwin8 as well, that target is
rather poorly tested compared to darwin9.

2011-03-16  Jack Howarth  <howarth@bromo.med.uc.edu>

	* configure.ac: Re-enable LTO on *-apple-darwin9.
	* configure: Regenerate.

Comments

Richard Biener March 16, 2011, 2:50 p.m. UTC | #1
On Wed, 16 Mar 2011, Jack Howarth wrote:

>   The assembler bug in Xcode 3.2.6/4.0 only impacts darwin10, so lto can
> be renabled for darwin9 (for which it has been well tested on the regress
> server). Re-enabling lto for *-apple-darwin9 on darwin allows us to
> continue to monitor the status of darwin lto support while the containerized
> lto changes for PR48108 are completed. Okay for gcc trunk and 4.6.0?

I'm ok with that if Mike is ok with it.

Thanks,
Richard.

>       Jack
> ps While we could in theory enable it for darwin8 as well, that target is
> rather poorly tested compared to darwin9.
> 
> 2011-03-16  Jack Howarth  <howarth@bromo.med.uc.edu>
> 
> 	* configure.ac: Re-enable LTO on *-apple-darwin9.
> 	* configure: Regenerate.
> 
> Index: configure.ac
> ===================================================================
> --- configure.ac	(revision 171047)
> +++ configure.ac	(working copy)
> @@ -1743,7 +1743,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms b
>    build_lto_plugin=yes
>  ],[if test x"$default_enable_lto" = x"yes" ; then
>      case $target in
> -      *-cygwin* | *-mingw*) ;;
> +      *-apple-darwin9 | *-cygwin* | *-mingw*) ;;
>        # On other non-ELF platforms, LTO has yet to be validated.
>        *) enable_lto=no ;;
>      esac
> 
>
Jack Howarth March 16, 2011, 3:34 p.m. UTC | #2
On Wed, Mar 16, 2011 at 03:50:20PM +0100, Richard Guenther wrote:
> On Wed, 16 Mar 2011, Jack Howarth wrote:
> 
> >   The assembler bug in Xcode 3.2.6/4.0 only impacts darwin10, so lto can
> > be renabled for darwin9 (for which it has been well tested on the regress
> > server). Re-enabling lto for *-apple-darwin9 on darwin allows us to
> > continue to monitor the status of darwin lto support while the containerized
> > lto changes for PR48108 are completed. Okay for gcc trunk and 4.6.0?
> 
> I'm ok with that if Mike is ok with it.
> 
> Thanks,
> Richard.

Richard,
    Thanks. After reviewing my e-mails with the darwin linker developer, I now recall
that when Steve Bosscher implemented lto on darwin and had to resort to placing the gnu lto
sections at the end. I asked the linker developer via radar about this approach.
I was never able to get a clear response on that issue despite a couple attempts. While it is
unfortunate that Apple disabled this feature, it could be considered undefined behavior
in the sense that the mach-o format doesn't define an upper limit for non-relocation
bearing sections. What is annoying is that this approach was declared invalid for mach-o
without proper notification on the original radar. Hopefully Apple can improve its
communication on such issues via radar.
           Jack

> 
> >       Jack
> > ps While we could in theory enable it for darwin8 as well, that target is
> > rather poorly tested compared to darwin9.
> > 
> > 2011-03-16  Jack Howarth  <howarth@bromo.med.uc.edu>
> > 
> > 	* configure.ac: Re-enable LTO on *-apple-darwin9.
> > 	* configure: Regenerate.
> > 
> > Index: configure.ac
> > ===================================================================
> > --- configure.ac	(revision 171047)
> > +++ configure.ac	(working copy)
> > @@ -1743,7 +1743,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms b
> >    build_lto_plugin=yes
> >  ],[if test x"$default_enable_lto" = x"yes" ; then
> >      case $target in
> > -      *-cygwin* | *-mingw*) ;;
> > +      *-apple-darwin9 | *-cygwin* | *-mingw*) ;;
> >        # On other non-ELF platforms, LTO has yet to be validated.
> >        *) enable_lto=no ;;
> >      esac
> > 
> >
Mike Stump March 16, 2011, 6:29 p.m. UTC | #3
On Mar 16, 2011, at 7:49 AM, Jack Howarth wrote:
>  The assembler bug in Xcode 3.2.6/4.0 only impacts darwin10, so lto can
> be renabled for darwin9

> Okay for gcc trunk and 4.6.0?

Ok.  I've now applied the patch to trunk and 4.6.x, thanks.
diff mbox

Patch

Index: configure.ac
===================================================================
--- configure.ac	(revision 171047)
+++ configure.ac	(working copy)
@@ -1743,7 +1743,7 @@  ACX_ELF_TARGET_IFELSE([# ELF platforms b
   build_lto_plugin=yes
 ],[if test x"$default_enable_lto" = x"yes" ; then
     case $target in
-      *-cygwin* | *-mingw*) ;;
+      *-apple-darwin9 | *-cygwin* | *-mingw*) ;;
       # On other non-ELF platforms, LTO has yet to be validated.
       *) enable_lto=no ;;
     esac