Re: Compiler options SS11



On 13 Jan 2007 16:55:03 -0800, jpjlrc@xxxxxxxxx wrote:
Thanks Chris.

Yes I have this application running on Solaris 9 Sparc(32-bit) before,
and I am now recompiling it for Solaris 10 AMD. The main considerations
for me at this point seems to be the -xtarget and -xarch flags.

That's a good point :)

If these flags are not set, does the Sun Studio 11 compiler by default
generate code that is optimised for the current platform on which it is
compiled?

There are at least two different things mentioned above:

* Target platform output.

* Optimization level.

What you should _first_ work to resolve is how to extend the build
process to generate executables for your target platform. Then you
can worry about optimization levels.

The Sun Studio compilers will generate 32-bit output by default, on
both SPARC and x86 platforms. You will have to use one of the 64-bit
specific -xarch=XXX options to select 64-bit output.

All the details about the proper -xarch=xxx and -xtarget=xxx options
are documented in the Sun Studio manuals, but in general you can
mostly get away with:

-xarch=386
Generate 32-bit binaries for x86 platforms.

-xarch=amd64
Generate 64-bit binaries for x86 platforms.

-xarch=v7
Generate 32-bit binaries for SPARC platforms.

-xarch=v9 -xarch=v9a
Generate 64-bit binaries for SPARC platforms.

Note that there are subtle differences between -xarch=v9
and -xarch=v9a, so make sure you read about the two
different options and understand the differences they
have *before* selecting one or the other.

FYI, I didn't set the -xtarget ot -xarch flags for my 32-bit Ultra
Sparc build. Hence wondering...what this mean for S10 AMD.

You don't have to set *any* -xarch=XXX option for 32-bit builds,
because 32-bit builds are the _default_ with Sun Studio compilers.

.



Relevant Pages

  • Re: TCL can do it for me?
    ... >Packages are sometimes binaries, sometimes script only packages. ... >packages which should work on all supported platforms. ...
    (comp.lang.tcl)
  • Re: The future of Linux
    ... Even those two platforms are almost ... With Linux, only the kernel is reasonably consistent. ... > binaries tend to load on most versions, ... It does make distribution of binaries for arbitrary ...
    (comp.os.linux)
  • Re: TCL can do it for me?
    ... Packages are sometimes binaries, sometimes script only packages. ... packages which should work on all supported platforms. ...
    (comp.lang.tcl)
  • Re: how to move to 8.4?
    ... > control for a zillion platforms if no one pays the bill. ... written for portability, wasn't much more than a matter of ... are binaries, they have to be platform specific, but when people ...
    (comp.lang.tcl)
  • Re: [PATCH] x86/PCI: initialize PCI bus node numbers early
    ... On new Intel platforms it's ... PCI node numbers will be 0, when in fact they should be -1 ... initialize it early with a default value of -1. ... overridden later by arch code (e.g. the AMD code). ...
    (Linux-Kernel)