MACOSX: Add support for arm64 in osxcross

Use git format-patch for patches
This commit is contained in:
Le Philousophe committed 2021-02-06 23:23:13 +00:00
1 parent ecca0dc77c
commit 2a5bc1c2ed
2 files changed
+66 -5

No files matched your search

@@ -1,16 +1,27 @@
From dcf10cc0462910215f7357b79da9995c389b19ef Mon Sep 17 00:00:00 2001
From: Le Philousophe <lephilousophe@users.noreply.github.com>
Date: Sun, 24 Jan 2021 19:15:52 +0100
Subject: [PATCH 1/2] Set versions
---
build.sh | 2 +-
tools/gen_sdk_package_pbzx.sh | 2 +-
tools/tools.sh | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/build.sh b/build.sh
index 2f345c1..aea608d 100755
index ac628f8..7b8c911 100755
--- a/build.sh
+++ b/build.sh
@@ -99,7 +99,7 @@ build_xar
@@ -100,7 +100,7 @@ build_xar
if [ $ARM_SUPPORTED -eq 1 ]; then
get_sources \
- https://github.com/tpoechtrager/ldid.git master
+ https://github.com/tpoechtrager/ldid.git $LDID_VERSION
pushd $CURRENT_BUILD_PROJECT_NAME &>/dev/null
echo ""
if [ $f_res -eq 1 ]; then
pushd $CURRENT_BUILD_PROJECT_NAME &>/dev/null
diff --git a/tools/gen_sdk_package_pbzx.sh b/tools/gen_sdk_package_pbzx.sh
index d741550..f2ae9de 100755
--- a/tools/gen_sdk_package_pbzx.sh
@@ -25,7 +36,7 @@ index d741550..f2ae9de 100755
if [ $f_res -eq 1 ]; then
pushd $CURRENT_BUILD_PROJECT_NAME &>/dev/null
diff --git a/tools/tools.sh b/tools/tools.sh
index 2317260..5b9a24a 100644
index c94fae3..ca22cc2 100644
--- a/tools/tools.sh
+++ b/tools/tools.sh
@@ -472,7 +472,7 @@ function build_xar()
@@ -37,3 +48,6 @@ index 2317260..5b9a24a 100644
if [ $f_res -eq 1 ]; then
pushd $CURRENT_BUILD_PROJECT_NAME/xar &>/dev/null
--
2.25.1
@@ -0,0 +1,47 @@
From 46e770b0283979ec1e7c741fe6e49a4e4112335f Mon Sep 17 00:00:00 2001
From: Le Philousophe <lephilousophe@users.noreply.github.com>
Date: Sat, 6 Feb 2021 23:22:32 +0100
Subject: [PATCH 2/2] Add arm64 support to osxcross-macports
---
tools/osxcross-macports | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tools/osxcross-macports b/tools/osxcross-macports
index a3f45c9..40c8389 100755
--- a/tools/osxcross-macports
+++ b/tools/osxcross-macports
@@ -80,6 +80,9 @@ case $MACOSX_DEPLOYMENT_TARGET in
10.13* ) OSXVERSION="darwin_17" ;;
10.14* ) OSXVERSION="darwin_18" ;;
10.15* ) OSXVERSION="darwin_19" ;;
+ 10.16* ) OSXVERSION="darwin_20" ;;
+ 11.0* ) OSXVERSION="darwin_20.1" ;;
+ 11.1* ) OSXVERSION="darwin_20.2" ;;
* ) unsupportedDepTarget ;;
esac
@@ -296,9 +299,9 @@ getPkgUrl()
verboseMsg " $p"
done
- local pkg=$(echo "$pkgs" | grep $OSXVERSION | grep $ARCH | uniq | tail -n1)
+ local pkg=$(echo "$pkgs" | grep -F "$OSXVERSION." | grep $ARCH | uniq | tail -n1)
if [ -z "$pkg" ]; then
- pkg=$(echo "$pkgs" | grep $OSXVERSION | grep "noarch" | uniq | tail -n1)
+ pkg=$(echo "$pkgs" | grep -F "$OSXVERSION." | grep "noarch" | uniq | tail -n1)
fi
verboseMsg " selected: $pkg"
@@ -584,6 +587,8 @@ main()
ARCH="i386"
elif [ $opt == "-universal" -o $opt == "--universal" ]; then
ARCH="i386-x86_64"
+ elif [ $opt == "--arm64" ]; then
+ ARCH="arm64"
elif [ $opt == "-sm" -o $opt == "--select-mirror" ]; then
selectMirror
exit
--
2.25.1