From patchwork Mon Mar 14 00:57:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jack Howarth X-Patchwork-Id: 86653 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 2EE30B6EF7 for ; Mon, 14 Mar 2011 11:57:50 +1100 (EST) Received: (qmail 16447 invoked by alias); 14 Mar 2011 00:57:47 -0000 Received: (qmail 16385 invoked by uid 22791); 14 Mar 2011 00:57:46 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from bromo.med.uc.edu (HELO bromo.med.uc.edu) (129.137.3.146) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Mon, 14 Mar 2011 00:57:41 +0000 Received: from bromo.med.uc.edu (localhost.localdomain [127.0.0.1]) by bromo.med.uc.edu (Postfix) with ESMTP id 63DB0B2DE2; Sun, 13 Mar 2011 20:57:39 -0400 (EDT) Received: (from howarth@localhost) by bromo.med.uc.edu (8.14.3/8.14.3/Submit) id p2E0vdjd015473; Sun, 13 Mar 2011 20:57:39 -0400 Date: Sun, 13 Mar 2011 20:57:39 -0400 From: Jack Howarth To: gcc-patches@gcc.gnu.org Cc: mikestump@comcast.net, iains@gcc.gnu.org, steven@gcc.gnu.org, hubicka@ucw.cz Subject: [PATCH] 'Fix' PR48086 by disabling LTO on darwin Message-ID: <20110314005739.GA15471@bromo.med.uc.edu> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 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