I am thinking of extending the *.opt machinery (ie the
gcc/opt-functions.awk gcc/optc-gen.awk gcc/opth-gen.awk files) to
offer some GCC options which can be disabled or enabled by an
appropriate configure flag.

More precisely, configure can generate HAVE_* and ENABLE_* flags
(usually in the gneerated $GCCBUILD/gcc/auto-host.h). My intent is to
hack so that the code corresponding to some flags (eg those marked
with CppCondition(HAVE_FOO) in common.opt) is conditionally generated
with #if defined(HAVE_FOO) && HAVE_FOO!=0 in files
$GCCBUILD/gcc/options.c and $GCCBUILD/gcc/options.h

A typical use could be to provide more expansive optimisations or
analysis. These could be enabled at configure time with
$GCCTOP/configure --enable-foo and then a -fanalys-foo flag is
possible in GCC. Otherwise (if configure got --disable-foo) such a
flag has no sense.

Any comments?

BTW, my copyright assignment (to FSF) has been signed by my
organisation (CEA-LIST where I am employed) and is currently either
flying (by Chronopost express) above the atlantic, or pehaps soon
arrived in Boston at FSF (but since it is Thankgiving I could expect
some delay).  Hence, I believe I can now legally submit patches which
exceed 10 lines.



-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/ 
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 
8, rue de la Faïencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***

Reply via email to