[vlc-devel] [PATCH 2/6] contrib: share the environment to use to build native tools

Steve Lhomme robux4 at ycbcr.xyz
Mon Mar 23 16:27:23 CET 2020


Unset the main environment variables that may affect basic compilation/linking.
---
 contrib/src/main.mak | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index fa7751da5a8..cab6b97f822 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -187,6 +187,12 @@ CFLAGS := $(CFLAGS) $(EXTRA_CFLAGS)
 CXXFLAGS := $(CXXFLAGS) $(EXTRA_CFLAGS) $(EXTRA_CXXFLAGS)
 LDFLAGS := $(LDFLAGS) -L$(PREFIX)/lib $(EXTRA_LDFLAGS)
 
+# environment to use to build native programs (build, ie not the host)
+ifdef HAVE_CROSS_COMPILE
+BUILDVARS := env -u CC -u CFLAGS -u CPPFLAGS -u CXX -u CXXFLAGS -u LD -u LDFLAGS -u AR -u CCAS -u RANLIB -u STRIP
+BUILDCONF := --prefix="$(BUILDPREFIX)" --build="$(BUILD)" --host="$(BUILD)" --target="$(HOST)"
+endif
+
 ifdef ENABLE_PDB
 CFLAGS := $(CFLAGS) -gcodeview
 CXXFLAGS := $(CXXFLAGS) -gcodeview
-- 
2.17.1



More information about the vlc-devel mailing list