summaryrefslogtreecommitdiff
path: root/recipes/libvpx/0001-configure-add-darwin20-support.patch
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2020-11-25 15:54:16 +0000
committerMatthew Waters <matthew@centricular.com>2020-12-07 13:35:46 +1100
commitb3b588a6e75f4114268e1aedd707a3dfbc8fc841 (patch)
tree7c3fcd2ec2c579c10c9cba2f2de4bdb6772a10c3 /recipes/libvpx/0001-configure-add-darwin20-support.patch
parent98edefa2161a57b6740164a514489eb20190c566 (diff)
libvpx: add support for macOS ARM64
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/661>
Diffstat (limited to 'recipes/libvpx/0001-configure-add-darwin20-support.patch')
-rw-r--r--recipes/libvpx/0001-configure-add-darwin20-support.patch96
1 files changed, 96 insertions, 0 deletions
diff --git a/recipes/libvpx/0001-configure-add-darwin20-support.patch b/recipes/libvpx/0001-configure-add-darwin20-support.patch
new file mode 100644
index 00000000..0c045a3a
--- /dev/null
+++ b/recipes/libvpx/0001-configure-add-darwin20-support.patch
@@ -0,0 +1,96 @@
+From 99600f91a83f0d76a28b2ace99298e83b11da65d Mon Sep 17 00:00:00 2001
+From: James Zern <jzern@google.com>
+Date: Fri, 25 Sep 2020 13:21:11 -0700
+Subject: [PATCH] configure: add darwin20 support
+
+this release will have arm64 and x86_64 support. in the future it might
+be useful to move to mac/iphone targets to help disambiguate
+arm64-darwin-gcc and arm64-darwin20-gcc.
+
+Change-Id: I1f8b145303204af316955822f5e8bab51c47f353
+---
+ README | 1 +
+ build/make/configure.sh | 14 +++++++++++---
+ configure | 1 +
+ 3 files changed, 13 insertions(+), 3 deletions(-)
+
+diff --git a/README b/README
+index 8e0da5c..eccc571 100644
+--- a/README
++++ b/README
+@@ -62,6 +62,7 @@ COMPILING THE APPLICATIONS/LIBRARIES:
+
+ arm64-android-gcc
+ arm64-darwin-gcc
++ arm64-darwin20-gcc
+ arm64-linux-gcc
+ arm64-win64-gcc
+ arm64-win64-vs15
+diff --git a/build/make/configure.sh b/build/make/configure.sh
+index 4f3b32b..273fc81 100644
+--- a/build/make/configure.sh
++++ b/build/make/configure.sh
+@@ -799,6 +799,10 @@ process_common_toolchain() {
+ tgt_isa=x86_64
+ tgt_os=darwin17
+ ;;
++ *darwin20*)
++ tgt_isa=`uname -m`
++ tgt_os=`echo $gcctarget | sed 's/.*\(darwin2[0-9]\).*/\1/'`
++ ;;
+ x86_64*mingw32*)
+ tgt_os=win64
+ ;;
+@@ -873,7 +877,7 @@ process_common_toolchain() {
+ # Handle darwin variants. Newer SDKs allow targeting older
+ # platforms, so use the newest one available.
+ case ${toolchain} in
+- arm*-darwin*)
++ arm*-darwin-*)
+ add_cflags "-miphoneos-version-min=${IOS_VERSION_MIN}"
+ iphoneos_sdk_dir="$(show_darwin_sdk_path iphoneos)"
+ if [ -d "${iphoneos_sdk_dir}" ]; then
+@@ -881,7 +885,7 @@ process_common_toolchain() {
+ add_ldflags "-isysroot ${iphoneos_sdk_dir}"
+ fi
+ ;;
+- x86*-darwin*)
++ *-darwin*)
+ osx_sdk_dir="$(show_darwin_sdk_path macosx)"
+ if [ -d "${osx_sdk_dir}" ]; then
+ add_cflags "-isysroot ${osx_sdk_dir}"
+@@ -931,6 +935,10 @@ process_common_toolchain() {
+ add_cflags "-mmacosx-version-min=10.13"
+ add_ldflags "-mmacosx-version-min=10.13"
+ ;;
++ *-darwin20-*)
++ add_cflags "-mmacosx-version-min=10.16"
++ add_ldflags "-mmacosx-version-min=10.16"
++ ;;
+ *-iphonesimulator-*)
+ add_cflags "-mios-simulator-version-min=${IOS_VERSION_MIN}"
+ add_ldflags "-mios-simulator-version-min=${IOS_VERSION_MIN}"
+@@ -1104,7 +1112,7 @@ EOF
+ soft_enable unit_tests
+ ;;
+
+- darwin*)
++ darwin)
+ XCRUN_FIND="xcrun --sdk iphoneos --find"
+ CXX="$(${XCRUN_FIND} clang++)"
+ CC="$(${XCRUN_FIND} clang)"
+diff --git a/configure b/configure
+index b681f1b..f097266 100755
+--- a/configure
++++ b/configure
+@@ -99,6 +99,7 @@ EOF
+ # alphabetically by architecture, generic-gnu last.
+ all_platforms="${all_platforms} arm64-android-gcc"
+ all_platforms="${all_platforms} arm64-darwin-gcc"
++all_platforms="${all_platforms} arm64-darwin20-gcc"
+ all_platforms="${all_platforms} arm64-linux-gcc"
+ all_platforms="${all_platforms} arm64-win64-gcc"
+ all_platforms="${all_platforms} arm64-win64-vs15"
+--
+2.23.0
+