This is the mail archive of the
mailing list for the GCC project.
Re: 3.0.1 & Solaris 8
- To: Bruce Korb <bkorb at veritas dot com>
- Subject: Re: 3.0.1 & Solaris 8
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Wed, 8 Aug 2001 09:31:31 +0200
- Cc: gcc <gcc at gcc dot gnu dot org>
- References: <3B7061EF.F0AC9389@veritas.com>
- Reply-To: Jakub Jelinek <jakub at redhat dot com>
On Tue, Aug 07, 2001 at 02:47:27PM -0700, Bruce Korb wrote:
> I was looking at GCC on Solaris, when I just noticed something.
> gcc -mcpu=v9 causes __sparc_v9__ to be defined, but not __sparcv9.
> I'm sure somewhere in the archives this must have been discussed,
> but it is clearly wrong. _all_ the system headers depend upon
> __sparcv9 being defined for 64 bit land. Maybe it isn't ready for
> prime time yet, but then I would think you would just suppress the
> "-mcpu=v9" thing instead of the define. It seems to me we should
> add __sparcv9 to the specs for Solaris8, or drop the mcpu.
No, -mcpu=v9 means generate code for SPARC v9 chip, it does not say anything
about whether it should be 32-bit or 64-bit.
If you want 64-bit code, you should use -m64 option (unless 64-bit is the
default, depending on how gcc was configured).
And in that case, __sparcv9 will be defined (on Solaris, in Linux
__arch64__). -m32 -mcpu=v9 just generates 32-bit code which can use
instructions which are not present in SPARC v8 ISA.