Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151130485
D29680.id87126.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D29680.id87126.diff
View Options
Index: share/mk/bsd.compiler.mk
===================================================================
--- share/mk/bsd.compiler.mk
+++ share/mk/bsd.compiler.mk
@@ -191,7 +191,10 @@
_v!= ${${cc}:N${CCACHE_BIN}} --version || echo 0.0.0
.if !defined(${X_}COMPILER_TYPE)
-. if ${${cc}:T:M*gcc*}
+. if ${_v:[*]:M*Apple clang version*}
+# Detect apple clang when bootstrapping to select appropriate warnings.
+${X_}COMPILER_TYPE:= apple-clang
+. elif ${${cc}:T:M*gcc*}
${X_}COMPILER_TYPE:= gcc
. elif ${${cc}:T:M*clang*}
${X_}COMPILER_TYPE:= clang
@@ -219,6 +222,8 @@
.endif
.undef _v
.endif
+
+
.if !defined(${X_}COMPILER_FREEBSD_VERSION)
.if defined(_TOOLCHAIN_VARS_SHOULD_BE_SET) && !empty(_TOOLCHAIN_VARS_SHOULD_BE_SET) && !defined(COMPAT_32BIT) && !defined(COMPAT_64BIT) && !make(sysent) && !defined(_CRUNCHGEN)
.error "${.CURDIR}: Recomputing ${X_}COMPILER_FREEBSD_VERSION. This value should be cached!"
@@ -239,11 +244,11 @@
.endif
${X_}COMPILER_FEATURES= c++11 c++14
-.if ${${X_}COMPILER_TYPE} == "clang" || \
+.if ${${X_}COMPILER_TYPE:M*clang} || \
(${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 70000)
${X_}COMPILER_FEATURES+= c++17
.endif
-.if ${${X_}COMPILER_TYPE} == "clang"
+.if ${${X_}COMPILER_TYPE:M*clang}
${X_}COMPILER_FEATURES+= retpoline init-all
.endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 7, 7:13 AM (6 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31018044
Default Alt Text
D29680.id87126.diff (1 KB)
Attached To
Mode
D29680: bsd.compiler.mk: detect Apple Clang for cross-builds
Attached
Detach File
Event Timeline
Log In to Comment