This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
spec question
- To: GCC Hackers <gcc at gcc dot gnu dot org>
- Subject: spec question
- From: Tom Tromey <tromey at cygnus dot com>
- Date: 06 Mar 2000 11:25:04 -0700
- Reply-To: tromey at cygnus dot com
gcj might run cc1 when linking -- if the user gave the `--main' option
we create a simple `.i' file, compile it, and link it in.
The spec for this looks like this:
const char jvgenmain_spec[] =
"jvgenmain %{D*} %i %{!pipe:%umain.i} |\n\
cc1 %{!pipe:%Umain.i} %1 \
%{!Q:-quiet} -dumpbase %b.c %{d*} %{m*} %{a*}\
%{g*} %{O*} \
%{v:-version} %{pg:-p} %{p} %{f*}\
%{aux-info*}\
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
%{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%Umain.s}} |\n\
%{!S:as %a %Y -o %d%w%umain%O %{!pipe:%Umain.s} %A\n }";
As you can see we pass all `-f' options (the `%{f*}') to cc1. We have
to do this because sometimes a -f option is important to compilation.
However, this causes problems if the user passes an unrecognized -f
option (or option which is transformed into a -f option) to gcj:
creche. gcj --CLASSPATH=. -o L --main=latin1 latin1.java
cc1: Unrecognized option `-fCLASSPATH=.'
I'd like to either:
1. Arrange for gcj-specific -f options not to be passed to cc1
(I couldn't find a way to do this.)
2. Tell cc1 that unrecognized -f options should not cause a message to
be printed.
Am I missing something? Is there a way to do what I want? If not,
any preferences for what I do implement?
Tom