[vlc-devel] [PATCH v2 2/2] contrib: Clear HOSTVARS_MESON when cross-compiling

Marvin Scholz epirat07 at gmail.com
Tue Dec 17 15:33:00 CET 2019


---
 contrib/src/main.mak | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 740bf3e336..88069185f1 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -337,16 +337,18 @@ HOSTVARS_PIC := $(HOSTTOOLS) \
 	LDFLAGS="$(LDFLAGS)"
 
 # For cross-compilation with meson, do not set compiler and flags
-# in HOSTVARS as meson will always use them for the BUILD machine compiler!
-MESON_HOST_FLAGS := \
-	CPPFLAGS="$(CPPFLAGS)" \
-	CFLAGS="$(CFLAGS)" \
-	CXXFLAGS="$(CXXFLAGS)" \
-	LDFLAGS="$(LDFLAGS)"
+# as meson will always use them for the BUILD machine compiler!
 ifdef HAVE_CROSS_COMPILE
-HOSTVARS_MESON := PATH="$(PREFIX)/bin:$(PATH)"
+HOSTVARS_MESON := \
+	CC="" CXX="" LD="" \
+	AR="" CCAS="" RANLIB="" STRIP="" \
+	PATH="$(PREFIX)/bin:$(PATH)" \
+	CPPFLAGS="" \
+	CFLAGS="" \
+	CXXFLAGS="" \
+	LDFLAGS=""
 else
-HOSTVARS_MESON := $(HOSTTOOLS) $(MESON_HOST_FLAGS)
+HOSTVARS_MESON := $(HOSTVARS)
 endif
 
 download_git = \
@@ -648,8 +650,7 @@ endif
 endif
 
 crossfile.meson: $(SRC)/gen-meson-crossfile.py
-	$(HOSTTOOLS) \
-	$(MESON_HOST_FLAGS) \
+	$(HOSTVARS) \
 	WINDRES="$(WINDRES)" \
 	PKG_CONFIG="$(PKG_CONFIG)" \
 	HOST_SYSTEM="$(MESON_SYSTEM_NAME)" \
-- 
2.20.1 (Apple Git-117)



More information about the vlc-devel mailing list