This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: specs file method for detecting when preprocessor is being called for C++?
- To: gcc at gcc dot gnu dot org
- Subject: Re: specs file method for detecting when preprocessor is being called for C++?
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Date: Sat, 17 Mar 2001 18:30:18 +0000
- References: <20010317123600.A8412@redhat.com>
Have you noticed the file cp/lang-specs.h? Does that help?
Neil.
Christopher Faylor wrote:-
> I'm probably missing something obvious, but I can't find any method for
> setting up a rule which adds additional options to "cpp" when a user is
> invoking g++.
>
> I've tried something like:
>
> %{Dcplusplus:blah}
>
> but that doesn't work.
>
> Can anyone tell me if this is possible? I'd like to be able to do this
> with both 2.95.3 and gcc 3.0, if possible. I don't know if the methods
> would be different for each.
>
> My reason for wanting this is that I want to completely separate the
> include file parsing for -mcygwin/-mno-cygwin. In the -mno-cygwin case
> the g++ include file search path should include /usr/include/mingw/g++
> in the -mcygwin case, it should include /usr/include/g++.
>
> I can't seem to find any way to add these include search paths only when
> g++ is invoked.
>
> Any pointers are appreciated.
>
> cgf