This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Using .opt files for target options
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Richard Sandiford <rsandifo at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 14 Mar 2005 21:55:16 -0800
- Subject: Re: Using .opt files for target options
- References: <87hdjf31q0.fsf@firetop.home>
Richard Sandiford <rsandifo@redhat.com> writes:
> The aim of this patch is to extend the front- and middle-end
> options-handling machinery so that it can be used for target
> options as well. In other words, it lets you specify target
> options using target-specific .opt files.
I'm very glad to see this happen. Your code generally looks sound,
and Neil has already approved it, but there's a detail I'd like to
bring up. You've currently got a special case in the flag_var logic
to handle target_flags_explicit. That's fine as far as it goes, but
it doesn't help with anything that's currently being done with
TARGET_OPTIONS, nor with things that are moved out of target_flags
after conversion to an .opt file. Also, it still requires special
handling in OVERRIDE_OPTIONS.
What target_flags_explicit does (assuming OVERRIDE_OPTIONS handles it)
is allow the user to not worry about the order of general and specific
-m options. Really, what we want is to impose a partial ordering on
the -m options, so that general ones (-march= e.g.) are processed
before specific ones (-mgp64 e.g.) I wonder if you have any ideas how
to handle that...?
zw