diff options
author | Chris Lattner <sabre@nondot.org> | 2009-04-19 17:29:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-04-19 17:29:50 +0000 |
commit | 4997b8ef98980202cd4d377d537f8b1c46a24377 (patch) | |
tree | c57a8d518a9eaf523675e8368d3a3f8e3b9d6a6c | |
parent | 29d34cabc5279dc9ccdd9bec6cf18c2e6a7927eb (diff) | |
download | bcm5719-llvm-4997b8ef98980202cd4d377d537f8b1c46a24377.tar.gz bcm5719-llvm-4997b8ef98980202cd4d377d537f8b1c46a24377.zip |
Define __NO_MATH_INLINES on linux/x86 so that we don't get inline
functions in glibc header files that use FP Stack inline asm which the
backend can't deal with (PR879).
This "fixes" PR3970 for linux. Other affected systems should do similar
things. Maybe this should just go to the general i386/x86-64 sections?
llvm-svn: 69527
-rw-r--r-- | clang/lib/Basic/Targets.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index 18600756960..055d16b76b8 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -786,6 +786,11 @@ public: std::vector<char> &Defines) const { X86_32TargetInfo::getTargetDefines(Opts, Defines); getLinuxDefines(Opts, Defines); + + // Define __NO_MATH_INLINES on linux/x86 so that we don't get inline + // functions in glibc header files that use FP Stack inline asm which the + // backend can't deal with (PR879). + Define(Defines, "__NO_MATH_INLINES"); } }; } // end anonymous namespace @@ -865,6 +870,11 @@ public: virtual void getTargetDefines(const LangOptions &Opts, std::vector<char> &Defines) const { X86_64TargetInfo::getTargetDefines(Opts, Defines); + // Define __NO_MATH_INLINES on linux/x86 so that we don't get inline + // functions in glibc header files that use FP Stack inline asm which the + // backend can't deal with (PR879). + Define(Defines, "__NO_MATH_INLINES"); + getLinuxDefines(Opts, Defines); } }; |