[vlc-commits] contrib: vpx: allow compiling without bitcode

Alexandre Janniaux git at videolan.org
Sun May 3 01:05:21 CEST 2020


vlc | branch: master | Alexandre Janniaux <ajanni at videolabs.io> | Wed Apr 29 18:25:05 2020 +0200| [3041fa4dbc948f45fc2adf2c6597a0c5cb5fa824] | committer: Alexandre Janniaux

contrib: vpx: allow compiling without bitcode

As vpx buildsystem adds -fembed-bitcode as long as iphone target is > 8
it makes the build fails on compilers not supporting bitcode embedding.

In any case, we enable bitcode embedding ourselves by adding it to the
contribs CFLAGS, which ends up in --extra-cflags in vpx.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3041fa4dbc948f45fc2adf2c6597a0c5cb5fa824
---

 contrib/src/vpx/libvpx-remove-bitcode.patch | 17 +++++++++++++++++
 contrib/src/vpx/rules.mak                   |  3 +++
 2 files changed, 20 insertions(+)

diff --git a/contrib/src/vpx/libvpx-remove-bitcode.patch b/contrib/src/vpx/libvpx-remove-bitcode.patch
new file mode 100644
index 0000000000..80de6e5700
--- /dev/null
+++ b/contrib/src/vpx/libvpx-remove-bitcode.patch
@@ -0,0 +1,17 @@
+diff --git a/build/make/configure.sh b/build/make/configure.sh
+index d05d0fa12..0ebf74039 100644
+--- a/build/make/configure.sh
++++ b/build/make/configure.sh
+@@ -1129,12 +1129,6 @@ EOF
+                 fi
+                 ;;
+             esac
+-
+-            if [ "$(show_darwin_sdk_major_version iphoneos)" -gt 8 ]; then
+-              check_add_cflags -fembed-bitcode
+-              check_add_asflags -fembed-bitcode
+-              check_add_ldflags -fembed-bitcode
+-            fi
+           fi
+
+           asm_conversion_cmd="${source_path}/build/make/ads2gas_apple.pl"
diff --git a/contrib/src/vpx/rules.mak b/contrib/src/vpx/rules.mak
index 8576e27c6e..6cd16739ea 100644
--- a/contrib/src/vpx/rules.mak
+++ b/contrib/src/vpx/rules.mak
@@ -21,6 +21,9 @@ ifdef HAVE_ANDROID
 	cp "${ANDROID_NDK}"/sources/android/cpufeatures/cpu-features.c $(UNPACK_DIR)/vpx_ports
 	cp "${ANDROID_NDK}"/sources/android/cpufeatures/cpu-features.h $(UNPACK_DIR)
 endif
+	# Disable automatic addition of -fembed-bitcode for iOS
+	# as it is enabled through --extra-cflags if necessary.
+	$(APPLY) $(SRC)/vpx/libvpx-remove-bitcode.patch
 	$(MOVE)
 
 DEPS_vpx =



More information about the vlc-commits mailing list