This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [driver, LTO Patch]: Resurrect user specs support


On Mon, 21 May 2012, Christian Bruel wrote:

> 1) Lazily check the flag validation until all command line spec files
> are read. For this purpose, 'read_specs' records specs, to be analyzed
> with 'file_spec_p'. Such flags have 'live_cond' = SWITCH_USER

I like the idea of allowing flags mentioned in user specs but not other 
specs - but not the implementation using this new live_cond.  There are a 
lot of places in gcc.c that set "validated", and I can't convince myself 
that this implementation will ensure they all take correct account of 
where the relevant spec (if any) came from without causing any other 
change to how the driver behaves.  For example, I don't see any change to 
the setting of "validated" for %< and %> in do_spec_1 to account for where 
the spec came from.

Instead, I think that any function that sets "validated" based on a spec 
should be passed the information about whether it's a user spec or not.  
So validate_all_switches would need to pass that down to 
validate_switches_from_spec, for example - and do_spec_1 would also need 
to get that information.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]