Allow CC to be gcc46 or similar by matching gcc*.

Don't test the value of the :M matches, either the string matches or does
not.
This commit is contained in:
Brooks Davis 2012-11-05 23:05:14 +00:00
parent 5d0cd92651
commit 909c4d7ec0

View File

@ -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}