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]

Re: spec question


Hi Tom,

: 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.)

Neither could I.

: 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?

I would suggest that you implement an extenstion to the spec syntax
like this:

  %{<S}	remove all occurances of S from the command line.
        Note - this option is position dependent.  % commands in the
        spec string before this option will see S, % commands in the
        spec string after this option will not.

This would allow you to build spec strings like this:

  %{<fCLASSPATH=*} %{f*}

Cheers
	Nick

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