__i386__ and cpp

Jim Wilson wilson@cygnus.com
Wed Feb 25 06:39:00 GMT 1998


	__i386__ has been dropped from cpp in 1996. It
	causes a problem for imake since it calls cpp
	directly. It would be nice for egcs 1.0.2 to
	define 386 on all x86 platforms.

This occured because the -Di386 option was moved from CPP_PREDEFINES to
CPP_SPEC, and hence it gets defined only if the gcc driver is called.
It does not get defined if cccp is called directly.

imake assumptions about cpp are in general a problem, since the gcc C
preprocessor doesn't do exactly the same thing as the old unix /lib/cpp command
does.  Also, this assumes that we have a separate preprocessor.  Eventually
we would like to integrate the preprocessor with the cc1 binary, and then
we won't have a separate cccp program anymore.

We could solve these problems by making the cpp program be a shell script
that calls `gcc -E' instead of making cpp be a link to the cccp program.
This script could then do other things to make it look more like the /lib/cpp
command, such as using -traditional, if this is desirable.  This was discussed
a few months ago, on bug-gcc I think.

The other problem with getting -Di386 even when -ansi is specified bothers
me more than the imake problem, and definitely needs to be fixed.

Jim



More information about the Gcc mailing list