This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to handle clashes between options for different front ends?


On Sat, 2013-02-02 at 11:38 -0800, Ian Lance Taylor wrote:
> On Sat, Feb 2, 2013 at 11:03 AM, Brian Drummond
> <brian@shapes.demon.co.uk> wrote:

> > 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 .
> 

Thanks for such a quick answer!
Here is the complete file ... (shorn of the license) 

--------------------------------------------------------------------------

/* This is the contribution to the `default_compilers' array in gcc.c
for
   GHDL.  */

  {".vhd", "@vhdl", 0, 0, 0},
  {".vhdl", "@vhdl", 0, 0, 0},
  {"@vhdl",
   "ghdl1 %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}", 0, 0, 0},

--------------------------------------------------------------------------

As it has nothing whatsoever to do with options, I had no idea that it
ought to!

I will look at lang-specs from some other front ends and try to
understand the doc you linked. Looks like a good starting point,  but
questions to follow, probably.

One more question for now : has lang-specs been significantly changed in
the 4.4 to 4.7 timeframe?

Thanks again,
- Brian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]