This is the mail archive of the 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]

PATCH (trunk rev.119231): ability to disable an option at configure time


As I proposed on and it could be useful to
propose some options (flags at GCC runtime) which can be fully
disabled at configure time.

Also the Condition keyword in *.opt file seems never used anymore, but
does not disable entirely an option when the preprocessor condition is
false. (the generated flag variables in $GCCBUILD/gcc/options.h still
exist, and the --help option mentions such a flag). Since Condition is
not used, I suggest to mark it as obsolete.

The motivation for such a feature is to permit some expensive
processing in GCC to be enabled or disabled at configure time, and
when it is enabled, to offer an additional GCC?runtime flag which
triggers it. As a simplistic scenario, the --enable-check=tree
configure option enable the build of $GCCBUILD/gcc/tree-browser.o
(which is not even built from $GCCTOP/gcc/tree-browser.c without this
--enable-check!), this tree-browser.o offers a browse_tree function,
and we could in that case only propose a -fbrowse-tree flag which
calls this function at several interesting points in the compiler. If
configured without any --enable-check the compiler won't even accept
such a -fbrowse-tree flag

I intend to propose in the future another patch which make a real use
of the CppCondition offered here.

The attached patch to rev. 119231 of GCC trunk does only provide
option handling (and does not propose its use, as illustrated
above). In addition it changes the generted comment in generated
options.[ch] files (which mentions an which don't exist
anymore). Bootstraped with --disable-multilib --enable-languages=c on
x86_64-unknown-linux-gnu (Debian/Sid/AMD64)

Regarding legalese: my copyright assignment (signed for CEA-LIST my
employer to FSF) has been sent and the FSF (J.Jacobson) should have
recieved it before monday 27th november 2006 evening. Jonas Jacobson
have all the relevant details.

Changelog follows my signature


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} ***

*********************************** Changelog

2006-11-26  Basile Starynkevitch  <>

	* gcc/doc/options.texi: Condition is marked as obsolete,
	and added a description of CppCondition for flags
	which can be entirely disabled at configure time.
	* gcc/optc-gen.awk: generated comment tells about optc-gen.awk.
	Added handling of CppCondition.
	* gcc/opth-gen.awk:? generated comment tells about opth-gen.awk.
	Added handling of CppCondition.

Attachment: gcc-trunk-rev119231-patch-cppoption.diff
Description: Text document

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