Aldy Hernandez <[EMAIL PROTECTED]> writes:
> I've been converting the ppc options to use the .opt machinery, and
> am confused as to how to approach subtargets.
>
> What's the deal with these?
>
> I need options only for certain subtargets.  For example, aix.h has
> some options that should not be available by other targets.
>
> I don't see anything relevant in options.texi, and I don't see any
> converted backend that has this problem.
>
> Should we just include the options for all subtargets, or should we
> add generic functionality (I volunteer if so).

Sorry for the slow answer.  I see Zack has already replied, and I guess
you've long figured this out, but just for the record:

The idea is that you only put the options that apply to all targets
in MACHINE.opt.  If a subtarget has extra options, they should go
in their own .opt file and config.gcc should add those files to
$extra_options.

As for where this documented: well, it's actually in the "Anatomy of
a Target Back End" section (sourcebuild.texi):

    A back end for a target architecture in GCC has the following parts:
    [...]
    @item
    An optional @[EMAIL PROTECTED] file in the @[EMAIL PROTECTED]
    directory, containing a list of target-specific options.  You can also
    add other option files using the @code{extra_options} variable in
    @file{config.gcc}.  @xref{Options}.

...but as so often with gcc documentation, you can probably only find
it if you already know what it says.

Richard

Reply via email to