From: Chris Lattner Date: Sun, 19 Apr 2009 17:32:33 +0000 (+0000) Subject: actually just do this on all x86 targets, it won't hurt X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5417544b42581366f45d8164f9cbbd1a2e99c485;p=clang actually just do this on all x86 targets, it won't hurt non-glibc ones. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69528 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 055d16b76b..fa23ba9162 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -607,6 +607,11 @@ void X86TargetInfo::getTargetDefines(const LangOptions &Opts, Define(Defs, "__tune_nocona__"); Define(Defs, "__REGISTER_PREFIX__", ""); + // 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(Defs, "__NO_MATH_INLINES"); + // Each case falls through to the previous one here. switch (SSELevel) { case SSE42: @@ -786,11 +791,6 @@ 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 @@ -870,11 +870,6 @@ 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); } };