Date: Mon, 7 Jun 2010 21:15:16 GMT From: Andrius Morkunas <andrius@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 179302 for review Message-ID: <201006072115.o57LFGlk057709@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@179302?ac=10 Change 179302 by andrius@klevas on 2010/06/07 21:14:52 Add support for PORTS_CC, USE_CC. Initial PORTS_CC and some PORTS_CXX support, they replace CC and CXX respectively. USE_CC is intended to be used instead of USE_GCC, but the latter is still supported for backwards compatibility. Affected files ... .. //depot/projects/soc2010/clangports/ports/Mk/bsd.port.mk#2 edit Differences ... ==== //depot/projects/soc2010/clangports/ports/Mk/bsd.port.mk#2 (text+ko) ==== @@ -1747,6 +1747,38 @@ CONFIGURE_ENV+= MAKE=${GMAKE} .endif +# Set the defaults +PORTS_CC?= gcc +# PORTS_CXX should only be set if PORTS_CC is neither gcc nor clang +PORTS_CXX?= g++ + +# handle USE_CC +.if defined(USE_CC) +# Check if port requires specific compiler +.if ${USE_CC:Mgcc*} != "" && ${USE_CC:Mclang*} == "" +PORTS_CC= gcc +.elif ${USE_CC:Mclang*} != "" && ${USE_CC:Mgcc*} == "" +PORTS_CC= clang +.endif +.endif + +.if (${PORTS_CC:M*gcc*} != "") || defined(USE_GCC) +.if defined(USE_CC) && (${USE_CC:Mgcc*} != "") +USE_GCC= ${USE_CC:Mgcc*:S/gcc//} +.endif +CC= gcc +CXX= g++ +.elif (${PORTS_CC:Mclang*} != "") +# TODO: handle something like USE_CLANG here when/if there's need for that +BUILD_DEPENDS+= clang:${PORTSDIR}/devel/llvm-devel +CC= clang +CXX= clang++ +.else +# PORTS_CC is set to something weird +CC= ${PORTS_CC} +CXX= ${PORTS_CXX} +.endif + .if defined(USE_GCC) || defined(USE_FORTRAN) .include "${PORTSDIR}/Mk/bsd.gcc.mk" .endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006072115.o57LFGlk057709>