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
jos...@codesourcery.com

Reply via email to