This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [driver, LTO Patch]: Resurrect user specs support
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Christian Bruel <christian dot bruel at st dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 22 May 2012 13:52:45 +0000 (UTC)
- Subject: Re: [driver, LTO Patch]: Resurrect user specs support
- References: <4FBA1623.8010703@st.com>
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