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 +# - retpolineplt: 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