Re: Compiler options SS11



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?

No, just the generic type (sparc or x86).


So are there any compiler flags that determine whether its for sparc or
x86? or just compiling it on AMD makes it portable to any x86?

Thanks MAN!!, yes my new AMD m/c still has to be set properly to read
those man pages...hence I was looking for something online, I got it on
the SUN's webpages...

Thanks
-jp

Ian Collins wrote:
jpjlrc@xxxxxxxxx wrote:
Thanks Chris.

Please don't top-post.

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.

Only use these if you are targeting a specific hardware platform,
otherwise leave them alone.

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?

No, just the generic type (sparc or x86).

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.

Same as sparc, you will get a generic 32 bit x86 executable that can be
used on any x86 or x64 platform.

--
Ian Collins.

.