Sun Studio compiler upgrade generates platform flag warnings
3 years ago
Originally Published: 2010-08-25
Article Number
000065398
Issue
Sun Studio compiler upgrade generates platform flag warnings
cc:warning:-xarch=v8plus is not recommended. Use -m32 -xarch=sparc instead.
Cause
 Some compiler platform flags changed in Sun Studio 12:

http://docs.sun.com/app/docs/doc/820-4155

Sun[tm] Studio 12: C++ 5.9 Compiler Readme

C. New and Changed Features

------------------------

A New Way To Specify 32-bit or 64-bit Address Model

You no longer need use the -xarch option to specify a 32-bit or 64-bit address model (LP64 versus ILP32). Two new options make it easier:

-m32 specifies the ILP32 model: 32-bit ints, longs, and pointer types.

-m64 specifies the LP64 model: 32-bit ints, 64-bit longs and pointers types. (Note that -m64 is the default on 64-bit Linux platforms.)

------------------------

Deprecated -xarch Flags and Their Replacements on SPARC Only

Use -xarch=sparc in place of -xarch=v8plus

Use -xarch=sparcvis in place of -xarch=v8plusa

Use -xarch=sparcvis2 in place of -xarch=v8plusb

Use -xarch=sparc -m64 in place of -xarch=v9

Use -xarch=sparcvis -m64 in place of -xarch=v9a

Use -xarch=sparcvis2 -m64 in place of -xarch=v9b


Notes
You can safely ignore the "cc:warning:-xarch=v8plus is not recommended. Use -m32 -xarch=sparc instead." warning, since this only indicates a new way to specify the platform.
In general, the your makefile should use the same flags as our sample makefiles. In this case, however, the you should use -xarch=sparc in place of -xarch=v8plus, to avoid the warning that the new compiler is giving.