[vlc-devel] [PATCH] contrib: don't pass compiler environment variables to Meson when cross compiling

Steve Lhomme robux4 at ycbcr.xyz
Tue Dec 17 14:50:29 CET 2019


This patch makes the "package/win32: use VLC_EXTRA_CFLAGS environment 
variable" patch unneeded.

Only the extra compiler flags can be added separately. It also makes the 
use of CFLAGS in the environment work safely when cross compiling with 
Meson (they are in the cross compiler).

Thanks to Alexandre Janniaux and Marvin Scholz for the help.

On 2019-12-17 14:46, Steve Lhomme wrote:
> So it doesn't try to use them with the native compiler
> ---
>   contrib/src/main.mak | 11 ++++++-----
>   1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/contrib/src/main.mak b/contrib/src/main.mak
> index 7d701626ba4..575f8548144 100644
> --- a/contrib/src/main.mak
> +++ b/contrib/src/main.mak
> @@ -410,17 +410,18 @@ ifeq ($(V),1)
>   CMAKE += -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
>   endif
>   
> -MESON = meson --default-library static --prefix "$(PREFIX)" --backend ninja \
> -	-Dlibdir=lib
> +ifdef HAVE_CROSS_COMPILE
> +MESON = CFLAGS= CXXFLAGS= LDFLAGS= CPPFLAGS= meson --cross-file $(abspath crossfile.meson)
> +else
> +MESON = meson
> +endif
> +MESON += --default-library static --prefix "$(PREFIX)" --backend ninja -Dlibdir=lib
>   ifndef WITH_OPTIMIZATION
>   MESON += --buildtype debug
>   else
>   MESON += --buildtype release
>   endif
>   
> -ifdef HAVE_CROSS_COMPILE
> -MESON += --cross-file $(abspath crossfile.meson)
> -endif
>   
>   ifdef GPL
>   REQUIRE_GPL =
> -- 
> 2.17.1
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list