summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2015-10-12 14:54:06 +0300
committerSebastian Dröge <sebastian@centricular.com>2015-10-12 14:55:10 +0300
commit2d5677fe9d68a35d7bcf2b3af67d822cb3976064 (patch)
treea5d7f598633a2057424807d963b3f2f8d095e191
parent10df7fb4ea305bd7b1f94b45e7a2edaf3ef6eb41 (diff)
libvpx: Backport some patches from upstream to hopefully fix iOS build with XCode 7
-rw-r--r--recipes/libvpx.recipe3
-rw-r--r--recipes/libvpx/0001-build-make-configure.sh-docs-for-soft_-dis-en-able.patch41
-rw-r--r--recipes/libvpx/0002-build-make-configure.sh-Fix-armv7-builds-in-Xcode7.patch92
-rw-r--r--recipes/libvpx/0003-build-make-configure.sh-Silence-arm-target-Xcode7-li.patch32
4 files changed, 168 insertions, 0 deletions
diff --git a/recipes/libvpx.recipe b/recipes/libvpx.recipe
index e616395e..e01e811f 100644
--- a/recipes/libvpx.recipe
+++ b/recipes/libvpx.recipe
@@ -27,6 +27,9 @@ class Recipe(recipe.Recipe):
'libvpx/0004-Add-android-x86_64-target.patch',
'libvpx/0005-build-Remove-broken-custom-android-toolchain-usage.patch',
'libvpx/0006-configure-Add-Android-ARM64-support.patch',
+ 'libvpx/0001-build-make-configure.sh-docs-for-soft_-dis-en-able.patch',
+ 'libvpx/0002-build-make-configure.sh-Fix-armv7-builds-in-Xcode7.patch',
+ 'libvpx/0003-build-make-configure.sh-Silence-arm-target-Xcode7-li.patch',
]
files_libs = ['libvpx']
diff --git a/recipes/libvpx/0001-build-make-configure.sh-docs-for-soft_-dis-en-able.patch b/recipes/libvpx/0001-build-make-configure.sh-docs-for-soft_-dis-en-able.patch
new file mode 100644
index 00000000..ee22992c
--- /dev/null
+++ b/recipes/libvpx/0001-build-make-configure.sh-docs-for-soft_-dis-en-able.patch
@@ -0,0 +1,41 @@
+From 02be438d0a1e419ba9b00340c96f2befd815bcb1 Mon Sep 17 00:00:00 2001
+From: Tom Finegan <tomfinegan@google.com>
+Date: Wed, 23 Sep 2015 11:42:37 -0700
+Subject: [PATCH 1/3] build/make/configure.sh: docs for soft_{dis|en}able.
+
+Add function comments explaining what the functions do and do not do.
+
+Change-Id: I23dea09f93bc5cdbea6a0077f90683a1df2f74dc
+---
+ build/make/configure.sh | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/build/make/configure.sh b/build/make/configure.sh
+index fc653f1..46fde74 100644
+--- a/build/make/configure.sh
++++ b/build/make/configure.sh
+@@ -200,6 +200,10 @@ disabled(){
+ eval test "x\$$1" = "xno"
+ }
+
++# Iterates through positional parameters, checks to confirm the parameter has
++# not been explicitly (force) disabled, and enables the setting controlled by
++# the parameter when the setting is not disabled.
++# Note: Does NOT alter RTCD generation options ($RTCD_OPTIONS).
+ soft_enable() {
+ for var in $*; do
+ if ! disabled $var; then
+@@ -209,6 +213,10 @@ soft_enable() {
+ done
+ }
+
++# Iterates through positional parameters, checks to confirm the parameter has
++# not been explicitly (force) enabled, and disables the setting controlled by
++# the parameter when the setting is not enabled.
++# Note: Does NOT alter RTCD generation options ($RTCD_OPTIONS).
+ soft_disable() {
+ for var in $*; do
+ if ! enabled $var; then
+--
+2.6.1
+
diff --git a/recipes/libvpx/0002-build-make-configure.sh-Fix-armv7-builds-in-Xcode7.patch b/recipes/libvpx/0002-build-make-configure.sh-Fix-armv7-builds-in-Xcode7.patch
new file mode 100644
index 00000000..d74bc386
--- /dev/null
+++ b/recipes/libvpx/0002-build-make-configure.sh-Fix-armv7-builds-in-Xcode7.patch
@@ -0,0 +1,92 @@
+From 1f73ac4c5cef57fd10144e7ecfa299d5680d4ba3 Mon Sep 17 00:00:00 2001
+From: Tom Finegan <tomfinegan@google.com>
+Date: Fri, 18 Sep 2015 15:58:41 -0700
+Subject: [PATCH 2/3] build/make/configure.sh: Fix armv7 builds in Xcode7.
+
+- Use the iphoneos SDK path (instead of macosx).
+- Detect iOS SDK major version and disable media (armv6) when using
+ iOS SDK version 9 or higher.
+
+BUG=https://code.google.com/p/webm/issues/detail?id=1075
+
+Change-Id: I12f77dbeee4c0084e8322f6841813da8b5e91c16
+---
+ build/make/configure.sh | 44 +++++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 41 insertions(+), 3 deletions(-)
+
+diff --git a/build/make/configure.sh b/build/make/configure.sh
+index 46fde74..28c8eee 100644
+--- a/build/make/configure.sh
++++ b/build/make/configure.sh
+@@ -625,6 +625,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)}"
+@@ -750,7 +755,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}"
+@@ -826,12 +838,38 @@ process_common_toolchain() {
+ if disabled neon && enabled neon_asm; then
+ die "Disabling neon while keeping neon-asm is not supported"
+ fi
+- soft_enable media
+ soft_enable fast_unaligned
++ 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
+ soft_enable fast_unaligned
++ 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
+
+--
+2.6.1
+
diff --git a/recipes/libvpx/0003-build-make-configure.sh-Silence-arm-target-Xcode7-li.patch b/recipes/libvpx/0003-build-make-configure.sh-Silence-arm-target-Xcode7-li.patch
new file mode 100644
index 00000000..e01f5971
--- /dev/null
+++ b/recipes/libvpx/0003-build-make-configure.sh-Silence-arm-target-Xcode7-li.patch
@@ -0,0 +1,32 @@
+From b8954a822f45b3facf27cb5af6ae2b0cda3d688c Mon Sep 17 00:00:00 2001
+From: Tom Finegan <tomfinegan@google.com>
+Date: Fri, 18 Sep 2015 16:01:32 -0700
+Subject: [PATCH 3/3] build/make/configure.sh: Silence arm target Xcode7 link
+ warnings.
+
+Always add IOS_VERSION_MIN to darwin arm cflags. The warning occured
+because the default (9.0) does not match the value set by configure
+(6.0).
+
+BUG=https://code.google.com/p/webm/issues/detail?id=1075
+
+Change-Id: Ia9085ceeca10e057f9eb781c14f07581bb6280a5
+---
+ build/make/configure.sh | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/build/make/configure.sh b/build/make/configure.sh
+index 28c8eee..b8465fd 100644
+--- a/build/make/configure.sh
++++ b/build/make/configure.sh
+@@ -756,6 +756,7 @@ process_common_toolchain() {
+ # platforms, so use the newest one available.
+ case ${toolchain} in
+ arm*-darwin*)
++ add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
+ iphoneos_sdk_dir="$(show_darwin_sdk_path iphoneos)"
+ if [ -d "${iphoneos_sdk_dir}" ]; then
+ add_cflags "-isysroot ${iphoneos_sdk_dir}"
+--
+2.6.1
+