From 542acc2ef6c21aeb3f109c03748b1015a71fed63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20P=C3=B6chtrager?= Date: Wed, 6 Nov 2019 20:42:24 +0100 Subject: [PATCH] Make OSXCross work on Android (Termux) Additional changes: https://github.com/tpoechtrager/cctools-port/commit/5e9c52005fd670b1083f15464bd5a8a9ee806bbb https://github.com/tpoechtrager/cctools-port/commit/9fa76fb95addb6caff9a94231617f205314fa4db https://github.com/tpoechtrager/cctools-port/commit/8239a5211bcf07d6b9d359782e1a889ec1d7cce5 https://github.com/tpoechtrager/apple-libtapi/commit/cd9885b97fdff92cc41e886bba4a404c42fdf71b --- README.md | 4 ++-- build.sh | 9 +++++++++ tools/tools.sh | 1 + 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6f94f06..3928a5d 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ ### WHAT IS THE GOAL OF OSXCROSS? ### -The goal of OSXCross is to provide a well working OS X cross toolchain for -Linux and FreeBSD. +The goal of OSXCross is to provide a well working OS X cross toolchain for +Linux, FreeBSD, OpenBSD and Android (Termux). OSXCross works **on** x86, x86_64, ARM and AArch64. diff --git a/build.sh b/build.sh index 7ba1831..6fbfb14 100755 --- a/build.sh +++ b/build.sh @@ -171,6 +171,15 @@ else mv -f *OSX*$SDK_VERSION*sdk* $SDK_DIR fi +## Android/Termux is broken + +if [ $OPERATING_SYSTEM == "Android" ]; then + pushd $SDK_DIR/MacOSX$SDK_VERSION.sdk &>/dev/null + mkdir -p data/data/com.termux/files/usr + create_symlink $PWD/usr/include data/data/com.termux/files/usr + popd &>/dev/null +fi + ## Fix broken SDKs ## pushd $SDK_DIR/MacOSX$SDK_VERSION.sdk &>/dev/null diff --git a/tools/tools.sh b/tools/tools.sh index f7b8e1d..91ca2eb 100644 --- a/tools/tools.sh +++ b/tools/tools.sh @@ -41,6 +41,7 @@ set_path_vars PLATFORM=$(uname -s) ARCH=$(uname -m) +OPERATING_SYSTEM=$(uname -o 2>/dev/null || echo "-") SCRIPT=$(basename $0) if [[ $PLATFORM == CYGWIN* ]]; then