Index: source/libvpx/build/make/configure.sh |
=================================================================== |
--- source/libvpx/build/make/configure.sh (revision 292608) |
+++ source/libvpx/build/make/configure.sh (working copy) |
@@ -736,6 +736,9 @@ |
# PIC is probably what we want when building shared libs |
enabled shared && soft_enable pic |
+ # Minimum iOS version for all target platforms (darwin and iphonesimulator). |
+ IOS_VERSION_MIN="6.0" |
+ |
# Handle darwin variants. Newer SDKs allow targeting older |
# platforms, so find the newest SDK available. |
case ${toolchain} in |
@@ -788,8 +791,8 @@ |
add_ldflags "-mmacosx-version-min=10.9" |
;; |
*-iphonesimulator-*) |
- add_cflags "-miphoneos-version-min=5.0" |
- add_ldflags "-miphoneos-version-min=5.0" |
+ add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}" |
+ add_ldflags "-miphoneos-version-min=${IOS_VERSION_MIN}" |
osx_sdk_dir="$(xcrun --sdk iphonesimulator --show-sdk-path)" |
add_cflags "-isysroot ${osx_sdk_dir}" |
add_ldflags "-isysroot ${osx_sdk_dir}" |
@@ -970,12 +973,10 @@ |
;; |
darwin*) |
- |
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)" |
@@ -982,6 +983,18 @@ |
RANLIB="$(${XCRUN_FIND} ranlib)" |
AS_SFX=.s |
+ # Special handling of ld for armv6 because libclang_rt.ios.a does |
+ # not contain armv6 support in Apple's clang package: |
+ # Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn). |
+ # TODO(tomfinegan): Remove this. Our minimum iOS version (6.0) |
+ # renders support for armv6 unnecessary because the 3GS and up |
+ # support neon. |
+ if [ "${tgt_isa}" = "armv6" ]; then |
+ LD="$(${XCRUN_FIND} ld)" |
+ else |
+ LD="${CXX:-$(${XCRUN_FIND} ld)}" |
+ fi |
+ |
# 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 |
@@ -989,8 +1002,14 @@ |
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 |
+ add_ldflags -arch ${tgt_isa} |
+ if [ "${LD}" = "${CXX}" ]; then |
+ add_ldflags -miphoneos-version-min="${IOS_VERSION_MIN}" |
+ else |
+ add_ldflags -ios_version_min "${IOS_VERSION_MIN}" |
+ fi |
+ |
for d in lib usr/lib usr/lib/system; do |
try_dir="${alt_libc}/${d}" |
[ -d "${try_dir}" ] && add_ldflags -L"${try_dir}" |