From owner-svn-ports-all@FreeBSD.ORG Mon Oct 14 16:46:21 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7C497ECF; Mon, 14 Oct 2013 16:46:21 +0000 (UTC) (envelope-from marino@FreeBSD.org) 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 69DE4262E; Mon, 14 Oct 2013 16:46:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9EGkL6h017924; Mon, 14 Oct 2013 16:46:21 GMT (envelope-from marino@svn.freebsd.org) Received: (from marino@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9EGkLGZ017923; Mon, 14 Oct 2013 16:46:21 GMT (envelope-from marino@svn.freebsd.org) Message-Id: <201310141646.r9EGkLGZ017923@svn.freebsd.org> From: John Marino Date: Mon, 14 Oct 2013 16:46:21 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r330336 - 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.14 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: Mon, 14 Oct 2013 16:46:21 -0000 Author: marino Date: Mon Oct 14 16:46:20 2013 New Revision: 330336 URL: http://svnweb.freebsd.org/changeset/ports/330336 Log: Mk/Uses/compiler.mk: Ensure COMPILER_TYPE can only be clang or gcc The compiler.mk comments and code state that COMPILER_TYPE can only be of the value "clang" or "gcc". However, the code that determines this allows for a possible undefined third state (empty string). BMake will emit a lot of errors about badly formatted conditionals if COMPILER_TYPE is empty. Since, by definition, if the COMPILER_TYPE is not clang, it must be gcc, so skip the conditional gcc check and just set it. The entire file must be updated if support for additional compilers is desired. This bug was discovered because the gcc detection code failed to identify the DragonFly base compiler (GCC 4.7.3) as gcc. Approved by: portmgr (bapt) Modified: head/Mk/Uses/compiler.mk Modified: head/Mk/Uses/compiler.mk ============================================================================== --- head/Mk/Uses/compiler.mk Mon Oct 14 16:22:34 2013 (r330335) +++ head/Mk/Uses/compiler.mk Mon Oct 14 16:46:20 2013 (r330336) @@ -55,7 +55,7 @@ _CCVERSION!= ${CC} --version COMPILER_VERSION= ${_CCVERSION:M[0-9].[0-9]*:C/([0-9]).([0-9]).*/\1\2/g} .if ${_CCVERSION:Mclang} COMPILER_TYPE= clang -.elif ${_CCVERSION:Mgcc*} || ${_CCVERSION:M\(GCC\)} +.else COMPILER_TYPE= gcc .endif