summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.compiler.mk
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2012-09-26 17:25:15 +0000
committerbrooks <brooks@FreeBSD.org>2012-09-26 17:25:15 +0000
commit959c42a8aeb21e45aef65b39c1c89f2053e3af09 (patch)
treefb8bdc6956029b0b68b4b23009e8d58d9cf708e1 /share/mk/bsd.compiler.mk
parentdd969745bce0790e98523ca33358745fd698ee11 (diff)
downloadFreeBSD-src-959c42a8aeb21e45aef65b39c1c89f2053e3af09.zip
FreeBSD-src-959c42a8aeb21e45aef65b39c1c89f2053e3af09.tar.gz
Add a COMPILER_FEATURES variable that is set in bsd.compiler.mk.
When the compiler is clang add c++11 to COMPILER_FEATURES. When the compiler supports c++11, default to building libc++. This will not impact the compliation of programs, but will make it easier for users with clang compiled systems to test libc++ by passing -stdlib=libc++ to their c++ compliations.
Diffstat (limited to 'share/mk/bsd.compiler.mk')
-rw-r--r--share/mk/bsd.compiler.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk
index cca3968..02d152e 100644
--- a/share/mk/bsd.compiler.mk
+++ b/share/mk/bsd.compiler.mk
@@ -19,3 +19,9 @@ COMPILER_TYPE:= clang
. undef _COMPILER_VERSION
. endif
.endif
+
+.if ${COMPILER_TYPE} == "clang"
+COMPILER_FEATURES= c++11
+.else
+COMPILER_FEATURES=
+.endif
OpenPOWER on IntegriCloud