From b5c7525897d7b33843034283f18ed12a01ca7656 Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 2 May 2014 20:33:01 -0700 Subject: [PATCH] iosbuild: add support for iOSv7/aarch64 Change-Id: I3a51c77276e245cd871acb18d9d70d109aac000b --- iosbuild.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/iosbuild.sh b/iosbuild.sh index 52cfeb57..0094fded 100755 --- a/iosbuild.sh +++ b/iosbuild.sh @@ -22,7 +22,7 @@ declare -r OLDPATH=${PATH} # Add iPhoneOS-V6 to the list of platforms below if you need armv6 support. # Note that iPhoneOS-V6 support is not available with the iOS6 SDK. -declare -r PLATFORMS="iPhoneSimulator iPhoneOS-V7 iPhoneOS-V7s" +declare -r PLATFORMS="iPhoneSimulator iPhoneOS-V7 iPhoneOS-V7s iPhoneOS-V7-arm64" declare -r SRCDIR=$(dirname $0) declare -r TOPDIR=$(pwd) declare -r BUILDDIR="${TOPDIR}/iosbuild" @@ -50,7 +50,12 @@ mkdir -p ${TARGETDIR}/Headers/ [[ -e ${SRCDIR}/configure ]] || (cd ${SRCDIR} && sh autogen.sh) for PLATFORM in ${PLATFORMS}; do - if [[ "${PLATFORM}" == "iPhoneOS-V7s" ]]; then + ARCH2="" + if [[ "${PLATFORM}" == "iPhoneOS-V7-arm64" ]]; then + PLATFORM="iPhoneOS" + ARCH="aarch64" + ARCH2="arm64" + elif [[ "${PLATFORM}" == "iPhoneOS-V7s" ]]; then PLATFORM="iPhoneOS" ARCH="armv7s" elif [[ "${PLATFORM}" == "iPhoneOS-V7" ]]; then @@ -67,8 +72,8 @@ for PLATFORM in ${PLATFORMS}; do mkdir -p "${ROOTDIR}" SDKROOT="${PLATFORMSROOT}/${PLATFORM}.platform/Developer/SDKs/${PLATFORM}${SDK}.sdk/" - CFLAGS="-arch ${ARCH} -pipe -isysroot ${SDKROOT}" - LDFLAGS="-arch ${ARCH} -pipe -isysroot ${SDKROOT}" + CFLAGS="-arch ${ARCH2:-${ARCH}} -pipe -isysroot ${SDKROOT}" + LDFLAGS="-arch ${ARCH2:-${ARCH}} -pipe -isysroot ${SDKROOT}" if [[ -z "${XCODE}" ]]; then echo "XCODE not available"