diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2015-12-11 16:52:16 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2015-12-11 16:52:16 -0800 |
commit | 8c11e021a8412d53ae01d351e66ebc07267a3ad9 (patch) | |
tree | 2e0b22ddb2572f706c96a076d1bff9c48f67f6d8 | |
parent | 513f4a0a8f68491995c7a6a3594c51b6ab84a3a1 (diff) |
sun.cf: Sun Studio 12.0 & later compilers prefer -m32/-m64
Use those flags instead of -xarch when the compiler is new enough
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | sun.cf | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -737,13 +737,23 @@ XCOMM SunPro C++ CplusplusCompilerMajorVersion./**/CplusplusCompilerMinorVersion # define DefaultCCOptions -pipe # endif # else /* OSMajorVersion >= 5*/ -# ifndef DefaultXArchOptions +# ifndef DefaultXArchOptions +# if ((CCompilerMajorVersion > 5) || \ + (CCompilerMajorVersion == 5) && (CCompilerMinorVersion >= 9)) + /* Sun Studio 12.0 (cc 5.9) or later */ +# if (defined(Sparc64Architecture) || defined(AMD64Architecture)) +# define DefaultXArchOptions -m64 +# else +# define DefaultXArchOptions -m32 +# endif +# else # ifdef Sparc64Architecture # define DefaultXArchOptions -xarch=v9 # elif defined(AMD64Architecture) # define DefaultXArchOptions -xarch=generic64 # else # define DefaultXArchOptions /* */ +# endif # endif # ifndef DefaultCCOptions # define DefaultCCOptions -Xa -v DefaultXArchOptions -z lazyload -z combreloc -xstrconst -xildoff |