Ticket #35494: cctools-829.patch
File cctools-829.patch, 7.3 KB (added by jeremyhu (Jeremy Huddleston Sequoia), 12 years ago) |
---|
-
cctools/Portfile
2 2 3 3 PortSystem 1.0 4 4 name cctools 5 # XCode 4.3 6 version 822 7 revision 2 5 # XCode 4.4 6 version 829 8 7 categories devel 9 8 platforms darwin 10 9 maintainers mfeiri jeremyhu openmaintainer … … 17 16 homepage http://opensource.apple.com/source/${name}/ 18 17 master_sites http://opensource.apple.com/tarballs/${name}/ 19 18 20 checksums rmd160 1caf207acbf421cdc975926a392fc75dc1d2594c \ 21 sha256 dfaa9bdbd023524d47429674f64d2d5ea393123dabf90868be0aa17f61f45289 19 checksums sha1 859408aa1169a9c6b1ecd921d476c5b0df9f5717 \ 20 rmd160 55a01500935bf8a6e541ac2109317746c4e7b90d \ 21 sha256 f140b3a2ab7c85b0316afcd816cc8171f81585eea125bca64d781d4e192d65dc 22 22 23 23 depends_lib port:cctools-headers 24 24 depends_build port:ld64 25 25 26 patchfiles PR-11136237.patch lto.patch cctools-822-no-lto.patch26 patchfiles cctools-829-lto.patch 27 27 28 28 variant universal {} 29 29 … … 36 36 sha256 6116c06920112c634f6df2fa8b2f171ee3b90ff2176137da5856336695a6a676 37 37 supported_archs ppc i386 x86_64 38 38 39 patchfiles-delete cctools-82 2-no-lto.patch40 patchfiles-append PR-9087924.patch PR-9830754.patch cctools-822-no-lto.patch39 patchfiles-delete cctools-829-lto.patch cctools-822-no-lto.patch 40 patchfiles-append PR-9087924.patch PR-9830754.patch PR-11136237.patch cctools-806-lto.patch cctools-822-no-lto.patch 41 41 } else { 42 42 supported_archs i386 x86_64 43 43 } -
cctools/files/cctools-806-lto.patch
1 --- libstuff/lto.c.orig 2012-04-20 22:44:19.000000000 -0700 2 +++ libstuff/lto.c 2012-04-20 22:51:04.000000000 -0700 3 @@ -119,11 +119,19 @@ void **pmod) /* maybe NULL */ 4 lto_path = makestr(prefix, "../lib/libLTO.dylib", NULL); 5 6 lto_handle = dlopen(lto_path, RTLD_NOW); 7 + free(lto_path); 8 if(lto_handle == NULL){ 9 - free(lto_path); 10 - lto_path = NULL; 11 - lto_handle = dlopen("/Developer/usr/lib/libLTO.dylib", 12 - RTLD_NOW); 13 + const char *lto_paths[] = { 14 + "@@LLVM_LIBDIR@@/libLTO.dylib", 15 + "/Developer/usr/lib/libLTO.dylib", 16 + "/usr/lib/libLTO.dylib", 17 + "/Applications/Xcode.app/usr/lib/libLTO.dylib", 18 + NULL 19 + }; 20 + const char **p; 21 + for(p = lto_paths; *p && !lto_handle ; p++) { 22 + lto_handle = dlopen(*p, RTLD_NOW); 23 + } 24 } 25 if(lto_handle == NULL) 26 return(0); 27 @@ -147,8 +154,6 @@ void **pmod) /* maybe NULL */ 28 lto_get_sym_attr == NULL || 29 lto_get_sym_name == NULL){ 30 dlclose(lto_handle); 31 - if(lto_path != NULL) 32 - free(lto_path); 33 return(0); 34 } 35 } -
cctools/files/lto.patch
1 --- libstuff/lto.c.orig 2012-04-20 22:44:19.000000000 -07002 +++ libstuff/lto.c 2012-04-20 22:51:04.000000000 -07003 @@ -119,11 +119,19 @@ void **pmod) /* maybe NULL */4 lto_path = makestr(prefix, "../lib/libLTO.dylib", NULL);5 6 lto_handle = dlopen(lto_path, RTLD_NOW);7 + free(lto_path);8 if(lto_handle == NULL){9 - free(lto_path);10 - lto_path = NULL;11 - lto_handle = dlopen("/Developer/usr/lib/libLTO.dylib",12 - RTLD_NOW);13 + const char *lto_paths[] = {14 + "@@LLVM_LIBDIR@@/libLTO.dylib",15 + "/Developer/usr/lib/libLTO.dylib",16 + "/usr/lib/libLTO.dylib",17 + "/Applications/Xcode.app/usr/lib/libLTO.dylib",18 + NULL19 + };20 + const char **p;21 + for(p = lto_paths; *p && !lto_handle ; p++) {22 + lto_handle = dlopen(*p, RTLD_NOW);23 + }24 }25 if(lto_handle == NULL)26 return(0);27 @@ -147,8 +154,6 @@ void **pmod) /* maybe NULL */28 lto_get_sym_attr == NULL ||29 lto_get_sym_name == NULL){30 dlclose(lto_handle);31 - if(lto_path != NULL)32 - free(lto_path);33 return(0);34 }35 } -
cctools/files/cctools-829-lto.patch
1 --- libstuff/lto.c.orig 1969-12-31 16:00:00.000000000 -0800 2 +++ libstuff/lto.c 2012-08-02 09:15:15.000000000 -0700 3 @@ -112,13 +112,19 @@ void **pmod) /* maybe NULL */ 4 lto_path = makestr(prefix, "../lib/libLTO.dylib", NULL); 5 6 lto_handle = dlopen(lto_path, RTLD_NOW); 7 + free(lto_path); 8 if(lto_handle == NULL){ 9 - free(lto_path); 10 - lto_path = NULL; 11 - lto_handle = dlopen("/Applications/Xcode.app/Contents/" 12 - "Developer/Toolchains/XcodeDefault." 13 - "xctoolchain/usr/lib/libLTO.dylib", 14 - RTLD_NOW); 15 + const char *lto_paths[] = { 16 + "@@LLVM_LIBDIR@@/libLTO.dylib", 17 + "/Developer/usr/lib/libLTO.dylib", 18 + "/usr/lib/libLTO.dylib", 19 + "/Applications/Xcode.app/usr/lib/libLTO.dylib", 20 + NULL 21 + }; 22 + const char **p; 23 + for(p = lto_paths; *p && !lto_handle ; p++) { 24 + lto_handle = dlopen(*p, RTLD_NOW); 25 + } 26 } 27 if(lto_handle == NULL) 28 return(0); 29 @@ -142,8 +148,6 @@ void **pmod) /* maybe NULL */ 30 lto_get_sym_attr == NULL || 31 lto_get_sym_name == NULL){ 32 dlclose(lto_handle); 33 - if(lto_path != NULL) 34 - free(lto_path); 35 return(0); 36 } 37 } -
cctools-headers/Portfile
2 2 3 3 PortSystem 1.0 4 4 name cctools-headers 5 version 822 6 revision 2 7 set xnu_headers_version 1699.24.8 5 version 829 6 set xnu_headers_version 2050.7.9 8 7 categories devel 9 8 platforms darwin 10 9 maintainers mfeiri jeremyhu openmaintainer … … 21 20 distfiles cctools-${version}.tar.gz:cctools xnu-${xnu_headers_version}.tar.gz:xnu 22 21 23 22 checksums cctools-${version}.tar.gz \ 24 rmd160 1caf207acbf421cdc975926a392fc75dc1d2594c\25 sha256 dfaa9bdbd023524d47429674f64d2d5ea393123dabf90868be0aa17f61f45289\23 rmd160 55a01500935bf8a6e541ac2109317746c4e7b90d \ 24 sha256 f140b3a2ab7c85b0316afcd816cc8171f81585eea125bca64d781d4e192d65dc \ 26 25 xnu-${xnu_headers_version}.tar.gz \ 27 rmd160 18051c3cb9fca5cecc966306d76b91310bf1e9ff\28 sha256 4268ce69799db51f1b48e400b6fa6a7041b266a1a5404034398aa51b7084b26926 rmd160 36c43e2ed64e17c2dc31f7c73ce318511437cbeb \ 27 sha256 2957b068ea04db0dbbdbe646f0b2d4e021a814027beacdfc7ae8f43a4d64f01c 29 28 30 29 supported_archs noarch 31 30 universal_variant no