diff options
author | Ed Maste <emaste@FreeBSD.org> | 2019-08-15 12:48:17 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2019-08-15 12:48:17 +0000 |
commit | e5c6dece9888a4eb519220938ea98c50d24a9f51 (patch) | |
tree | f964a6684bc60fe4db1a26a029e43157fa0bbecd /share/mk/bsd.prog.mk | |
parent | 03d8a4b7d39af6da7ceaaf07211cf0fde1e623ed (diff) | |
download | src-e5c6dece9888a4eb519220938ea98c50d24a9f51.tar.gz src-e5c6dece9888a4eb519220938ea98c50d24a9f51.zip |
do not enable userland retpoline if not supported by compiler/linker
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D21101
Notes
Notes:
svn path=/head/; revision=351069
Diffstat (limited to 'share/mk/bsd.prog.mk')
-rw-r--r-- | share/mk/bsd.prog.mk | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 0ce546278445..46eb6bda4caf 100644 --- a/share/mk/bsd.prog.mk +++ b/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,12 +45,16 @@ CXXFLAGS+= -fPIE 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 .if defined(CRUNCH_CFLAGS) |