svn commit: r359424 - head/Mk/Uses

Nathan Whitehorn nwhitehorn at FreeBSD.org
Thu Jun 26 22:16:38 UTC 2014


Author: nwhitehorn (src committer)
Date: Thu Jun 26 22:16:37 2014
New Revision: 359424
URL: http://svnweb.freebsd.org/changeset/ports/359424
QAT: https://qat.redports.org/buildarchive/r359424/

Log:
  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

Modified:
  head/Mk/Uses/compiler.mk

Modified: head/Mk/Uses/compiler.mk
==============================================================================
--- head/Mk/Uses/compiler.mk	Thu Jun 26 22:08:49 2014	(r359423)
+++ head/Mk/Uses/compiler.mk	Thu Jun 26 22:16:37 2014	(r359424)
@@ -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


More information about the svn-ports-head mailing list