diff mbox

'Fix' PR48086 by disabling LTO on darwin

Message ID 20110314005739.GA15471@bromo.med.uc.edu
State New
Headers show

Commit Message

Jack Howarth March 14, 2011, 12:57 a.m. UTC
Unfortunately, Apple's assembler programmers overzealously fixed
radar://7920267 by ignoring their own mach-o specifications and blindly
forcing 255 sections regardless of the presence of symbols. This causes
major breakage in the LTO testsuite...


and cripples the use of LTO on significantly large projects as well
as breaking the previously functional lto-bootstrap. Unfortunately
Apple's distribution method for Xcode hamstrings us as well. The
only available dmg's are for Xcode 3.2.2 and 3.2.6. The older Xcode
3.2.2 release is missing critical fixes that FSF gcc 4.6.0 requires
and the only version available via Software Update is now 3.2.6. This
means that new installations would be trapped on the buggy Xcode
3.2.2 release. Also users lucky enough to currently be on Xcode 
3.2.5 could easily accidentally upgrade to Xcode 3.2.6 in a 
Software Update session and be unable to get back to Xcode 3.2.5.
Considering the fragility this introduces in having functional
LTO support on darwin, LTO should be disabled by default again
until we can work around this breakage in the Apple assembler 
for gcc 4.7 and 4.6.1. Bootstrap tested on x86_64-apple-darwin10.

howarth% ./dist/bin/gcc -flto himenoBMTxpa.c
cc1: error: LTO support has not been enabled in this configuration

             Okay for gcc trunk?

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

	PR lto/48086
	* configure.ac: Disable LTO on darwin due to assembler bug
	in Xcode 3.2.6/4.0.
	* configure: Regenerate.
diff mbox


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