From e4298e2bc0238dd50a737d158be6d8dd6e7fb1cf Mon Sep 17 00:00:00 2001 From: AlexPeshkoff Date: Thu, 20 Jun 2024 20:09:27 +0300 Subject: [PATCH] Cross-build ICU for IOS on linux --- extern/icu/ios/Readme.txt | 2 ++ extern/icu/ios/aarch64/config.sh | 23 +++++++++++++++++++++++ extern/icu/ios/aarch64/mk.sh | 6 ++++++ extern/icu/ios/crossenv.sh | 22 ++++++++++++++++++++++ extern/icu/ios/linux/config.sh | 16 ++++++++++++++++ extern/icu/ios/linux/mk.sh | 3 +++ 6 files changed, 72 insertions(+) create mode 100644 extern/icu/ios/Readme.txt create mode 100755 extern/icu/ios/aarch64/config.sh create mode 100755 extern/icu/ios/aarch64/mk.sh create mode 100644 extern/icu/ios/crossenv.sh create mode 100755 extern/icu/ios/linux/config.sh create mode 100755 extern/icu/ios/linux/mk.sh diff --git a/extern/icu/ios/Readme.txt b/extern/icu/ios/Readme.txt new file mode 100644 index 0000000000..a867cbfc36 --- /dev/null +++ b/extern/icu/ios/Readme.txt @@ -0,0 +1,2 @@ +This directory contains files needed for cross-build of IBM ICU 63.1 for IOS on amd64 linux host. +Assuming xcode SDK is present in ${MACTOOLS}. diff --git a/extern/icu/ios/aarch64/config.sh b/extern/icu/ios/aarch64/config.sh new file mode 100755 index 0000000000..9f431f5fb0 --- /dev/null +++ b/extern/icu/ios/aarch64/config.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +. ../crossenv.sh + +../source/configure --prefix=$(pwd)/prebuilt \ + --host=aarch64-apple-darwin \ + --enable-static=no \ + --enable-shared \ + --enable-extras=no \ + --enable-strict=no \ + --enable-icuio=no \ + --enable-layout=no \ + --enable-layoutex=no \ + --enable-tools=no \ + --enable-tests=no \ + --enable-samples=no \ + --enable-renaming \ + --enable-dyload \ + --with-cross-build=`realpath ../linux` \ + CFLAGS='-Os' \ + CXXFLAGS='--std=c++11' \ + LDFLAGS='-static-libstdc++' \ + --with-data-packaging=archive diff --git a/extern/icu/ios/aarch64/mk.sh b/extern/icu/ios/aarch64/mk.sh new file mode 100755 index 0000000000..cc8d24ad27 --- /dev/null +++ b/extern/icu/ios/aarch64/mk.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +. ../crossenv.sh + +make -j15 && make install + diff --git a/extern/icu/ios/crossenv.sh b/extern/icu/ios/crossenv.sh new file mode 100644 index 0000000000..4a1f0e1970 --- /dev/null +++ b/extern/icu/ios/crossenv.sh @@ -0,0 +1,22 @@ +#MACTOOLS=/usr/home/firebird/Mac/mactools + +export PATH=${MACTOOLS}/usr/bin:$PATH +export LD_LIBRARY_PATH=${MACTOOLS}/usr/lib:$LD_LIBRARY_PATH + +CROSS_PREFIX=${MACTOOLS}/usr/bin/arm-apple-darwin11- + +export CXX=${CROSS_PREFIX}clang++ +export CC=${CROSS_PREFIX}clang +export AR=${CROSS_PREFIX}ar + +#AS=${CROSS_PREFIX}as + +export LD=${CROSS_PREFIX}ld + +#NM=${CROSS_PREFIX}nm +#OBJCOPY=${CROSS_PREFIX}objcopy +#OBJDUMP=${CROSS_PREFIX}objdump + +export RANLIB=${CROSS_PREFIX}ranlib + +#STRIP=${CROSS_PREFIX}strip diff --git a/extern/icu/ios/linux/config.sh b/extern/icu/ios/linux/config.sh new file mode 100755 index 0000000000..a8b56024aa --- /dev/null +++ b/extern/icu/ios/linux/config.sh @@ -0,0 +1,16 @@ +#!/bin/sh +../source/runConfigureICU Linux --prefix=$PWD/prebuilt \ + CFLAGS="-Os" \ + CXXFLAGS="--std=c++11" \ + --enable-static \ + --enable-shared=no \ + --enable-extras=no \ + --enable-strict=no \ + --enable-icuio=no \ + --enable-layout=no \ + --enable-layoutex=no \ + --enable-tools \ + --enable-tests=no \ + --enable-samples=no \ + --enable-dyload \ + --with-data-packaging=archive diff --git a/extern/icu/ios/linux/mk.sh b/extern/icu/ios/linux/mk.sh new file mode 100755 index 0000000000..119e11c44b --- /dev/null +++ b/extern/icu/ios/linux/mk.sh @@ -0,0 +1,3 @@ +#!/bin/sh +make -j15 && make install +