Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146537245
D1294.id2710.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D1294.id2710.diff
View Options
Index: projects/clang350-import/share/mk/src.opts.mk
===================================================================
--- projects/clang350-import/share/mk/src.opts.mk
+++ projects/clang350-import/share/mk/src.opts.mk
@@ -191,25 +191,29 @@
.else
__TT=${MACHINE}
.endif
-# Clang is only for x86, powerpc and little-endian arm right now, by default.
-.if ${__T} == "amd64" || ${__T} == "i386" || ${__T:Mpowerpc*}
-__DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL CLANG_BOOTSTRAP
-.elif ${__TT} == "arm" && ${__T:Marm*eb*} == ""
-__DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP
-# GCC is unable to build the full clang on arm, disable it by default.
-__DEFAULT_NO_OPTIONS+=CLANG_FULL
-.else
-__DEFAULT_NO_OPTIONS+=CLANG CLANG_FULL CLANG_BOOTSTRAP
-.endif
-# Clang the default system compiler only on little-endian arm and x86.
-.if ${__T} == "amd64" || (${__TT} == "arm" && ${__T:Marm*eb*} == "") || \
- ${__T} == "i386"
-__DEFAULT_YES_OPTIONS+=CLANG_IS_CC
+
+.include <bsd.compiler.mk>
+.if !${COMPILER_FEATURES:Mc++11}
+# If the compiler is not C++11 capable, disable clang and use gcc instead.
+__DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX
+__DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC
+.elif ${__T} == "amd64" || ${__T} == "i386"
+# On x86, clang is enabled, and will be installed as the default cc.
+__DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC
__DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX
+.elif ${__TT} == "arm" && ${__T:Marm*eb*} == ""
+# On little-endian arm, clang is enabled, and it is installed as the default
+# cc, but since gcc is unable to build the full clang, disable it by default.
+__DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_IS_CC
+__DEFAULT_NO_OPTIONS+=CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX
+.elif ${__T:Mpowerpc*}
+# On powerpc, clang is enabled, but gcc is installed as the default cc.
+__DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX
+__DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC
.else
-# If clang is not cc, then build gcc by default
-__DEFAULT_NO_OPTIONS+=CLANG_IS_CC CLANG CLANG_BOOTSTRAP
+# Everything else disables clang, and uses gcc instead.
__DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX
+__DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC
.endif
.include <bsd.mkopt.mk>
@@ -217,7 +221,6 @@
#
# MK_* options that default to "yes" if the compiler is a C++11 compiler.
#
-.include <bsd.compiler.mk>
.for var in \
LIBCPLUSPLUS
.if !defined(MK_${var})
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 4, 11:42 AM (6 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29217541
Default Alt Text
D1294.id2710.diff (2 KB)
Attached To
Mode
D1294: Determine whether to build clang 3.5.0 by checking C++11 support
Attached
Detach File
Event Timeline
Log In to Comment