Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105712641
D17421.id49378.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
D17421.id49378.diff
View Options
Index: head/Makefile.inc1
===================================================================
--- head/Makefile.inc1
+++ head/Makefile.inc1
@@ -659,7 +659,7 @@
-DNO_PIC MK_PROFILE=no -DNO_SHARED \
-DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \
MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \
- MK_LLDB=no MK_TESTS=no \
+ MK_LLDB=no MK_RETPOLINE=no MK_TESTS=no \
MK_INCLUDES=yes
BMAKE= \
@@ -680,7 +680,7 @@
-DNO_LINT \
-DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no \
MK_CLANG_EXTRAS=no MK_CLANG_FULL=no \
- MK_LLDB=no MK_TESTS=no
+ MK_LLDB=no MK_RETPOLINE=no MK_TESTS=no
# cross-tools stage
# TOOLS_PREFIX set in BMAKE
@@ -703,7 +703,7 @@
SSP_CFLAGS= \
MK_HTML=no -DNO_LINT MK_MAN=no \
-DNO_PIC MK_PROFILE=no -DNO_SHARED \
- -DNO_CPU_CFLAGS MK_WARNS=no MK_CTF=no
+ -DNO_CPU_CFLAGS MK_RETPOLINE=no MK_WARNS=no MK_CTF=no
# world stage
WMAKEENV= ${CROSSENV} \
@@ -2383,6 +2383,7 @@
MK_OFED=no \
MK_OPENSSH=no \
MK_PROFILE=no \
+ MK_RETPOLINE=no \
MK_SENDMAIL=no \
MK_SVNLITE=no \
MK_TESTS=no \
Index: head/share/mk/bsd.lib.mk
===================================================================
--- head/share/mk/bsd.lib.mk
+++ head/share/mk/bsd.lib.mk
@@ -69,6 +69,12 @@
TAG_ARGS= -T ${TAGS:[*]:S/ /,/g}
.endif
+.if ${MK_RETPOLINE} != "no"
+CFLAGS+= -mretpoline
+CXXFLAGS+= -mretpoline
+LDFLAGS+= -Wl,-zretpolineplt
+.endif
+
.if ${MK_DEBUG_FILES} != "no" && empty(DEBUG_FLAGS:M-g) && \
empty(DEBUG_FLAGS:M-gdwarf*)
CFLAGS+= ${DEBUG_FILES_CFLAGS}
Index: head/share/mk/bsd.opts.mk
===================================================================
--- head/share/mk/bsd.opts.mk
+++ head/share/mk/bsd.opts.mk
@@ -72,6 +72,7 @@
CCACHE_BUILD \
CTF \
INSTALL_AS_USER \
+ RETPOLINE \
STALE_STAGED
__DEFAULT_DEPENDENT_OPTIONS = \
Index: head/share/mk/bsd.prog.mk
===================================================================
--- head/share/mk/bsd.prog.mk
+++ head/share/mk/bsd.prog.mk
@@ -34,6 +34,12 @@
MK_DEBUG_FILES= no
.endif
+.if ${MK_RETPOLINE} != "no"
+CFLAGS+= -mretpoline
+CXXFLAGS+= -mretpoline
+LDFLAGS+= -Wl,-zretpolineplt
+.endif
+
.if defined(CRUNCH_CFLAGS)
CFLAGS+=${CRUNCH_CFLAGS}
.else
Index: head/tools/build/options/WITH_RETPOLINE
===================================================================
--- head/tools/build/options/WITH_RETPOLINE
+++ head/tools/build/options/WITH_RETPOLINE
@@ -0,0 +1,3 @@
+.\" $FreeBSD$
+Set to build the base system with the retpoline speculative execution
+vulnerability mitigation for CVE-2017-5715.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 2:05 PM (20 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15530161
Default Alt Text
D17421.id49378.diff (2 KB)
Attached To
Mode
D17421: Introduce WITH_RETPOLINE src.conf knob to build userland with retpoline
Attached
Detach File
Event Timeline
Log In to Comment