This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Convert a29k to new target CPP builtins
David O'Brien wrote:-
> On Fri, May 10, 2002 at 07:59:08AM +0100, Neil Booth wrote:
> > I think rather than TARGET_REGISTER_CPP_BUILTINS, it's best to have
> > two subcategories (maybe a third?) of TARGET_OS_CPP_BUILTINS and
> > TARGET_CPU_CPP_BUILTINS. This should allow us to get rid of some or
> > all of the #undef tangle in the headers (as this patch does for a29k).
>
> I am a little behind with the state of 3.2; so if this is already done,
> please forgive me.
>
> What I need for FreeBSD is both MI and MD OS_CPP_BUILTINS.
> In config/freebsd{,-spec}.h I set things true for all FreeBSD platforms.
> We are Unix, __FreeBSD__ should be defined, etc. I also need the ability
> in say config/sparc/freebsd.h that in addition to the above, I need
> __sparc64__ always defined.
>
> Can you expand your work to allow this?
The macro names have changed, but the stuff is done (see alpha/alpha.h
and other headers in that directory for a fairly complete example).
Assuming all your MD-files include the MI header (presumably
config/freebsd.h) at some stage or other, have that define, say,
TARGET_FREEBSD_CPP_BULITINS, and then in config/*/freebsd.h have
#define TARGET_OS_CPP_BUILTINS \
/* Anything MD here */ \
TARGET_FREEBSD_CPP_BUILTINS
So I think it's easy to do what you want. This uses C code, rather
than string literals, so it's easy to be very precise.
Neil.