How to handle clashes between options for different front ends?

Ian Lance Taylor
Sat Feb 2 19:38:00 GMT 2013

On Sat, Feb 2, 2013 at 11:03 AM, Brian Drummond
<> 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 .


More information about the Gcc-help mailing list