This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Let's kill specs, completely rewrite gcc.c
- To: neilb at earthling dot net
- Subject: Re: [RFC] Let's kill specs, completely rewrite gcc.c
- From: Nick Clifton <nickc at redhat dot com>
- Date: Mon, 8 Jan 2001 11:54:36 -0800
- CC: gcc at gcc dot gnu dot org, cgd at sibyte dot com
Hi Neil,
: I would like to suggest a different approach, along the following
: rough lines:
This sounds like a good idea to me.
: 7) Each compiler has a hook, and it is passed the flagged command-line
: argument list from 4). This, and the usage counts in 4), makes it
: easy to do cleanly extra processing of the kind currently handled
: by specs like
:
: %{ffast-math:-D__FAST_MATH__}
: %{MMD:-MM -MF %b.d}
:
: At the same time, the compiler-specific hook extracts all the
: switches flagged for use by its compiler, builds the relevant
: command line, and invokes its compiler.
The compiler specific hook will also need to call a backend specific
hook, since targets can have target-specific and language-specific
command line option processing requirements. Eg certain target
specific options may be incompatible with each other, or certain
options may require that certain strings get -D defined to the
preprocessor.
There is still a need for permanent run-time configuration of command
line options. SPEC scripts used to be able to do this, but if we do
not support them, then we will need to provide another mechanism.
Perhaps a new command line option which takes a file name argument,
reads the file, parses it and adds the contents as new entries in the
builtin command line option table. Possibly there should be an
environment variable which would have the same effect as well.
Cheers
Nick