summaryrefslogtreecommitdiff
path: root/Mk/Uses/compiler.mk
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2013-10-14 16:46:20 +0000
committerJohn Marino <marino@FreeBSD.org>2013-10-14 16:46:20 +0000
commitaed7d5fbc5998c901f1463df0416c7d326b6a85e (patch)
tree3cc779c5905b603653ce79ad200c7fdd9982f765 /Mk/Uses/compiler.mk
parent- Simplify and modernize use.perl (diff)
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)
Notes
Notes: svn path=/head/; revision=330336
Diffstat (limited to 'Mk/Uses/compiler.mk')
-rw-r--r--Mk/Uses/compiler.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/Mk/Uses/compiler.mk b/Mk/Uses/compiler.mk
index dae92a149d6c..82535bcd9dbd 100644
--- a/Mk/Uses/compiler.mk
+++ b/Mk/Uses/compiler.mk
@@ -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