Changeset View
Changeset View
Standalone View
Standalone View
head/share/mk/bsd.prog.mk
Show All 32 Lines | |||||
.if !empty(LDFLAGS:M-Wl,*--oformat,*) || !empty(LDFLAGS:M-static) | .if !empty(LDFLAGS:M-Wl,*--oformat,*) || !empty(LDFLAGS:M-static) | ||||
MK_DEBUG_FILES= no | MK_DEBUG_FILES= no | ||||
.endif | .endif | ||||
# ELF hardening knobs | # ELF hardening knobs | ||||
.if ${MK_BIND_NOW} != "no" | .if ${MK_BIND_NOW} != "no" | ||||
LDFLAGS+= -Wl,-znow | LDFLAGS+= -Wl,-znow | ||||
.endif | .endif | ||||
.if ${MK_PIE} != "no" && \ | |||||
!defined(NO_SHARED) || ${NO_SHARED} == "no" || ${NO_SHARED} == "NO" | |||||
CFLAGS+= -fPIE | |||||
CXXFLAGS+= -fPIE | |||||
LDFLAGS+= -pie | |||||
.endif | |||||
.if ${MK_RETPOLINE} != "no" | .if ${MK_RETPOLINE} != "no" | ||||
CFLAGS+= -mretpoline | CFLAGS+= -mretpoline | ||||
CXXFLAGS+= -mretpoline | CXXFLAGS+= -mretpoline | ||||
# retpolineplt is broken with static linking (PR 233336) | # retpolineplt is broken with static linking (PR 233336) | ||||
.if !defined(NO_SHARED) || ${NO_SHARED} == "no" || ${NO_SHARED} == "NO" | .if !defined(NO_SHARED) || ${NO_SHARED} == "no" || ${NO_SHARED} == "NO" | ||||
LDFLAGS+= -Wl,-zretpolineplt | LDFLAGS+= -Wl,-zretpolineplt | ||||
.endif | .endif | ||||
.endif | .endif | ||||
▲ Show 20 Lines • Show All 284 Lines • Show Last 20 Lines |