diff options
author | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2014-06-26 22:16:37 +0000 |
---|---|---|
committer | Nathan Whitehorn <nwhitehorn@FreeBSD.org> | 2014-06-26 22:16:37 +0000 |
commit | 275f89be810640dd0fa54f52867d860489c50572 (patch) | |
tree | 26cbb7a13851ebe7db69c2a1533710d1be391864 /Mk/Uses/compiler.mk | |
parent | - Update from 9.04 to 9.05 (diff) |
On some Tier-2 platforms (e.g. PowerPC), clang kind of works and so is
installed but is not cc. On such platforms, clang is usually not default
for a reason and so using it for C++11 is unwise. Instead, fall back to
newer GCC. On i386 and amd64, clang works even if it isn't the default,
so continue using it there.
This fixes the build for Boost, among other software, on PowerPC.
Approved by: bapt
Notes
Notes:
svn path=/head/; revision=359424
Diffstat (limited to 'Mk/Uses/compiler.mk')
-rw-r--r-- | Mk/Uses/compiler.mk | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Mk/Uses/compiler.mk b/Mk/Uses/compiler.mk index 1eb1973f369e..65080317618c 100644 --- a/Mk/Uses/compiler.mk +++ b/Mk/Uses/compiler.mk @@ -75,7 +75,9 @@ ALT_COMPILER_VERSION= 0 ALT_COMPILER_TYPE= none _ALTCCVERSION= .if ${COMPILER_TYPE} == gcc && exists(/usr/bin/clang) +.if ${ARCH} == amd64 || ${ARCH} == i386 # clang often non-default for a reason _ALTCCVERSION!= /usr/bin/clang --version +.endif .elif ${COMPILER_TYPE} == clang && exists(/usr/bin/gcc) _ALTCCVERSION!= /usr/bin/gcc --version .endif @@ -138,7 +140,7 @@ CHOSEN_COMPILER_TYPE= gcc .if ${_COMPILER_ARGS:Mc++11-lang} .if !${COMPILER_FEATURES:Mc++11} -.if defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc +.if (defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc) || (${ARCH} != amd64 || ${ARCH} != i386) # clang not always supported on Tier-2 USE_GCC= yes CHOSEN_COMPILER_TYPE= gcc .elif (${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 33) || ${COMPILER_TYPE} == gcc |