I use -xtarget=native when i compile programs for my pc, because it expands in to -xarch, -xchip and -xcache suitable for my system. For optimized compiling i use -fast. This option already contains -xtarget=native. For 64-bit programs -xtarget=native64. If you want to see expanded values just use -dryrun. I dont know if this is best way but it works fine.
Edit:
My cpu:
Status of virtual processor 0 as of: 04/23/2007 11:20:59
on-line since 04/23/2007 10:16:17.
The sparcv9 processor operates at 1503 MHz,
expanded values:
-xtarget=native:
-xarch=v8plusb -xcache=64/32/4:1024/64/4 -xchip=ultra3i
-xtarget=native64:
-xarch=v9b -xcache=64/32/4:1024/64/4 -xchip=ultra3i
Message was edited by:
Olda79
2Olda79
> For 64-bit programs -xtarget=native64
For Sun Studio 12, please, use -m64 to get 64bit code.
For this particular case you should use -xtarget=native -m64 combo.
2RobGiltrap
> Unfortunately I'm compiling for machines that are not mine. I'll just be sending the binary off to others to test.
You can ask them to run "fpversion" binary from your EA bits.
For Sparc VI I believe the right target will be -xtarget=sparc64vi though I'm not sure it will work in EA perfectly right.
regards,
__Fedor.
Chris,
Unfortunately the READMEs / Release Notes in SS12 EA mainly point me to the SS11 documentation, which isn't entirely surprising since it is not GA software yet. I can't find anything else of use in the documentation provided.
If someone from Sun would just answer if the Barcelona processor has a specific -xchip option and if so what they are, then that is all I need.
I will try -xtarget=sparc64vi as you suggest Fedor
Thanks, Rob.