[vlc-devel] [PATCH 2/4] contrib: set the native C/C++ compiler by default if not provided

Steve Lhomme robux4 at ycbcr.xyz
Thu Feb 14 18:22:50 CET 2019


In Debian+WSL these are not available (x86_64-pc-linux-gcc and 
x86_64-pc-linux-g++) on my system.

But 'c99' and 'g++' are available. So it may be a good idea to detect 
them from bootstrap (see other patch).

On 14/02/2019 16:53, Steve Lhomme wrote:
> Many GNU tools rely on these values.
>
> The Clang toolchain of Martin provides these gcc equivalents, but I don't know
> if this will work on clang environment.
>
> We may also detect the proper one in bootstrap, as we do in the VLC configure
> (checking for c99, c11, etc).
> ---
>   contrib/src/main.mak | 9 +++++++++
>   1 file changed, 9 insertions(+)
>
> diff --git a/contrib/src/main.mak b/contrib/src/main.mak
> index 1076a1f010..c9315c7c4a 100644
> --- a/contrib/src/main.mak
> +++ b/contrib/src/main.mak
> @@ -109,6 +109,15 @@ WINDRES := $(HOST)-windres
>   endif
>   endif
>   
> +ifdef HAVE_CROSS_COMPILE
> +ifneq ($(findstring $(origin CC_FOR_BUILD),undefined default),)
> +CC_FOR_BUILD := $(BUILD)-gcc
> +endif
> +ifneq ($(findstring $(origin CXX_FOR_BUILD),undefined default),)
> +CXX_FOR_BUILD := $(BUILD)-g++
> +endif
> +endif
> +
>   ifdef HAVE_ANDROID
>   ifneq ($(findstring $(origin CC),undefined default),)
>   CC :=  clang
> -- 
> 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