This is the mail archive of the gcc-bugs@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: gnerating deps with cpp


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

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