Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F132279439
D21101.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
D21101.diff
View Options
Index: head/share/mk/bsd.lib.mk
===================================================================
--- head/share/mk/bsd.lib.mk
+++ head/share/mk/bsd.lib.mk
@@ -3,6 +3,8 @@
#
.include <bsd.init.mk>
+.include <bsd.compiler.mk>
+.include <bsd.linker.mk>
.if defined(LIB_CXX) || defined(SHLIB_CXX)
_LD= ${CXX}
@@ -74,9 +76,13 @@
LDFLAGS+= -Wl,-znow
.endif
.if ${MK_RETPOLINE} != "no"
+.if ${COMPILER_FEATURES:Mretpoline} && ${LINKER_FEATURES:Mretpoline}
CFLAGS+= -mretpoline
CXXFLAGS+= -mretpoline
LDFLAGS+= -Wl,-zretpolineplt
+.else
+.warning Retpoline requested but not supported by compiler or linker
+.endif
.endif
.if ${MK_DEBUG_FILES} != "no" && empty(DEBUG_FLAGS:M-g) && \
Index: head/share/mk/bsd.prog.mk
===================================================================
--- head/share/mk/bsd.prog.mk
+++ head/share/mk/bsd.prog.mk
@@ -3,6 +3,7 @@
.include <bsd.init.mk>
.include <bsd.compiler.mk>
+.include <bsd.linker.mk>
.SUFFIXES: .out .o .bc .c .cc .cpp .cxx .C .m .y .l .ll .ln .s .S .asm
@@ -44,11 +45,15 @@
LDFLAGS+= -pie
.endif
.if ${MK_RETPOLINE} != "no"
+.if ${COMPILER_FEATURES:Mretpoline} && ${LINKER_FEATURES:Mretpoline}
CFLAGS+= -mretpoline
CXXFLAGS+= -mretpoline
# retpolineplt is broken with static linking (PR 233336)
.if !defined(NO_SHARED) || ${NO_SHARED:tl} == "no"
LDFLAGS+= -Wl,-zretpolineplt
+.endif
+.else
+.warning Retpoline requested but not supported by compiler or linker
.endif
.endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 16, 11:26 AM (4 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
23758811
Default Alt Text
D21101.diff (1 KB)
Attached To
Mode
D21101: enable userland retpoline only if supported by compiler and linker
Attached
Detach File
Event Timeline
Log In to Comment