public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <joseph@codesourcery.com>
To: Richard Guenther <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org, Jan Hubicka <jh@suse.de>,
	    Diego Novillo <dnovillo@google.com>
Subject: Re: [PATCH][2/n] LTO option handling/merging rewrite
Date: Fri, 28 Oct 2011 15:56:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1110281540080.4908@digraph.polyomino.org.uk> (raw)
In-Reply-To: <alpine.LNX.2.00.1110281339270.26779@zhemvz.fhfr.qr>

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

  parent reply	other threads:[~2011-10-28 15:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-28 12:52 Richard Guenther
2011-10-28 15:20 ` Diego Novillo
2011-10-30 22:30   ` Richard Guenther
2011-10-28 15:56 ` Joseph S. Myers [this message]
2011-10-30  1:13   ` Richard Guenther
2011-10-30 19:01     ` Joseph S. Myers
2011-11-02 11:43   ` Richard Guenther
2023-01-17  9:46     ` Andreas Schwab
2011-10-28 15:59 ` Jack Howarth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.1110281540080.4908@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=dnovillo@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jh@suse.de \
    --cc=rguenther@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).