Skip to content

Commit

Permalink
Allow CC to be gcc46 or similar by matching gcc*.
Browse files Browse the repository at this point in the history
Don't test the value of the :M matches, either the string matches or does
not.
  • Loading branch information
brooksdavis committed Nov 5, 2012
1 parent e570ee3 commit ad91574
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions share/mk/bsd.compiler.mk
@@ -1,17 +1,17 @@
# $FreeBSD$

.if !defined(COMPILER_TYPE)
. if ${CC:T:Mgcc} == "gcc"
. if ${CC:T:Mgcc*}
COMPILER_TYPE:= gcc
. elif ${CC:T:Mclang} == "clang"
. elif ${CC:T:Mclang}
COMPILER_TYPE:= clang
. else
_COMPILER_VERSION!= ${CC} --version
. if ${_COMPILER_VERSION:Mgcc} == "gcc"
. if ${_COMPILER_VERSION:Mgcc}
COMPILER_TYPE:= gcc
. elif ${_COMPILER_VERSION:M\(GCC\)} == "(GCC)"
. elif ${_COMPILER_VERSION:M\(GCC\)}
COMPILER_TYPE:= gcc
. elif ${_COMPILER_VERSION:Mclang} == "clang"
. elif ${_COMPILER_VERSION:Mclang}
COMPILER_TYPE:= clang
. else
.error Unable to determing compiler type for ${CC}
Expand Down

0 comments on commit ad91574

Please sign in to comment.