Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jun 2010 11:16:18 GMT
From:      Andrius Morkunas <andrius@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 179674 for review
Message-ID:  <201006161116.o5GBGITa091676@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@179674?ac=10

Change 179674 by andrius@klevas on 2010/06/16 11:15:36

	Move stuff around.
	
	Move PORTS_CC handling out from bsd.port.mk to bsd.compiler.mk.

Affected files ...

.. //depot/projects/soc2010/clangports/ports/Mk/bsd.compiler.mk#1 add
.. //depot/projects/soc2010/clangports/ports/Mk/bsd.port.mk#5 edit

Differences ...

==== //depot/projects/soc2010/clangports/ports/Mk/bsd.port.mk#5 (text+ko) ====

@@ -1161,6 +1161,7 @@
 INDEXDIR?=		${PORTSDIR}
 
 .include "${PORTSDIR}/Mk/bsd.commands.mk"
+.include "${PORTSDIR}/Mk/bsd.compiler.mk"
 
 #
 # DESTDIR section to start a chrooted process if invoked with DESTDIR set
@@ -1747,52 +1748,6 @@
 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 !empty(USE_CC:Mgcc*) && empty(USE_CC:Mclang*)
-PORTS_CC=	gcc
-.elif !empty(USE_CC:Mclang*) && empty(USE_CC:Mgcc*)
-PORTS_CC=	clang
-.endif
-.endif
-
-# Handle PORTS_CC
-# GCC
-.if !empty(PORTS_CC:M*gcc*) || defined(USE_GCC)
-# These are set early so that USE_GCC can override it later if neccessary.
-CC=			${PORTS_CC}
-CXX=		${PORTS_CC:S/cc/++/}
-
-# Translate USE_CC to USE_GCC if the former is defined.
-.if defined(USE_CC) && !empty(USE_CC:Mgcc*)
-USE_GCC=	${USE_CC:Mgcc*:S/gcc//}
-.endif
-
-# If USE_GCC is defined, doesn't require specific version and accepts version
-# from PORTS_CC, override USE_GCC with version from PORTS_CC.
-.if defined(USE_GCC) && !empty(USE_GCC:M*+) && !empty(PORTS_CC:Mgcc??)
-. if ${PORTS_CC:C/gcc([0-9])([0-9])/\1.\2/} > ${USE_GCC:S/+//}
-USE_GCC=${PORTS_CC:C/gcc([0-9])([0-9])/\1.\2/}
-. endif
-.endif
-
-# Clang
-.elif !empty(PORTS_CC:Mclang*)
-# TODO: handle something like USE_CLANG here when/if there's need for that
-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?201006161116.o5GBGITa091676>