[vlc-devel] [PATCH] contrib: vpx: Fix linker check on mac build environment

david.fuhrmann at gmail.com david.fuhrmann at gmail.com
Wed May 13 21:28:24 CEST 2020


From: David Fuhrmann <dfuhrmann at videolan.org>

Do not override the LD variable, as this fails the following
configure ld_check with the following error:
"ld: library not found for -lstdc++"

Also, this line seems to be not relevant for compiling the library
only.
---

This patch is for VLC 3.0 branch. For the configuration we use here to
compile VLC, if we call CXX, having CXXFLAGS is mandatory
(especially -stdlib=libc++). This is not needed anymore in vlc.git
as we use a newer min osx version here.

 contrib/src/vpx/darwin-do-not-overwrite-ld.patch | 11 +++++++++++
 contrib/src/vpx/rules.mak                        |  3 +++
 2 files changed, 14 insertions(+)
 create mode 100644 contrib/src/vpx/darwin-do-not-overwrite-ld.patch

diff --git a/contrib/src/vpx/darwin-do-not-overwrite-ld.patch b/contrib/src/vpx/darwin-do-not-overwrite-ld.patch
new file mode 100644
index 0000000000..c69709f7a4
--- /dev/null
+++ b/contrib/src/vpx/darwin-do-not-overwrite-ld.patch
@@ -0,0 +1,11 @@
+--- libvpx/configure.old	2020-05-13 21:15:06.000000000 +0200
++++ libvpx/configure	2020-05-13 21:15:28.000000000 +0200
+@@ -758,8 +758,6 @@
+ EOF
+         ;;
+     esac
+-    # libwebm needs to be linked with C++ standard library
+-    enabled webm_io && LD=${CXX}
+ 
+     # append any user defined extra cflags
+     if [ -n "${extra_cflags}" ] ; then
diff --git a/contrib/src/vpx/rules.mak b/contrib/src/vpx/rules.mak
index 7e899d898e..592116b19d 100644
--- a/contrib/src/vpx/rules.mak
+++ b/contrib/src/vpx/rules.mak
@@ -20,6 +20,9 @@ ifdef HAVE_ANDROID
 	$(APPLY) $(SRC)/vpx/libvpx-android.patch
 	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
+ifdef HAVE_DARWIN_OS
+	$(APPLY) $(SRC)/vpx/darwin-do-not-overwrite-ld.patch
 endif
 	$(MOVE)
 
-- 
2.21.1 (Apple Git-122.3)



More information about the vlc-devel mailing list