This is the mail archive of the gcc@gcc.gnu.org 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]

Q: how to sometimes forcebly invoke cc1 thru gcc even without any input files?


Hello All

On the MELT branch, I need sometimes that cc1 be run even if there is no input files. This is an unusual mode, but sometimes needed (This actually is needed to have MELT lisp files translated into C; for reasons not explained here, this is a special mode of my ./cc1 which does that; both MELT lisp input and generated C output are specified thru special -f flags).

So I would like that my gcc command (and hence the installed gcc by the make install target) runs
cc1 -fbasilys=translatefile \
-fbasilys-arg=ana-base.bysl -fbasilys-secondarg=ana-base.c
when gcc is invoked as
gcc -fbasilys=translatefile \
-fbasilys-arg=ana-base.bysl -fbasilys-secondarg=ana-base.c


I could definitely afford a special option, e.g. -fforce-cc1, to be given to gcc, eg
gcc -fforce-cc1 -fbasilys=translatefile \
-fbasilys-arg=ana-base.bysl -fbasilys-secondarg=ana-base.c


The current MELT gcc/Makefile.in just runs cc1 in that case, but I would prefer that the advanced MELT user avoid running cc1 directly and use gcc instead.

What is the best way to achieve that? Where should I patch my gcc/gcc.c file? Does some equivalent of -fforce-cc1 (as a flag to gcc) which force the cc1 to be run already exist?

BTW, I don't understand yet any details regarding spec files.

Regards

PS. The MELT branch has an incomplete doc/melt.texi file.
--
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***


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