[PATCH 1/4] [PPC64LE] Add a CALL_ELF macro to indicate use of the ELFv2 ABI.
Will Schmidt
will_schmidt at vnet.ibm.com
Tue Mar 11 12:54:06 PDT 2014
Add a CALL_ELF macro to clang to indicate use of the ELFv2 ABI.
In code, a (_CALL_ELF==2) check will indicate when the ELFv2 ABI is
to be used. This is the desired default for the PPC64 LE target.
---
tools/clang/lib/Basic/Targets.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/clang/lib/Basic/Targets.cpp b/tools/clang/lib/Basic/Targets.cpp
index 7a6f92b..339a5d2 100644
--- a/tools/clang/lib/Basic/Targets.cpp
+++ b/tools/clang/lib/Basic/Targets.cpp
@@ -939,6 +939,7 @@ void PPCTargetInfo::getTargetDefines(const LangOptions &Opts,
// Target properties.
if (getTriple().getArch() == llvm::Triple::ppc64le) {
Builder.defineMacro("_LITTLE_ENDIAN");
+ Builder.defineMacro("_CALL_ELF","2");
} else {
if (getTriple().getOS() != llvm::Triple::NetBSD &&
getTriple().getOS() != llvm::Triple::OpenBSD)
More information about the cfe-commits
mailing list