From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5798 invoked by alias); 28 Oct 2011 15:48:25 -0000 Received: (qmail 5756 invoked by uid 22791); 28 Oct 2011 15:48:22 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 28 Oct 2011 15:48:08 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1RJof9-0005x5-2X from joseph_myers@mentor.com ; Fri, 28 Oct 2011 08:48:07 -0700 Received: from digraph.polyomino.org.uk ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 28 Oct 2011 16:48:04 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.74) (envelope-from ) id 1RJof6-0001dl-9Y; Fri, 28 Oct 2011 15:48:04 +0000 Date: Fri, 28 Oct 2011 15:56:00 -0000 From: "Joseph S. Myers" To: Richard Guenther cc: gcc-patches@gcc.gnu.org, Jan Hubicka , Diego Novillo Subject: Re: [PATCH][2/n] LTO option handling/merging rewrite In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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: 2011-10/txt/msg02682.txt.bz2 On Fri, 28 Oct 2011, Richard Guenther wrote: > + /* Fallthru. */ > + case OPT_fPIC: > + case OPT_fpic: > + case OPT_fpie: > + case OPT_fcommon: > + case OPT_fexceptions: > + append_option (decoded_options, decoded_options_count, foption); > + break; No doubt this is what the previous code did, but in this case shouldn't "union" mean the biggest PIC status of any file wins (thus, if -fPIC was the PIC option that actually had effect on some object, that wins over an explicit -fno-PIC or -fpic on another object)? In general whether the options are positive or negative matters, and I don't see that handled here. (Actually, maybe the smallest PIC status should win - i.e. if any object is not PIC then the final code can be presumed to be non-PIC.) (Using Negative in .opt files for groups of options such as -fPIC/-fpic would ensure that at most one survives from any one object, but you still need to work out what you want to do for merging.) -- Joseph S. Myers joseph@codesourcery.com