diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk index 02d152e209e2..e8397a2c6e86 100644 --- a/share/mk/bsd.compiler.mk +++ b/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}