From 2fd2eda0ace62968bc2eadf6260cebbbcd8d7bf5 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Sat, 25 Mar 2017 03:33:59 +0000 Subject: Add the _CALL_LINUX preprocessor define for ppc linux platforms. This typically is only for a new enough linker (bfd >= 2.16.2 or gold), but our ppc suppport post-dates this and it should work on all linux platforms. It is guaranteed to work on all elfv2 platforms. llvm-svn: 298765 --- clang/lib/Basic/Targets.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'clang/lib/Basic/Targets.cpp') diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index 33fdfe7b6f6..fda3ed45073 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -1237,6 +1237,12 @@ void PPCTargetInfo::getTargetDefines(const LangOptions &Opts, if (ABI == "elfv2") Builder.defineMacro("_CALL_ELF", "2"); + // This typically is only for a new enough linker (bfd >= 2.16.2 or gold), but + // our suppport post-dates this and it should work on all linux platforms. It + // is guaranteed to work on all elfv2 platforms. + if (getTriple().getOS() == llvm::Triple::Linux) + Builder.defineMacro("_CALL_LINUX", "1"); + // Subtarget options. Builder.defineMacro("__NATURAL_ALIGNMENT__"); Builder.defineMacro("__REGISTER_PREFIX__", ""); -- cgit v1.2.3