diff options
author | Chris Packham <judge.packham@gmail.com> | 2020-08-30 20:57:44 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-30 20:57:44 +1200 |
commit | a2b4eab30cbb71a8185f377ff44a1e2b88801fa3 (patch) | |
tree | 80b21e10e3df9e274c87495d00bd8400142b723c | |
parent | 7c628038ab42de42a6073e7393ba317d47899db5 (diff) | |
parent | 6dd9d57280dd5cfbe298dcbc9b935e8f65879090 (diff) | |
download | crosstool-ng-a2b4eab30cbb71a8185f377ff44a1e2b88801fa3.tar.gz crosstool-ng-a2b4eab30cbb71a8185f377ff44a1e2b88801fa3.tar.bz2 crosstool-ng-a2b4eab30cbb71a8185f377ff44a1e2b88801fa3.zip |
Merge pull request #1366 from antmak/bugfix/zlib_macos_patch
zlib-1.2.11: Add a patch to cross-compile for macos
-rw-r--r-- | packages/zlib/1.2.11/0003-crossbuild-macos-libtool.patch | 34 | ||||
-rw-r--r-- | scripts/crosstool-NG.sh | 2 |
2 files changed, 35 insertions, 1 deletions
diff --git a/packages/zlib/1.2.11/0003-crossbuild-macos-libtool.patch b/packages/zlib/1.2.11/0003-crossbuild-macos-libtool.patch new file mode 100644 index 00000000..e04f65d2 --- /dev/null +++ b/packages/zlib/1.2.11/0003-crossbuild-macos-libtool.patch @@ -0,0 +1,34 @@ +commit 1f6bc557ec5c90eced96ae81ff1d443ee5770993 +Author: Heiko Lewin <heiko.lewin@worldiety.de> +Date: Fri May 22 03:32:33 2020 +0200 + + configure: use LIBTOOL variable for Darwin builds + +diff --git a/configure b/configure +index e974d1f..0c88bf9 100755 +--- a/configure ++++ b/configure +@@ -66,6 +66,12 @@ if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then + else + NM=${NM-"nm"} + fi ++if "${CROSS_PREFIX}libtool" --version >/dev/null 2>/dev/null || test $? -lt 126; then ++ LIBTOOL=${LIBTOOL-"${CROSS_PREFIX}libtool"} ++ test -n "${CROSS_PREFIX}" && echo Using ${LIBTOOL} | tee -a configure.log ++else ++ LIBTOOL=${LIBTOOL-"libtool"} ++fi + + # set defaults before processing command line options + LDCONFIG=${LDCONFIG-"ldconfig"} +@@ -241,8 +247,8 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then + SHAREDLIBV=libz.$VER$shared_ext + SHAREDLIBM=libz.$VER1$shared_ext + LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER3"} +- if libtool -V 2>&1 | grep Apple > /dev/null; then +- AR="libtool" ++ if ${LIBTOOL} -V 2>&1 | grep Apple > /dev/null; then ++ AR="${LIBTOOL}" + else + AR="/usr/bin/libtool" + fi diff --git a/scripts/crosstool-NG.sh b/scripts/crosstool-NG.sh index 14be5ed9..f09ae0c6 100644 --- a/scripts/crosstool-NG.sh +++ b/scripts/crosstool-NG.sh @@ -437,7 +437,7 @@ if [ -z "${CT_RESTART}" ]; then t="${!r}-" fi - for tool in ar as dlltool gcc g++ gcj gnatbind gnatmake ld nm objcopy objdump ranlib strip windres; do + for tool in ar as dlltool gcc g++ gcj gnatbind gnatmake ld libtool nm objcopy objdump ranlib strip windres; do # First try with prefix + suffix # Then try with prefix only # Then try with suffix only, but only for BUILD, and HOST iff REAL_BUILD == REAL_HOST |