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

Re: How to add a flag to a tool if a particular define is present on the driver command line (using spec files)


asharif <asharif@gcc.gnu.org> writes:

> Up untilÂhttp://gcc.gnu.org/viewcvs?view=revision&revision=163770, you
> could have a line like this in the gcc driver spec file:
>
> cc1:
> %(cc1_cpu) %{profile:-p} %{DFOO: -foo}
>
> This would detect if -DFOO was given on the driver command line and
> would pass in -foo to cc1.
>
> However, after r163770 this stopped working.
>
> Is there a way to do this using current trunk (i.e., add a flag to a
> tool if a particular define is present on the gcc driver command
> line)? Was the old way broken or was there a bug introduced with
> revision r163770?

This doesn't work when preprocessing and compiling are separated, which
means that it doesn't work with distcc or ccache.  I don't see any way
to fix that, so I don't think we're likely to resurrect this
functionality.

Ian


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