summaryrefslogtreecommitdiff
path: root/build/make/configure.sh
diff options
context:
space:
mode:
authorTom Finegan <tomfinegan@chromium.org>2015-09-24 18:44:23 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-09-24 18:44:23 +0000
commit4327d509043c82b2854c28f3326d6ce16b47af06 (patch)
treeb317529a57b041cb548135372a52faeb77452dd6 /build/make/configure.sh
parent6002212d2b56b62f680450641e568138b9086601 (diff)
parent6cf994b924b102f4727c505e0ad0137ab275a923 (diff)
downloadlibvpx-4327d509043c82b2854c28f3326d6ce16b47af06.tar
libvpx-4327d509043c82b2854c28f3326d6ce16b47af06.tar.gz
libvpx-4327d509043c82b2854c28f3326d6ce16b47af06.tar.bz2
libvpx-4327d509043c82b2854c28f3326d6ce16b47af06.zip
Merge "build/make/configure.sh: Fix armv7 builds in Xcode7."
Diffstat (limited to 'build/make/configure.sh')
-rw-r--r--build/make/configure.sh44
1 files changed, 41 insertions, 3 deletions
diff --git a/build/make/configure.sh b/build/make/configure.sh
index 201489a52..1ccdd7353 100644
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -633,6 +633,11 @@ show_darwin_sdk_path() {
xcodebuild -sdk $1 -version Path 2>/dev/null
}
+# Print the major version number of the Darwin SDK specified by $1.
+show_darwin_sdk_major_version() {
+ xcrun --sdk $1 --show-sdk-version 2>/dev/null | cut -d. -f1
+}
+
process_common_toolchain() {
if [ -z "$toolchain" ]; then
gcctarget="${CHOST:-$(gcc -dumpmachine 2> /dev/null)}"
@@ -744,7 +749,14 @@ process_common_toolchain() {
# Handle darwin variants. Newer SDKs allow targeting older
# platforms, so use the newest one available.
case ${toolchain} in
- *-darwin*)
+ arm*-darwin*)
+ iphoneos_sdk_dir="$(show_darwin_sdk_path iphoneos)"
+ if [ -d "${iphoneos_sdk_dir}" ]; then
+ add_cflags "-isysroot ${iphoneos_sdk_dir}"
+ add_ldflags "-isysroot ${iphoneos_sdk_dir}"
+ fi
+ ;;
+ x86*-darwin*)
osx_sdk_dir="$(show_darwin_sdk_path macosx)"
if [ -d "${osx_sdk_dir}" ]; then
add_cflags "-isysroot ${osx_sdk_dir}"
@@ -819,10 +831,36 @@ process_common_toolchain() {
if disabled neon && enabled neon_asm; then
die "Disabling neon while keeping neon-asm is not supported"
fi
- soft_enable media
+ case ${toolchain} in
+ # Apple iOS SDKs no longer support armv6 as of the version 9
+ # release (coincides with release of Xcode 7). Only enable media
+ # when using earlier SDK releases.
+ *-darwin*)
+ if [ "$(show_darwin_sdk_major_version iphoneos)" -lt 9 ]; then
+ soft_enable media
+ else
+ soft_disable media
+ RTCD_OPTIONS="${RTCD_OPTIONS}--disable-media "
+ fi
+ ;;
+ *)
+ soft_enable media
+ ;;
+ esac
;;
armv6)
- soft_enable media
+ case ${toolchain} in
+ *-darwin*)
+ if [ "$(show_darwin_sdk_major_version iphoneos)" -lt 9 ]; then
+ soft_enable media
+ else
+ die "Your iOS SDK does not support armv6."
+ fi
+ ;;
+ *)
+ soft_enable media
+ ;;
+ esac
;;
esac