diff --git a/CHANGELOG b/CHANGELOG index e4c4c97..7183554 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,9 @@ +/****************************** v0.13 ********************************/ + +changed: + * updated cctools to 877.8 + * updated ld64 to 253.9 + /****************************** v0.12 ********************************/ changed: diff --git a/build.sh b/build.sh index 4441832..a1320f5 100755 --- a/build.sh +++ b/build.sh @@ -74,7 +74,7 @@ if [ -z "$OSX_VERSION_MIN" ]; then fi fi -OSXCROSS_VERSION=0.12 +OSXCROSS_VERSION=0.13 X86_64H_SUPPORTED=0 @@ -130,8 +130,8 @@ function remove_locks() source $BASE_DIR/tools/trap_exit.sh # CCTOOLS -LINKER_VERSION=253.3 -CCTOOLS="cctools-877.5-ld64-$LINKER_VERSION" +LINKER_VERSION=253.9 +CCTOOLS="cctools-877.8-ld64-$LINKER_VERSION" CCTOOLS_TARBALL=$(ls $TARBALL_DIR/$CCTOOLS*.tar.* | head -n1) CCTOOLS_REVHASH=$(echo $(basename "$CCTOOLS_TARBALL") | tr '_' '\n' | \ tr '.' '\n' | tail -n3 | head -n1) @@ -149,9 +149,6 @@ pushd .. &>/dev/null popd &>/dev/null patch -p0 < $PATCH_DIR/cctools-ld64-1.patch patch -p0 < $PATCH_DIR/cctools-ld64-2.patch -patch -p1 < $PATCH_DIR/cctools-ld64-linux-ncpus.patch -patch -p1 < $PATCH_DIR/cctools-ld64-qsort_r.patch -patch -p1 < $PATCH_DIR/cctools-ld64-gcc6-build-fix.patch echo "" CONFFLAGS="--prefix=$TARGET_DIR --target=x86_64-apple-$TARGET " CONFFLAGS+="--disable-clang-as " diff --git a/build_compiler_rt.sh b/build_compiler_rt.sh index 69dd970..1907604 100755 --- a/build_compiler_rt.sh +++ b/build_compiler_rt.sh @@ -77,16 +77,15 @@ git clean -fdx touch .clone_complete git pull +if [ $BRANCH == "release_38" ]; then + patch -p0 < $PATCH_DIR/compiler-rt-llvm38-makefile.patch +fi + $SED -i "s/Configs += ios//g" make/platform/clang_darwin.mk $SED -i "s/Configs += cc_kext_ios5//g" make/platform/clang_darwin.mk $SED -i "s/Configs += profile_ios//g" make/platform/clang_darwin.mk $SED -i "s/Configs += asan_iossim_dynamic//g" make/platform/clang_darwin.mk -if [ -f "$OSXCROSS_SDK/usr/lib/libSystem.B.tbd" ]; then - # https://llvm.org/bugs/show_bug.cgi?id=24776 - $SED -i "s/x86_64 x86_64h,/x86_64,/g" make/platform/clang_darwin.mk -fi - # Unbreak the -Werror build. if [ -f lib/asan/asan_mac.h ]; then $SED -i "s/ASAN__MAC_H/ASAN_MAC_H/g" lib/asan/asan_mac.h diff --git a/patches/cctools-ld64-gcc6-build-fix.patch b/patches/cctools-ld64-gcc6-build-fix.patch deleted file mode 100644 index 6ffb00e..0000000 --- a/patches/cctools-ld64-gcc6-build-fix.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git cctools/ld64/src/ld/code-sign-blobs/memutils.h cctools/ld64/src/ld/code-sign-blobs/memutils.h -index 6b8697c..7059669 100644 ---- cctools/ld64/src/ld/code-sign-blobs/memutils.h -+++ cctools/ld64/src/ld/code-sign-blobs/memutils.h -@@ -31,6 +31,7 @@ - //#include - #include - #include -+#include // ld64-port - #include - - #ifdef __GLIBCXX__ // ld64-port diff --git a/patches/cctools-ld64-linux-ncpus.patch b/patches/cctools-ld64-linux-ncpus.patch deleted file mode 100644 index a1a1c39..0000000 --- a/patches/cctools-ld64-linux-ncpus.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff --git cctools/ld64/src/ld/InputFiles.cpp cctools/ld64/src/ld/InputFiles.cpp -index 13207e5..2b6f7bd 100644 ---- cctools/ld64/src/ld/InputFiles.cpp -+++ cctools/ld64/src/ld/InputFiles.cpp -@@ -43,6 +43,15 @@ - #include - #include - -+// ld64-port -+#ifdef __linux__ -+#ifndef __USE_GNU -+#define __USE_GNU -+#endif -+#include -+#endif -+// ld64-port end -+ - #include - #include - #include -@@ -913,6 +922,20 @@ InputFiles::InputFiles(Options& opts, const char** archName) - - // initialize info for parsing input files on worker threads - unsigned int ncpus; -+#ifdef __linux__ // ld64-port -+ cpu_set_t cs; -+ CPU_ZERO(&cs); -+ -+ if (!sched_getaffinity(0, sizeof(cs), &cs)) { -+ ncpus = 0; -+ -+ for (int i = 0; i < CPU_SETSIZE; i++) -+ if (CPU_ISSET(i, &cs)) -+ ncpus++; -+ } else { -+ ncpus = 1; -+ } -+#else - int mib[2]; - size_t len = sizeof(ncpus); - mib[0] = CTL_HW; -@@ -920,6 +943,7 @@ InputFiles::InputFiles(Options& opts, const char** archName) - if (sysctl(mib, 2, &ncpus, &len, NULL, 0) != 0) { - ncpus = 1; - } -+#endif - _availableWorkers = MIN(ncpus, files.size()); // max # workers we permit - _idleWorkers = 0; - diff --git a/patches/cctools-ld64-qsort_r.patch b/patches/cctools-ld64-qsort_r.patch deleted file mode 100644 index 5ebe826..0000000 --- a/patches/cctools-ld64-qsort_r.patch +++ /dev/null @@ -1,27 +0,0 @@ -commit 86ee16d49f06c07fb7d208d6f082b4a63c077293 -Author: Johannes Schickel -Date: Fri Feb 12 14:51:14 2016 +0100 - - Fix build on systems with glibc's qsort_r. - -diff --git cctools/ld64/src/3rd/qsort_r.c cctools/ld64/src/3rd/qsort_r.c -index a514ad8..1bae250 100644 ---- cctools/ld64/src/3rd/qsort_r.c -+++ cctools/ld64/src/3rd/qsort_r.c -@@ -28,7 +28,6 @@ - */ - - #define I_AM_QSORT_R --#define qsort_r qsort_r_local - - #include - -@@ -37,6 +36,8 @@ - #include - #include - -+#define qsort_r qsort_r_local -+ - #ifndef __FreeBSD__ - /* flsl.c */ - int diff --git a/patches/compiler-rt-llvm38-makefile.patch b/patches/compiler-rt-llvm38-makefile.patch new file mode 100644 index 0000000..c035f9a --- /dev/null +++ b/patches/compiler-rt-llvm38-makefile.patch @@ -0,0 +1,36 @@ +diff --git make/platform/clang_darwin.mk make/platform/clang_darwin.mk +index 9944481..50afa19 100644 +--- make/platform/clang_darwin.mk ++++ make/platform/clang_darwin.mk +@@ -17,23 +17,23 @@ CheckArches = \ + result=""; \ + if [ "X$(3)" != X ]; then \ + for arch in $(1); do \ +- if $(LD) -v 2>&1 | grep "configured to support" \ +- | tr ' ' '\n' | grep "^$$arch$$" >/dev/null 2>/dev/null; then \ +- if $(CC) -arch $$arch \ ++ if $(CC) -arch $$arch -c \ + -integrated-as \ + $(ProjSrcRoot)/make/platform/clang_darwin_test_input.c \ + -isysroot $(3) \ + -o /dev/null > /dev/null 2> /dev/null; then \ +- result="$$result$$arch "; \ ++ if $(LD) -v 2>&1 | grep "configured to support" \ ++ | tr ' ' '\n' | grep "^$$arch$$" >/dev/null 2>/dev/null; then \ ++ result="$$result$$arch "; \ + else \ + printf 1>&2 \ +- "warning: clang_darwin.mk: dropping arch '$$arch' from lib '$(2)'"; \ +- printf 1>&2 " (clang or system libraries do not support it)\n"; \ ++ "warning: clang_darwin.mk: dropping arch '$$arch' from lib '$(2)'";\ ++ printf 1>&2 " (ld does not support it)\n"; \ + fi; \ + else \ + printf 1>&2 \ +- "warning: clang_darwin.mk: dropping arch '$$arch' from lib '$(2)'";\ +- printf 1>&2 " (ld does not support it)\n"; \ ++ "warning: clang_darwin.mk: dropping arch '$$arch' from lib '$(2)'"; \ ++ printf 1>&2 " (clang does not support it)\n"; \ + fi; \ + done; \ + fi; \ diff --git a/tarballs/cctools-877.5-ld64-253.3_4f8ad51.tar.xz b/tarballs/cctools-877.5-ld64-253.3_4f8ad51.tar.xz deleted file mode 100644 index bc7f48a..0000000 Binary files a/tarballs/cctools-877.5-ld64-253.3_4f8ad51.tar.xz and /dev/null differ diff --git a/tarballs/cctools-877.8-ld64-253.9_e2c9d34.tar.xz b/tarballs/cctools-877.8-ld64-253.9_e2c9d34.tar.xz new file mode 100644 index 0000000..6fce4dd Binary files /dev/null and b/tarballs/cctools-877.8-ld64-253.9_e2c9d34.tar.xz differ