Changes between Initial Version and Version 1 of LeopardSDKFixes


Ignore:
Timestamp:
Jan 12, 2015, 1:36:03 AM (9 years ago)
Author:
jeremyhu (Jeremy Huddleston Sequoia)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LeopardSDKFixes

    v1 v1  
     1= Manual Leopard SDK Fixes =
     2
     3Leopard's SDK has a couple bugs which were never fixed in an update of Xcode or the OS.  While some ports used to work around these bugs in the past, Leopard is past EndOfLife and encountering code that does not work around these issues is common.  You should make these changes to the relevant files in both / and /Developer/SDKs/MacOSX10.5.sdk
     4
     5== Missing symbols in /usr/lib/libgcc_s.10.5.dylib ==
     6
     7Update /usr/lib/libgcc_s.10.5.dylib from a newer OS (to get the missing stubs for `__udivti3` and others):
     8{{{
     9sudo cp /usr/lib/libgcc_s.10.5.dylib{,.bak}
     10sudo scp <snow leopard or newer machine>:/usr/lib/libgcc_s.10.5.dylib /usr/lib/libgcc_s.10.5.dylib
     11}}}
     12
     13You will know that this worked successfully if you can compile this with clang-mp-3.4:
     14{{{
     15int main() {
     16   __uint128_t a = 100;
     17   __uint128_t b = 200;
     18   __uint128_t c = a / b;
     19
     20  return 0;
     21}
     22}}}
     23
     24== Incorrect `__MAC_OS_X_VERSION_MAX_ALLOWED` ==
     25
     26Edit  /usr/include/AvailabilityInternal.h, so ports don't try to use API that were added in Snow Leopard:
     27{{{
     28--- /usr/include/AvailabilityInternal.h.orig    2015-01-11 17:31:10.000000000 -0800
     29+++ /usr/include/AvailabilityInternal.h 2015-01-05 04:15:01.000000000 -0800
     30@@ -60,7 +60,7 @@
     31     #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
     32     // make sure a default max version is set
     33     #ifndef __MAC_OS_X_VERSION_MAX_ALLOWED
     34-        #define __MAC_OS_X_VERSION_MAX_ALLOWED __MAC_10_6
     35+        #define __MAC_OS_X_VERSION_MAX_ALLOWED 1058
     36     #endif
     37 
     38     // set up internal macros
     39}}}
     40
     41You may be tempted to use `__MAC_10_5` instead of 1058 there to match what is done on Snow Leopard and later SDKs, but that will fail with Leopard's default toolchain because it sets the deployment target to the full OS version (eg 10.5.8), and that needs to be less than or equal to `__MAC_OS_X_VERSION_MAX_ALLOWED`.