[vlc-devel] [PATCH v2 02/13] contrib: share the environment to use to build native tools

Rémi Denis-Courmont remi at remlab.net
Tue Mar 24 16:42:02 CET 2020


Le tiistaina 24. maaliskuuta 2020, 16.46.20 EET Steve Lhomme a écrit :
> Unset the main environment variables that may affect basic
> compilation/linking.
> 
> When not cross-compiling we use the same environment as the rest of the
> compiled contribs.
> ---
>  contrib/src/main.mak | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/contrib/src/main.mak b/contrib/src/main.mak
> index 708885cdec..7105dc508a 100644
> --- a/contrib/src/main.mak
> +++ b/contrib/src/main.mak
> @@ -338,6 +338,15 @@ HOSTVARS_PIC := $(HOSTTOOLS) \
>  	CXXFLAGS="$(CXXFLAGS) $(PIC)" \
>  	LDFLAGS="$(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)" +else
> +BUILDVARS := $(HOSTVARS)
> +BUILDCONF := $(HOSTCONF)
> +endif
> +

This is rather dubious. Why do we use defaults in cross-builds, but bootstrap 
in native builds? I don't see why we would want to debug the cross tools any 
more or less (we probably don't want to debug them).

>  download_git = \
>  	rm -Rf -- "$(@:.tar.xz=)" && \
>  	$(GIT) init --bare "$(@:.tar.xz=)" && \


-- 
レミ・デニ-クールモン
http://www.remlab.net/





More information about the vlc-devel mailing list