]> granicus.if.org Git - clang/commitdiff
Define __NO_MATH_INLINES on linux/x86 so that we don't get inline
authorChris Lattner <sabre@nondot.org>
Sun, 19 Apr 2009 17:29:50 +0000 (17:29 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 19 Apr 2009 17:29:50 +0000 (17:29 +0000)
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

lib/Basic/Targets.cpp

index 18600756960077b6f745a2b5510294928708dd26..055d16b76b8a9acf5d186b5e9d172686948bd9ee 100644 (file)
@@ -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);
   }
 };