[PATCH] D86621: [clang][Sparc] Default to -mcpu=v9 for SparcV8 on Solaris
Jessica Clarke via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 1 05:13:49 PDT 2020
jrtc27 added a comment.
Actually, `__sparcv8` is only for V8; if you have 32-bit V9 on Solaris it defines `__sparcv8plus` _instead_:
jrtc27 at gcc-solaris11:~$ /opt/solarisstudio12.4/bin/cc -E - -xarch=v9 -m32 -xdumpmacros </dev/null 2>&1 | grep sparc
#define __sparcv8plus 1
#define __sparc 1
#define sparc 1
In fact, -xarch=v9 + -m32 is a bit weird because -xarch=v9 implies -m64 so the argument order matters, and the modern way to do it is (if you read the man page, -xarch=sparc means V9 and -xarch=v9 is an alias for -m64 -xarch=sparc...):
jrtc27 at gcc-solaris11:~$ /opt/solarisstudio12.4/bin/cc -E - -m32 -xarch=sparc -xdumpmacros </dev/null 2>&1 | grep sparc
#define __sparcv8plus 1
#define __sparc 1
#define sparc 1
(gcc211 on the GCC compile farm; any open-source developer can register, it's not specific to GCC developers despite the name)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86621/new/
https://reviews.llvm.org/D86621
More information about the cfe-commits
mailing list