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 Fri, May 17, 2002 at 12:20:39AM -0700, Jason R Thorpe wrote:
> On Fri, May 17, 2002 at 12:08:14AM -0700, David O'Brien wrote:
> 
>  > Why?  As you said:
>  > 
>  >     but the NetBSD convention is to also -D__$(MACHINE_ARCH)__, where
>  >     MACHINE_ARCH == i386, sparc, sparc64, alpha, m68k, sh, whatever.
> 
> When NetBSD's "sparc64" port is running a 32-bit kernel, it reports
> a $(MACHINE_ARCH) of "sparc", not "sparc64".

Ah.  BSD/OS calls this "32-bit sparc_v9".  So many flavors to choose
from. :-)

I'll see if I can find a better knob to use to specify "-D__sparc64__"
in sparc/freebsd.h that is not sensitive to -mcpu.

> NetBSD has 2 variables at play here:
> 	* MACHINE_ARCH -- the "architecture".
> 	* MACHINE -- a specific platform.
...
> 	-mcpu=ultrasparc -m32 .. __sparc__ (and __sparc_v9__)
> 	-mcpu=ultrasparc -m64 .. __sparc64__ (and __sparc_v9__ and __arch64__)
> ...and thus your proposed change would break this for NetBSD.

Thanks for the explanation.


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