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

Rémi Denis-Courmont remi at remlab.net
Thu Feb 14 19:10:23 CET 2019


Le torstaina 14. helmikuuta 2019, 17.53.33 EET Steve Lhomme a écrit :
> 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

So, err, how does it work for native compilation?

I would expect x_FOR_BUILD := x, no? (needs reordering)

> +
>  ifdef HAVE_ANDROID
>  ifneq ($(findstring $(origin CC),undefined default),)
>  CC :=  clang


-- 
雷米‧德尼-库尔蒙
http://www.remlab.net/





More information about the vlc-devel mailing list