summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.compiler.mk
diff options
context:
space:
mode:
Diffstat (limited to 'share/mk/bsd.compiler.mk')
-rw-r--r--share/mk/bsd.compiler.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk
index bb1229b..ca15d65 100644
--- a/share/mk/bsd.compiler.mk
+++ b/share/mk/bsd.compiler.mk
@@ -3,6 +3,10 @@
.if !target(__<bsd.compiler.mk>__)
__<bsd.compiler.mk>__:
+.if ${MACHINE} == "common"
+COMPILER_TYPE= none
+.endif
+
.if !defined(COMPILER_TYPE)
. if ${CC:T:Mgcc*}
COMPILER_TYPE:= gcc
@@ -25,6 +29,11 @@ COMPILER_TYPE:= clang
.if ${COMPILER_TYPE} == "clang"
COMPILER_FEATURES= c++11
+.if !defined(_COMPILER_VERSION)
+_COMPILER_VERSION!= ${CC} --version
+.endif
+# some warnings are version specific
+COMPILER_VERSION:= ${_COMPILER_VERSION:M[1-9].[0-9]*}
.else
COMPILER_FEATURES=
.endif
OpenPOWER on IntegriCloud