[cfe-commits] r69527 - /cfe/trunk/lib/Basic/Targets.cpp

Chris Lattner sabre at nondot.org
Sun Apr 19 10:29:52 PDT 2009


Author: lattner
Date: Sun Apr 19 12:29:50 2009
New Revision: 69527

URL: http://llvm.org/viewvc/llvm-project?rev=69527&view=rev
Log:
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?


Modified:
    cfe/trunk/lib/Basic/Targets.cpp

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=69527&r1=69526&r2=69527&view=diff

==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Sun Apr 19 12:29:50 2009
@@ -786,6 +786,11 @@
                                 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 @@
   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);
   }
 };





More information about the cfe-commits mailing list