]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - share/mk/bsd.compiler.mk
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.git] / share / mk / bsd.compiler.mk
1 # $FreeBSD$
2
3 .if !defined(COMPILER_TYPE)
4 . if ${CC:T:Mgcc*}
5 COMPILER_TYPE:= gcc  
6 . elif ${CC:T:Mclang}
7 COMPILER_TYPE:= clang
8 . else
9 _COMPILER_VERSION!=     ${CC} --version
10 .  if ${_COMPILER_VERSION:Mgcc}
11 COMPILER_TYPE:= gcc
12 .  elif ${_COMPILER_VERSION:M\(GCC\)}
13 COMPILER_TYPE:= gcc
14 .  elif ${_COMPILER_VERSION:Mclang}
15 COMPILER_TYPE:= clang
16 .  else
17 .error Unable to determine compiler type for ${CC}.  Consider setting COMPILER_TYPE.
18 .  endif
19 .  undef _COMPILER_VERSION
20 . endif
21 .endif
22
23 .if ${COMPILER_TYPE} == "clang"
24 COMPILER_FEATURES=      c++11
25 .else
26 COMPILER_FEATURES=
27 .endif