From: Chris Lattner Date: Sun, 19 Apr 2009 17:29:50 +0000 (+0000) Subject: Define __NO_MATH_INLINES on linux/x86 so that we don't get inline X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=09b5cc69f0f979e4fb0dbf24e43ced5ffadd0a84;p=clang 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 --- 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 &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 &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); } };