From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Clifton To: neilb@earthling.net Cc: gcc@gcc.gnu.org, cgd@sibyte.com Subject: Re: [RFC] Let's kill specs, completely rewrite gcc.c Date: Mon, 08 Jan 2001 11:54:00 -0000 Message-id: <200101081954.LAA04627@elmo.cygnus.com> X-SW-Source: 2001-01/msg00365.html 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