From 60af5546d1e51489b50b309e1493686fafef54b4 Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Wed, 25 Jan 2017 20:33:31 +0000 Subject: [PATCH] Build Clang on all architectures if host compiler is C++11 Recent versions of Clang are becoming usable for non-x86 non-arm FreeBSD architectures. If the compiler is capable of building Clang, do so in order to facilitate further testing. Reviewed by: dim, imp Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8267 --- share/mk/src.opts.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 0b11702fb13c..2e5108a20351 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -225,9 +225,10 @@ __TT=${MACHINE} # Clang is enabled, and will be installed as the default /usr/bin/cc. __DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC __DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX -.elif ${COMPILER_FEATURES:Mc++11} && ${__T:Mpowerpc*} -# On powerpc, if an external compiler that supports C++11 is used as ${CC}, -# then Clang is enabled, but GCC is installed as the default /usr/bin/cc. +.elif ${COMPILER_FEATURES:Mc++11} && ${__T} != "riscv64" && ${__T} != "sparc64" +# If an external compiler that supports C++11 is used as ${CC} and Clang +# supports the target, then Clang is enabled but GCC is installed as the +# default /usr/bin/cc. __DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX __DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC .else