Fix the iOS simulator build

This commit is contained in:
pancake 2019-02-11 00:09:46 +01:00
parent a488760903
commit 158f8fdb8f
3 changed files with 9 additions and 4 deletions

View File

@ -1,11 +1,11 @@
CROSS=ios-sdk-
CC=${CROSS}gcc
USERCC=${CROSS}gcc
RANLIB=ranlib
RANLIB=xcrun --sdk iphonesimulator ranlib
ONELIB=0
OSTYPE=darwin
LINK=
AR=ar
AR=xcrun --sdk iphonesimulator ar
CC_AR=${AR} -r ${LIBAR}
PARTIALLD=${CROSS}ld -r -all_load
PICFLAGS=

View File

@ -11,6 +11,11 @@ done
[ -z "${SDK}" ] && SDK=iphoneos
APPLE_SDK=`echo ${SDK} | tr a-z A-Z`
LD="xcrun --sdk ${SDK} ld ${CPUS} -bitcode_bundle"
if [ "$SDK" = "iphoneos" ]; then
LD="$LD -ios_version_min 10.0"
else
LD="$LD -ios_simulator_version_min 10.0"
fi
echo "$LD $*"
${LD} $*
r=$?

View File

@ -17,7 +17,6 @@ MERGE_LIBS=1 # Will merge libs if you build for arm and simulator
export PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:$PATH
export PATH=`pwd`/sys:${PATH}
export CC=`pwd`/sys/ios-sdk-gcc
export LD="xcrun --sdk iphoneos ld"
export IOSVER=9.0
export IOSINC=`pwd`/sys/ios-include
export USE_IOS_STATIC=0
@ -48,7 +47,7 @@ iosClean() {
}
iosBuild() {
time make -j4 || exit 1
time make -j4 AR="xcrun --sdk ${SDK} ar" || exit 1
# Build and sign
( cd binr/radare2 ; make ios_sdk_sign )
make install DESTDIR="$INSTALL_DST"
@ -203,6 +202,7 @@ for a in `IFS=+ echo ${CPU}` ; do
CPUS="-arch $a ${CPUS}"
done
export CPUS="${CPUS}"
export LD="xcrun --sdk ${SDK} ld"
export ALFLAGS="${CPUS}"
export LDFLAGS="${LDFLAGS} ${CPUS}"
export PS1="[ios-sdk-$CPU]> "