Date: Mon, 14 Oct 2013 16:46:21 +0000 (UTC) From: John Marino <marino@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r330336 - head/Mk/Uses Message-ID: <201310141646.r9EGkLGZ017923@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201310141646.r9EGkLGZ017923>