From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2093 invoked by alias); 16 Dec 2010 13:26:12 -0000 Received: (qmail 1932 invoked by uid 22791); 16 Dec 2010 13:26:11 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM X-Spam-Check-By: sourceware.org Received: from mail-iy0-f175.google.com (HELO mail-iy0-f175.google.com) (209.85.210.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Dec 2010 13:26:07 +0000 Received: by iyj18 with SMTP id 18so1598333iyj.20 for ; Thu, 16 Dec 2010 05:26:05 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.16.75 with SMTP id n11mr6100117iba.106.1292505965352; Thu, 16 Dec 2010 05:26:05 -0800 (PST) Received: by 10.231.15.2 with HTTP; Thu, 16 Dec 2010 05:26:05 -0800 (PST) In-Reply-To: <87pqt1hn1e.fsf@basil.nowhere.org> References: <1292503308-11258-1-git-send-email-andi@firstfloor.org> <87pqt1hn1e.fsf@basil.nowhere.org> Date: Thu, 16 Dec 2010 13:45:00 -0000 Message-ID: Subject: Re: [PATCH 1/2] Fix -fno-lto (PR lto/46905) From: Richard Guenther To: Andi Kleen Cc: gcc-patches@gcc.gnu.org, Andi Kleen , "Joseph S. Myers" Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-12/txt/msg01305.txt.bz2 On Thu, Dec 16, 2010 at 2:20 PM, Andi Kleen wrote: > Richard Guenther writes: > >> On Thu, Dec 16, 2010 at 1:41 PM, Andi Kleen wrote: >>> From: Andi Kleen >>> >>> This fixes PR lto/46905. >>> >>> It's sometimes convenient in large Makefiles to globally enable LTO >>> in CFLAGS, but disable it again for specific files. The simplest >>> way to do that is appending -fno-lto, but that didn't work. >>> Add explicit code to handle this case. >>> >>> Passes bootstrap and full test on x86_64-linux. Ok? >> >> Do you really need the common.opt and opts.c hunks? > > Yes. The previous state without them didn't work. > > I also tried to do it without opts.c, but setting an 0 initialization > value for the -fno-lto entry, but that didn't work either. Huh, that's strange. Joseph, do you have any idea why? Is it because of how flags get passed to collect2? Richard. > -Andi > > -- > ak@linux.intel.com -- Speaking for myself only. >