From owner-svn-ports-all@FreeBSD.ORG Wed Nov 20 12:41:39 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DACBFCDC; Wed, 20 Nov 2013 12:41:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B08BF27DE; Wed, 20 Nov 2013 12:41:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rAKCfdrH093308; Wed, 20 Nov 2013 12:41:39 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rAKCfdvY093307; Wed, 20 Nov 2013 12:41:39 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201311201241.rAKCfdvY093307@svn.freebsd.org> From: Baptiste Daroussin Date: Wed, 20 Nov 2013 12:41:39 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r334410 - head/Mk/Uses X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Nov 2013 12:41:39 -0000 Author: bapt Date: Wed Nov 20 12:41:39 2013 New Revision: 334410 URL: http://svnweb.freebsd.org/changeset/ports/334410 Log: Add CHOSEN_COMPILER_TYPE which can be clang or gcc It value correspond to the type of compiler chosen by the famework depending on the options Requested by: rene Modified: head/Mk/Uses/compiler.mk Modified: head/Mk/Uses/compiler.mk ============================================================================== --- head/Mk/Uses/compiler.mk Wed Nov 20 12:30:29 2013 (r334409) +++ head/Mk/Uses/compiler.mk Wed Nov 20 12:41:39 2013 (r334410) @@ -17,9 +17,12 @@ # Variable to test after # # COMPILER_TYPE: can be gcc or clang +# ALT_COMPILER_TYPE: can be gcc or clang depending on COMPILER_TYPE and only set if the base system has 2 compiler # COMPILER_VERSION: 2 first digit of the version: 33 for clang 3.3.*, 46 for gcc 4.6.* +# ALT_COMPILER_VERSION: 2 first digit of the version: 33 for clang 3.3.*, 46 for gcc 4.6.* of the ALT_COMPILER_TYPE # # COMPILER_FEATURES: the list of features supported by the compiler include the standard C++ library. +# CHOSEN_COMPILER_TYPE: can be gcc or clang (type of compiler chosen by the famework) .if !defined(_INCLUDE_USES_COMPILER_MK) _INCLUDE_USES_COMPILER_MK= yes @@ -75,9 +78,12 @@ ALT_COMPILER_TYPE= clang ALT_COMPILER_TYPE= gcc .endif +CHOSEN_COMPILER_TYPE= ${COMPILER_TYPE} + .if ${_COMPILER_ARGS:Mopenmp} .if ${COMPILER_TYPE} == clang USE_GCC= yes +CHOSEN_COMPILER_TYPE= gcc .endif .endif @@ -107,8 +113,10 @@ COMPILER_FEATURES+= ${std} .if ${_COMPILER_ARGS:Mc++11-lib} .if !${COMPILER_FEATURES:Mc++11} USE_GCC= yes +CHOSEN_COMPILER_TYPE= gcc .elif ${COMPILER_TYPE} == clang && ${COMPILER_FEATURES:Mlibstdc++} USE_GCC= yes +CHOSEN_COMPILER_TYPE= gcc .endif .endif @@ -116,16 +124,19 @@ USE_GCC= yes .if !${COMPILER_FEATURES:Mc++11} .if defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc USE_GCC= yes +CHOSEN_COMPILER_TYPE= gcc .elif (${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 33) || ${COMPILER_TYPE} == gcc .if ${ALT_COMPILER_TYPE} == clang && ${ALT_COMPILER_VERSION} >= 33 CPP= clang-cpp CC= clang CXX= clang++ +CHOSEN_COMPILER_TYPE= clang .else BUILD_DEPENDS+= ${LOCALBASE}/bin/clang33:${PORTSDIR}/lang/clang33 CPP= ${LOCALBASE}/bin/clang-cpp33 CC= ${LOCALBASE}/bin/clang33 CXX= ${LOCALBASE}/bin/clang++33 +CHOSEN_COMPILER_TYPE= clang .if ${OSVERSION} < 900033 USE_BINUTILS= yes LDFLAGS+= -B${LOCALBASE}/bin @@ -139,8 +150,10 @@ LDFLAGS+= -B${LOCALBASE}/bin .if !${COMPILER_FEATURES:Mc11} .if defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc USE_GCC= yes +CHOSEN_COMPILER_TYPE= gcc .elif (${COMPILER_TYPE} == clang && ${COMPILER_VERSION} < 33) || ${COMPILER_TYPE} == gcc BUILD_DEPENDS+= ${LOCALBASE}/bin/clang33:${PORTSDIR}/lang/clang33 +CHOSEN_COMPILER_TYPE= clang CPP= ${LOCALBASE}/bin/clang-cpp33 CC= ${LOCALBASE}/bin/clang33 CXX= ${LOCALBASE}/bin/clang++33