diff options
| author | Eric Christopher <echristo@gmail.com> | 2017-03-25 03:33:59 +0000 |
|---|---|---|
| committer | Eric Christopher <echristo@gmail.com> | 2017-03-25 03:33:59 +0000 |
| commit | 2fd2eda0ace62968bc2eadf6260cebbbcd8d7bf5 (patch) | |
| tree | e02f349062c6a2ec8b7d1b7104c222ec57164ea3 /clang/lib/Basic/Targets.cpp | |
| parent | b73d43521f5b2e9bda3baf6c67c614745f50d443 (diff) | |
| download | bcm5719-llvm-2fd2eda0ace62968bc2eadf6260cebbbcd8d7bf5.tar.gz bcm5719-llvm-2fd2eda0ace62968bc2eadf6260cebbbcd8d7bf5.zip | |
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
Diffstat (limited to 'clang/lib/Basic/Targets.cpp')
| -rw-r--r-- | clang/lib/Basic/Targets.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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__", ""); |

