summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann <johannkoenig@google.com>2013-11-13 14:05:27 -0800
committerJohann <johannkoenig@google.com>2013-11-15 08:36:31 -0800
commit5d0c33b8e51de02dc10f764ee87f67a7dcd8a21b (patch)
tree1c3b0930c3ee554e354fd18010889db917930a45
parentffb17e2c09c3e6de00b07da6e35f47e2ff6c7952 (diff)
downloadlibvpx-5d0c33b8e51de02dc10f764ee87f67a7dcd8a21b.tar.gz
libvpx-5d0c33b8e51de02dc10f764ee87f67a7dcd8a21b.tar.bz2
libvpx-5d0c33b8e51de02dc10f764ee87f67a7dcd8a21b.zip
Build iOS targets with XCode 5
Thanks to armando.dicianno for the patch Fixes issue #603 Change-Id: I91ec030e5674b82c05115ed4dfbdb8ccbff22b66
-rwxr-xr-xbuild/make/configure.sh43
-rwxr-xr-xconfigure2
2 files changed, 15 insertions, 30 deletions
diff --git a/build/make/configure.sh b/build/make/configure.sh
index b43a4ec18..0106737b8 100755
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -925,41 +925,26 @@ EOF
;;
darwin*)
- if [ -z "${sdk_path}" ]; then
- SDK_PATH=`xcode-select -print-path 2> /dev/null`
- SDK_PATH=${SDK_PATH}/Platforms/iPhoneOS.platform/Developer
- else
- SDK_PATH=${sdk_path}
- fi
- TOOLCHAIN_PATH=${SDK_PATH}/usr/bin
- CXX=${TOOLCHAIN_PATH}/g++
- CC=${TOOLCHAIN_PATH}/gcc
- AR=${TOOLCHAIN_PATH}/ar
- LD=${TOOLCHAIN_PATH}/arm-apple-darwin10-llvm-gcc-4.2
- AS=${TOOLCHAIN_PATH}/as
- STRIP=${TOOLCHAIN_PATH}/strip
- NM=${TOOLCHAIN_PATH}/nm
+
+ XCRUN_FIND="xcrun --sdk iphoneos -find"
+ CXX="$(${XCRUN_FIND} clang++)"
+ CC="$(${XCRUN_FIND} clang)"
+ AR="$(${XCRUN_FIND} ar)"
+ LD="$(${XCRUN_FIND} ld)"
+ AS="$(${XCRUN_FIND} as)"
+ STRIP="$(${XCRUN_FIND} strip)"
+ NM="$(${XCRUN_FIND} nm)"
+ RANLIB="$(${XCRUN_FIND} ranlib)"
AS_SFX=.s
# ASFLAGS is written here instead of using check_add_asflags
# because we need to overwrite all of ASFLAGS and purge the
# options that were put in above
- ASFLAGS="-version -arch ${tgt_isa} -g"
-
- add_cflags -arch ${tgt_isa}
- add_ldflags -arch_only ${tgt_isa}
-
- if [ -z "${alt_libc}" ]; then
- alt_libc=${SDK_PATH}/SDKs/iPhoneOS6.0.sdk
- fi
-
- add_cflags "-isysroot ${alt_libc}"
+ ASFLAGS="-arch ${tgt_isa} -g"
- # Add the paths for the alternate libc
- for d in usr/include; do
- try_dir="${alt_libc}/${d}"
- [ -d "${try_dir}" ] && add_cflags -I"${try_dir}"
- done
+ alt_libc="$(xcrun --sdk iphoneos --show-sdk-path)"
+ add_cflags -arch ${tgt_isa} -isysroot ${alt_libc}
+ add_ldflags -arch ${tgt_isa} -ios_version_min 7.0
for d in lib usr/lib usr/lib/system; do
try_dir="${alt_libc}/${d}"
diff --git a/configure b/configure
index 729c986df..42779a886 100755
--- a/configure
+++ b/configure
@@ -26,7 +26,7 @@ Advanced options:
${toggle_unit_tests} unit tests
--libc=PATH path to alternate libc
--as={yasm|nasm|auto} use specified assembler [auto, yasm preferred]
- --sdk-path=PATH path to root of sdk (iOS, android builds only)
+ --sdk-path=PATH path to root of sdk (android builds only)
${toggle_fast_unaligned} don't use unaligned accesses, even when
supported by hardware [auto]
${toggle_codec_srcs} in/exclude codec library source code