ports/Mk/Features/ssp.mk
Baptiste Daroussin b26839acc2 framework: generalize WITH_ code
Make the definition of WITH_ variable (end user actionable) a define
via a generic code
Move the WITH_DEBUG code into its own file Features/debug.mk
Replace USE_LTO into WITH_LTO and move it into Features/lto.mk
Move WITH_SSP into its own Features/ssp.mk

Add a variable to defined which one are activated by default (here SSP)

Reviewed by:	portmgr (tcberner)
Differential Revision:	https://reviews.freebsd.org/D35873
2022-07-27 15:21:32 +02:00

14 lines
331 B
Makefile

# SSP Support
.if !defined(_SSP_MK_INCLUDED)
_SSP_MK_INCLUDED= yes
SSP_Include_MAINTAINER= portmgr@FreeBSD.org
. if !defined(SSP_UNSAFE) && \
(! ${ARCH:Mmips*})
# Overridable as a user may want to use -fstack-protector-all
SSP_CFLAGS?= -fstack-protector-strong
CFLAGS+= ${SSP_CFLAGS}
LDFLAGS+= ${SSP_CFLAGS}
. endif
.endif