This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: gnerating deps with cpp
- To: vsecarin at ParadigmGeo dot com
- Subject: Re: gnerating deps with cpp
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 04 Nov 2000 00:38:49 -0200
- Cc: gcc-bugs at gcc dot gnu dot org
- Organization: GCC Team, Red Hat
- References: <3A01D2B3.633F35CD@Calgary.ParadigmGeo.com>
On Nov 2, 2000, Victor Secarin <vsecarin@ParadigmGeo.com> wrote:
> I am using gcc 2.95.2 and the cpp that comes with it.
> When I compile, the compiler defines __GNUC__ ; however, if I generate
> deps with cpp (rather than with gcc -M) then I need to define __GNUC__
> by hand (or else my header files will work differently which of course
> is bad).
> Is there a reason?
Note that there are two different programs named `cpp' in GCC 2.95.2.
One is an internal program, installed inside gcc-lib just like `cc1'
and `cc1plus', that are supposed to be called only by the compilation
driver, called `gcc', that runs it with all the appropriate flags,
including the ones that defines pre-defined symbols. The other,
installed in the `bin' directory, is a driver just like `gcc', that
figures out the appropriate set of flags and calls the internal
program.
Some people have the bad habit of using the former instead of the
latter. Sometimes, you'll even find links to the former in /lib.
This is certainly a bad idea. Make sure you use the `cpp' driver, not
the internal program.
IIRC, In the development tree, the internal preprocessor program was
renamed to `cpp0', to avoid this kind of confusion.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me