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

Alexandre Janniaux ajanni at videolabs.io
Tue Dec 17 15:13:54 CET 2019


Hi,

On Tue, Dec 17, 2019 at 02:46:05PM +0100, 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)

That's about clarity, but you might want to put the envvar
in a dedicated variable to highlight the intent and have a
nice comment on why this is needed. I don't see that as a
blocker if you don't want.

Regards,
--
Alexandre Janniaux
Videolabs


More information about the vlc-devel mailing list