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...
http://gcc.gnu.org/ml/gcc-testresults/2011-03/msg01124.html 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? Jack 2011-03-13 Jack Howarth <howa...@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. Index: configure.ac =================================================================== --- configure.ac (revision 170924) +++ 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 - *-apple-darwin* | *-cygwin* | *-mingw*) ;; + *-cygwin* | *-mingw*) ;; # On other non-ELF platforms, LTO has yet to be validated. *) enable_lto=no ;; esac