This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [3.1-branch PATCH] fix mips CPP size specs for MEABI.
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- Cc: Eric Christopher <echristo at redhat dot com>, cgd at broadcom dot com,Mark Mitchell <mark at codesourcery dot com>,"gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>,"aoliva at gcc dot gnu dot org" <aoliva at gcc dot gnu dot org>
- Date: Sun, 5 May 2002 15:12:51 -0700
- Subject: Re: [3.1-branch PATCH] fix mips CPP size specs for MEABI.
- References: <yov5y9fatjxj.fsf@broadcom.com> <165730000.1019844797@gandalf.codesourcery.com> <yov5vgaetizv.fsf@broadcom.com> <20020426205837.GA14461@daikokuya.demon.co.uk> <1019875080.3713.38.camel@ghostwheel.cygnus.com> <20020427063902.GA21121@daikokuya.demon.co.uk> <20020504201222.GA15895@daikokuya.demon.co.uk> <20020504203201.GB2088@codesourcery.com> <20020504204417.GA16459@daikokuya.demon.co.uk>
On Sat, May 04, 2002 at 09:44:17PM +0100, Neil Booth wrote:
> Zack Weinberg wrote:-
>
> > > OK, I've done it with the patch below. It should now be trivial
> > > to handle target-specific CPP built-in macros.
> >
> > This is going to cause problems for front ends that don't link against
> > cpplib. It needs to be handled more like the hooks to define target-
> > specific pragmas.
>
> Ah yes, once the target hooks are actually written. Sigh.
>
> I've never looked at how the pragmas are done. It appears that it's
> through a whole bunch of macros and conditional compilation, right?
Right. The callbacks live in a file conventionally named
config/ARCH/ARCH-c.c, and get registered by the macro
REGISTER_TARGET_PRAGMAS, which is called from init_pragma() in
c-pragma.c. I don't think there is anything terribly wrong with this
scheme. To duplicate it for target #defines, you could just create a
macro called REGISTER_TARGET_DEFINES called in place of your target
hook.
zw