32-bit application on T1 SPARC processor
Hello,
we are currently using SunStudio 11 on a SPARC IIIi (sun4u) to develop 32-bit and 64-bit application and we would like to move to a SPARC T1 (sun4v) machine e.g. T2000.
Is the SunStudio 11 C++ compiler on a SPARC T1 able to generate 32-bit code that can run on all the members of the UltraSPARC family (sun4u) when compiled without specific -xarch / -xtarget options?
Can the 64-bit code (compiled with xarch=v9 option) run on all the members of the UltraSPARC family (e.g. UltraSPARC III, UltraSPARC IIIi, UltraSPARC IV)?
Thanks in advance
[581 byte] By [
mauro@suna] at [2007-11-27 1:27:56]

# 1
Hi Mauro,
Yes, you can develop and run 32 bit applications on the T1.
You should always specify the xarch and xtarget flags for the minimum hardware level you support, which will give you the best possible generated code for at least that level of hardware.
Yes, you can compile as v9 code and run on other UltraSPARC machines - just be sure to set the xtarget option so that you're sure of what code will be generated.
The only thing you really have to be careful of is that only Solaris 10 (or newer) will run on the T1. If you intend of deploying on older Solaris versions you'll need to compile your shipping code on the oldest version of Solaris (+ any patches you require, which MUST be communicated to your customers) you with to deploy on - and again, specify xarch and xtarget for the oldest hardware you will support. This doesn't stop you from developing on the newer Solaris versions, but your release builds should be built on the older Solaris versions.
Michael
# 2
Michael,
ok, thanks for your advises.
Are you aware of any way to install Solaris 9 on a T1 box and so deploy 32-bit application that can run on Solaris 9+10? Are there any patches in order to support this hardware on Solaris 9?
In the case I must use Solaris 10 (instead of Solaris 9) on a T10 box to deploy my 32-bit application by using the xarch=generic, are the deployed 32-bit applications compatible and runnable on Solaris 9 OS in any sun4u hardware (e.g Solaris 9 on a UltraSparc IIIi processor)?
Mauro
# 3
Hi Mauro,
Solaris 9 is not supported on the T1 (Solaris 10 11/06 or newer is required).
There's no safe way to develop on Solaris 10 and deploy on Solaris 9. Chip architecture revision is not the problem, rather the issue is that the Solaris binary compatibility guarantee only works for backward compatibility, not forward compatibility.
In your scenario, you'd need to either only support Solaris 10 on UltraSPARC IIIi or better, or you'd need to do your production builds on a Solaris 9 machine so that you're able to deploy on Solaris 9 or higher.
The way we work is to do most of our Solaris development and debugging on Solaris 10 x86, then compile (and test) our production builds on Solaris 9 SPARC.
What we state to our customers as minimum requirements is Solaris 9 (SPARC) or 10 (also SPARC) + any OS patches required by Studio 11 at the time that we build - we supply the list of required patches and their revisions.
We only apply OS patches to production build machines patches every six months so that we don't annoy our customers too much by requiring them to chase the latest patch releases.
This has given us the ability to develop and debug using technologies like dtrace, and take advantage of cheap x86 hardware to remove load from our build servers.
So... I'd suggest that you keep your old UltraSPARC IIIi machine running Solaris 9 around to do productions builds, and let your developers use your new T1-based machine running Solaris 10 to develop and test your code.
Michael
# 4
> Is the SunStudio 11 C++ compiler on a SPARC T1 able
> to generate 32-bit code that can run on all the
> members of the UltraSPARC family (sun4u) when
> compiled without specific -xarch / -xtarget options?
The default is -xarch=generic,
and that code will run on any UltraSPARC machine.
It will also run on the new SPARC64 VI machines.
> Can the 64-bit code (compiled with xarch=v9 option)
> run on all the members of the UltraSPARC family (e.g.
> UltraSPARC III, UltraSPARC IIIi, UltraSPARC IV)?
Yes, -xarch=v9 is the same as -xarch=generic64,
and again that code will run on all the UltraSPARCs
and the new SPARC64 VI machines.
As Michael already replied,
the OS version is often more of a problem for portability.
The programs compiled on Solaris 10
usually will not run on Solaris 9,
but the other way works fine.
Peter.