[vlc-commits] ios compilation script: add support for future Xcode releases

Felix Paul Kühne git at videolan.org
Mon Sep 1 23:35:34 CEST 2014


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Mon Sep  1 23:34:59 2014 +0200| [c8803e34fe597809dd5b558e0cdcc811c0cc41fd] | committer: Felix Paul Kühne

ios compilation script: add support for future Xcode releases

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c8803e34fe597809dd5b558e0cdcc811c0cc41fd
---

 extras/package/ios/build.sh |   34 ++++++++++++++++++++++++++++------
 1 file changed, 28 insertions(+), 6 deletions(-)

diff --git a/extras/package/ios/build.sh b/extras/package/ios/build.sh
index b5aa364..5c411f7 100755
--- a/extras/package/ios/build.sh
+++ b/extras/package/ios/build.sh
@@ -5,6 +5,7 @@ PLATFORM=OS
 VERBOSE=no
 SDK_VERSION=7.0
 SDK_MIN=5.1
+64BIT_SDK_MIN=7.0
 ARCH=armv7
 
 usage()
@@ -130,15 +131,22 @@ export STRIP="xcrun strip"
 export PLATFORM=$PLATFORM
 export SDK_VERSION=$SDK_VERSION
 
+export CFLAGS="-isysroot ${SDKROOT} -arch ${ARCH} ${OPTIM}"
 if [ "$PLATFORM" = "OS" ]; then
-export CFLAGS="-isysroot ${SDKROOT} -arch ${ARCH} -miphoneos-version-min=${SDK_MIN} ${OPTIM}"
 if [ "$ARCH" != "arm64" ]; then
-export CFLAGS="${CFLAGS} -mcpu=cortex-a8"
+export CFLAGS="${CFLAGS} -mcpu=cortex-a8 -miphoneos-version-min=${SDK_MIN}"
+else
+export CFLAGS="${CFLAGS} -miphoneos-version-min=${64BIT_SDK_MIN}"
 fi
 else
-export CFLAGS="-isysroot ${SDKROOT} -arch ${ARCH} -miphoneos-version-min=${SDK_MIN} ${OPTIM}"
+if [ "$ARCH" != "x86_64" ]; then
+export CFLAGS="${CFLAGS} -miphoneos-version-min=${SDK_MIN}"
+else
+export CFLAGS="${CFLAGS} -miphoneos-version-min=${64BIT_SDK_MIN}"
 fi
 
+export CXXFLAGS="${CFLAGS} -stdlib=libstdc++"
+
 export CPPFLAGS="${CFLAGS}"
 
 export CPP="xcrun cc -E"
@@ -151,21 +159,35 @@ if [ "$PLATFORM" = "Simulator" ]; then
     export OBJCFLAGS="-fobjc-abi-version=2 -fobjc-legacy-dispatch ${OBJCFLAGS}"
 fi
 
-export LDFLAGS="-L${SDKROOT}/usr/lib -arch ${ARCH} -isysroot ${SDKROOT} -miphoneos-version-min=${SDK_MIN}"
+export LDFLAGS="-L${SDKROOT}/usr/lib -arch ${ARCH} -isysroot ${SDKROOT}"
 
 if [ "$PLATFORM" = "OS" ]; then
     EXTRA_CFLAGS="-arch ${ARCH}"
 if [ "$ARCH" != "arm64" ]; then
     EXTRA_CFLAGS+=" -mcpu=cortex-a8"
+    EXTRA_CFLAGS+=" -miphoneos-version-min=${SDK_MIN}"
+    EXTRA_LDFLAGS+=" -miphoneos-version-min=${SDK_MIN}"
+    export LDFLAGS="${LDFLAGS} -miphoneos-version-min=${SDK_MIN}"
+else
+    EXTRA_CFLAGS+=" -miphoneos-version-min=${64BIT_SDK_MIN}"
+    EXTRA_LDFLAGS+=" -miphoneos-version-min=${64BIT_SDK_MIN}"
+    export LDFLAGS="${LDFLAGS} -miphoneos-version-min=${64BIT_SDK_MIN}"
 fi
     EXTRA_LDFLAGS="-arch ${ARCH}"
 else
     EXTRA_CFLAGS="-arch ${ARCH}"
     EXTRA_LDFLAGS="-arch ${ARCH}"
+if [ "$ARCH" != "x86_64" ]; then
+    EXTRA_CFLAGS+=" -miphoneos-version-min=${SDK_MIN}"
+    EXTRA_LDFLAGS+=" -miphoneos-version-min=${SDK_MIN}"
+    export LDFLAGS="${LDFLAGS} -miphoneos-version-min=${SDK_MIN}"
+else
+    EXTRA_CFLAGS+=" -miphoneos-version-min=${64BIT_SDK_MIN}"
+    EXTRA_LDFLAGS+=" -miphoneos-version-min=${64BIT_SDK_MIN}"
+    export LDFLAGS="${LDFLAGS} -miphoneos-version-min=${64BIT_SDK_MIN}"
+fi
 fi
 
-EXTRA_CFLAGS+=" -miphoneos-version-min=${SDK_MIN}"
-EXTRA_LDFLAGS+=" -miphoneos-version-min=${SDK_MIN}"
 
 info "LD FLAGS SELECTED = '${LDFLAGS}'"
 



More information about the vlc-commits mailing list