aboutsummaryrefslogtreecommitdiff
path: root/rsync
diff options
context:
space:
mode:
Diffstat (limited to 'rsync')
-rwxr-xr-xrsync/build.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/rsync/build.sh b/rsync/build.sh
index 1160e74..0a7fcda 100755
--- a/rsync/build.sh
+++ b/rsync/build.sh
@@ -17,7 +17,19 @@ if [ -z "$ndk" ] || [ ! -d "$ndk" ]; then
echo "rsync: Android NDK not found; set ANDROID_NDK_HOME" >&2
exit 1
fi
-tc="$ndk/toolchains/llvm/prebuilt/linux-x86_64/bin"
+# NDK prebuilt toolchains are named by build host, not target. Pick the tag
+# matching this machine (macOS ships an x86_64 clang that runs under Rosetta on
+# Apple Silicon); the target ABI is selected separately below.
+case "$(uname -s)" in
+Linux) host_tag=linux-x86_64 ;;
+Darwin) host_tag=darwin-x86_64 ;;
+*) echo "rsync: unsupported build host $(uname -s)" >&2; exit 1 ;;
+esac
+tc="$ndk/toolchains/llvm/prebuilt/$host_tag/bin"
+if [ ! -d "$tc" ]; then
+ echo "rsync: NDK toolchain not found at $tc" >&2
+ exit 1
+fi
work="$root/rsync/work"
tarball="$root/rsync/rsync-${RSYNC_VERSION}.tar.gz"