This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: How to handle clashes between options for different front ends?
- From: Ian Lance Taylor <iant at google dot com>
- To: brian at shapes dot demon dot co dot uk
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sat, 2 Feb 2013 11:38:21 -0800
- Subject: Re: How to handle clashes between options for different front ends?
- References: <1359831794.3499.51.camel@Gannet.Four>
On Sat, Feb 2, 2013 at 11:03 AM, Brian Drummond
<brian@shapes.demon.co.uk> wrote:
>
> A better one would be to allow the two uses to peacefully coexist. This
> was the case until gcc4.4 or later since neither -P option is new. But
> something seems to have changed in the command line parsing strategy
> since then; I am looking for some idea what changed, and how to modify
> GHDL to fit in with that strategy.
The option processing has been overhauled so that the driver can do
the right thing more often. All the language-specific options are
passed to the AWK script opt-gather.awk. It produces a file
optionlist, which is then processed by additional AWK scripts into
options.h, options.c, and options-save.c.
> So, what mechanism is supposed to route -P<dir> to ghdl or ghdl1, and -P
> alone to the other compilers, and how (in the GHDL front end) could it
> be broken?
Despite my comments about the option processing above, that sounds
like a specs issue. Look in lang-specs.h for your frontend and see
what it does with -P (look for %(P and the like). The specs language
is described at http://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html .
Ian