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: [PATCH] always define __sparc64__ on ultrasparc


On Thu, May 16, 2002 at 09:08:24PM -0700, David S. Miller wrote:
>    Since __sparc64__ is in the compilers namespace, I don't think this patch
>    will cause a problem for anyone.
>    
> The standard thing to do is use __sparc__ && __arch64__, __sparc64__
> does not exist.

Where does __arch64__ come from?  I only see it used in config/sparc, so
I wouldn't say it is a GCC standard.  I don't see it being used by SunPro
5.0 either.

$ cc -# foo.c
/opt/SUNWspro/bin/../SC5.0/bin/acomp -i foo.c -y-fbe -y/opt/SUNWspro/bin/../SC5.0/bin/fbe -y-xarch=v7 -y-o -yfoo.o -y-s -y-verbose -Qy -D__SunOS_5_8 -D__SUNPRO_C=0x500 -D__SVR4 -D__unix -D__sun -D__sparc -D__BUILTIN_VA_ARG_INCR -Xa -D__PRAGMA_REDEFINE_EXTNAME -Dunix -Dsun -Dsparc -D__RESTRICT -I/opt/SUNWspro/SC5.0/include/cc "-g/opt/SUNWspro/bin/../SC5.0/bin/cc -c "

$ cc -# -xarch=v9 foo.c
/opt/SUNWspro/bin/../SC5.0/bin/acomp -i foo.c -y-fbe -y/opt/SUNWspro/bin/../SC5.0/bin/fbe -y-xarch=v9 -y-o -yfoo.o -y-s -y-verbose -Qy -D__SunOS_5_8 -D__SUNPRO_C=0x500 -D__SVR4 -D__unix -D__sun -D__sparcv9 -D__sparc -D__BUILTIN_VA_ARG_INCR -Xa -D__PRAGMA_REDEFINE_EXTNAME -Dunix -Dsun -Dsparc -D__RESTRICT -I/opt/SUNWspro/SC5.0/include/cc -xarch=v9 -fparam_ir "-g/opt/SUNWspro/bin/../SC5.0/bin/cc -xarch=v9 -c "

> I would recommend, however, that these two systems stop making use of
> __sparc64__ and use __arch64__ instead.  If you look, that is what the
> generic Sparc backend and the floating point headers, use to test this.

As Jason mentioned, in BSD'ville, the platform's name is always defined.
We test this this in many places thru out /usr/src.


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