[vlc-devel] [PATCH 2/2] contrib: share the environment to use to build native tools
Rémi Denis-Courmont
remi at remlab.net
Mon Mar 23 14:12:36 CET 2020
Le maanantaina 23. maaliskuuta 2020, 14.39.44 EET Steve Lhomme a écrit :
> Unset the main environment variables that may affect basic
> compilation/linking. ---
> contrib/src/lua/rules.mak | 2 +-
> contrib/src/main.mak | 2 ++
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/contrib/src/lua/rules.mak b/contrib/src/lua/rules.mak
> index 2ee660ddf87..c30724a4ca9 100644
> --- a/contrib/src/lua/rules.mak
> +++ b/contrib/src/lua/rules.mak
> @@ -91,7 +91,7 @@ endif
>
> ifdef HAVE_CROSS_COMPILE
> # Remove the cross-compiler environment for the native compiler
> -LUACVARS=CFLAGS="" CPPFLAGS="" LDFLAGS=""
> +LUACVARS=$(NATIVE_ENV)
> else
> ifdef HAVE_WIN32
> LUACVARS=CPPFLAGS="-DLUA_DL_DLL"
> diff --git a/contrib/src/main.mak b/contrib/src/main.mak
> index fa7751da5a8..63a5de28287 100644
> --- a/contrib/src/main.mak
> +++ b/contrib/src/main.mak
> @@ -187,6 +187,8 @@ CFLAGS := $(CFLAGS) $(EXTRA_CFLAGS)
> CXXFLAGS := $(CXXFLAGS) $(EXTRA_CFLAGS) $(EXTRA_CXXFLAGS)
> LDFLAGS := $(LDFLAGS) -L$(PREFIX)/lib $(EXTRA_LDFLAGS)
>
> +NATIVE_ENV := env -u CC -u CFLAGS -u CPPFLAGS -u CXX -u CXXFLAGS -u LD -u
> LDFLAGS -u AR -u CCAS -u RANLIB -u STRIP +
I agree that we should factor something to that end. But keeping in line with
the HOSTVARS name, I suppose I'd call it BUILDVARS.
> ifdef ENABLE_PDB
> CFLAGS := $(CFLAGS) -gcodeview
> CXXFLAGS := $(CXXFLAGS) -gcodeview
--
Реми Дёни-Курмон
http://www.remlab.net/
More information about the vlc-devel
mailing list