]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - share/mk/bsd.compiler.mk
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.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}
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