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: Manuel LÃpez-IbÃÃez <lopezibanez at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Sun, 3 Feb 2013 16:42:26 +0000 (UTC)
- Subject: Re: How to handle clashes between options for different front ends?
- References: <1359837866.3499.77.camel@Gannet.Four>
> If the scripts are generating incorrect options.c, are they taking
> lang-specs.h files into account or is this purely lang.opt (and/or
> whatever else feeds the awk scripts) that is at fault? There may be new
> things to do in lang.opt for example.
Options are global to the compiler (there is only one cl_options structure), so
different FEs can share the same option as long as the options have identical
properties, including documentation (although the internal behaviour may
differ). For "-P", the Fortran FE will report with --help the documentation of
the C FE.
> ----------------------------------------------------------------------
> -no-line-commandsC ObjC C++ ObjC++ Alias(P)
> -no-line-commandsFortran Alias(P)
> ...
> PC ObjC C++ ObjC++Do not generate #line directives
> PFortran
> Pvhdl Joined-P<dir> Add <dir> to the end of the vhdl library path
> ----------------------------------------------------------------------
Here, the vhdl FE is smashing the documentation and properties of the -P in
other FEs. I think in GCC 4.8, this is detected and an error or warning emitted
when building. If not, please file a bug.
Ideally, GCC should have FE-specific cl_option structures, so each FE will only
see their own cl_option and the common one. Unfortunately, there is no one
working on it and I don't think there will be in the near future.
GCC needs help. If you are interested in making this work, please volunteer to
make it happen.
Cheers,
Manuel.