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]

spec question


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

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