This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [RFC] Convert a29k to new target CPP builtins


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).

Yes!  Richard Earnshaw and I were just discussing that yesterday, in
fact :-)

 > Thoughts?

It would be nice if, in addition to the static predefines, there was
a corresponding spec for OS-specific CPP stuff (rather than having
each target have to stuff it into CPP_SPEC).

 > Index: gcc/config/a29k/a29k.h
 > --- gcc/config/a29k/a29k.h	12 Mar 2002 05:27:44 -0000	1.34
 > +++ gcc/config/a29k/a29k.h	10 May 2002 06:50:40 -0000
 > @@ -23,7 +23,12 @@ Boston, MA 02111-1307, USA.  */
 >  
 >  /* Names to predefine in the preprocessor for this target machine.  */
 >  
 > -#define CPP_PREDEFINES "-D_AM29K -D_AM29000 -D_EPI -Acpu=a29k -Amachine=a29k"
 > +#define TARGET_CPU_CPP_BUILTINS		\
 > +	builtin_define ("_AM29K");	\
 > +	builtin_define ("_AM29000");	\
 > +	builtin_define ("_EPI");	\
 > +	builtin_assert ("cpu=29k");	\
 > +	builtin_assert ("macine=a29k");
                         ^^^^^^
			 typo

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>


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