Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151666184
D14228.id38977.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
D14228.id38977.diff
View Options
Index: Makefile.inc1
===================================================================
--- Makefile.inc1
+++ Makefile.inc1
@@ -161,11 +161,11 @@
.if !defined(X_COMPILER_TYPE)
CROSSENV+= COMPILER_VERSION=${COMPILER_VERSION} \
COMPILER_TYPE=${COMPILER_TYPE} \
- COMPILER_FEATURES=${COMPILER_FEATURES} \
+ COMPILER_FEATURES="${COMPILER_FEATURES}" \
COMPILER_FREEBSD_VERSION=${COMPILER_FREEBSD_VERSION}
.else
CROSSENV+= COMPILER_VERSION=${X_COMPILER_VERSION} \
- COMPILER_FEATURES=${X_COMPILER_FEATURES} \
+ COMPILER_FEATURES="${X_COMPILER_FEATURES}" \
COMPILER_TYPE=${X_COMPILER_TYPE} \
COMPILER_FREEBSD_VERSION=${X_COMPILER_FREEBSD_VERSION}
.endif
Index: share/mk/bsd.compiler.mk
===================================================================
--- share/mk/bsd.compiler.mk
+++ share/mk/bsd.compiler.mk
@@ -19,7 +19,9 @@
# COMPILER_FEATURES will contain one or more of the following, based on
# compiler support for that feature:
#
-# - c++11 : supports full (or nearly full) C++11 programming environment.
+# - c++11: supports full (or nearly full) C++11 programming environment.
+# - retpoline: supports the retpoline speculative execution vulnerability
+# mitigation.
#
# These variables with an X_ prefix will also be provided if XCC is set.
#
@@ -178,11 +180,13 @@
.endif
.endif
+${X_}COMPILER_FEATURES=
.if ${${X_}COMPILER_TYPE} == "clang" || \
(${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 40800)
-${X_}COMPILER_FEATURES= c++11
-.else
-${X_}COMPILER_FEATURES=
+${X_}COMPILER_FEATURES+= c++11
+.endif
+.if ${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 60000
+${X_}COMPILER_FEATURES+= retpoline
.endif
.else
Index: share/mk/bsd.linker.mk
===================================================================
--- share/mk/bsd.linker.mk
+++ share/mk/bsd.linker.mk
@@ -12,7 +12,9 @@
# LINKER_FEATURES may contain one or more of the following, based on
# linker support for that feature:
#
-# - build-id : support for generating a Build-ID note
+# - build-id: support for generating a Build-ID note
+# - retpoline: support for generating PLT with retpoline speculative
+# execution vulnerability mitigation
#
# These variables with an X_ prefix will also be provided if XLD is set.
#
@@ -70,6 +72,9 @@
.if ${${X_}LINKER_TYPE} != "bfd" || ${${X_}LINKER_VERSION} > 21750
${X_}LINKER_FEATURES+= build-id
.endif
+.if ${${X_}LINKER_TYPE} == "lld" && ${${X_}LINKER_VERSION} >= 60000
+${X_}LINKER_FEATURES+= retpoline
+.endif
.endif
.else
# Use LD's values
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 10, 9:22 PM (9 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31246599
Default Alt Text
D14228.id38977.diff (2 KB)
Attached To
Mode
D14228: bsd.linker.mk: add retpolineplt linker feature
Attached
Detach File
Event Timeline
Log In to Comment