[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 16:53:33 CET 2019


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



More information about the vlc-devel mailing list