[LLVMbugs] [Bug 1057] NEW: patch for Mac OS X 10.3

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Dec 16 17:53:15 PST 2006


http://llvm.org/bugs/show_bug.cgi?id=1057

           Summary: patch for Mac OS X 10.3
           Product: libraries
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Target-Independent JIT
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: scottm at aero.org


Following patch required to successfully compile (and link) lli - problem traced
to JIT.cpp:

Index: lib/ExecutionEngine/JIT/JIT.cpp
===================================================================
RCS file: /var/cvs/llvm/llvm/lib/ExecutionEngine/JIT/JIT.cpp,v
retrieving revision 1.83
diff -u -r1.83 JIT.cpp
--- lib/ExecutionEngine/JIT/JIT.cpp     12 Dec 2006 01:17:41 -0000      1.83
+++ lib/ExecutionEngine/JIT/JIT.cpp     17 Dec 2006 01:51:08 -0000
@@ -31,9 +31,10 @@
 
 #ifdef __APPLE__ 
 #include <AvailabilityMacros.h>
-#if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4) || \
-    (MAC_OS_X_VERSION_MIN_REQUIRED == MAC_OS_X_VERSION_10_4 && \
-     __APPLE_CC__ >= 5330)
+#if defined(MAC_OS_X_VERSION_10_4) && \
+    ((MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4) || \
+     (MAC_OS_X_VERSION_MIN_REQUIRED == MAC_OS_X_VERSION_10_4 && \
+     __APPLE_CC__ >= 5330))
 // __dso_handle is resolved by Mac OS X dynamic linker.
 extern void *__dso_handle __attribute__ ((__visibility__ ("hidden")));
 #endif
@@ -309,9 +310,10 @@
   // If the global is external, just remember the address.
   if (GV->isExternal()) {
 #ifdef __APPLE__
-#if (MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4) || \
-    (MAC_OS_X_VERSION_MIN_REQUIRED == MAC_OS_X_VERSION_10_4 && \
-     __APPLE_CC__ >= 5330)
+#if defined(MAC_OS_X_VERSION_10_4) && \
+    ((MAC_OS_X_VERSION_MIN_REQUIRED > MAC_OS_X_VERSION_10_4) || \
+     (MAC_OS_X_VERSION_MIN_REQUIRED == MAC_OS_X_VERSION_10_4 && \
+      __APPLE_CC__ >= 5330))
     // Apple gcc defaults to -fuse-cxa-atexit (i.e. calls __cxa_atexit instead
     // of atexit). It passes the address of linker generated symbol __dso_handle
     // to the function.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list