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 | 09b5cc69f0f979e4fb0dbf24e43ced5ffadd0a84 (patch) | |
tree | 82ab37f73839ba15917a30d209990b19d70a78c8 /lib/Basic/Targets.cpp | |
parent | aa5bf2e8dc01f9835efef76222dc440a5c18b160 (diff) |
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?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69527 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/Targets.cpp')
-rw-r--r-- | lib/Basic/Targets.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 1860075696..055d16b76b 100644 --- a/lib/Basic/Targets.cpp +++ b/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); } }; |