Changeset View
Changeset View
Standalone View
Standalone View
head/Mk/bsd.ssp.mk
# $FreeBSD$ | # $FreeBSD$ | ||||
# SSP Support | # SSP Support | ||||
SSP_Include_MAINTAINER= portmgr@FreeBSD.org | SSP_Include_MAINTAINER= portmgr@FreeBSD.org | ||||
.if !defined(SSP_UNSAFE) && \ | .if !defined(SSP_UNSAFE) && \ | ||||
(${ARCH} == i386 || ${ARCH} == amd64) | (${MACHINE} != "mips") | ||||
# Overridable as a user may want to use -fstack-protector-all | # Overridable as a user may want to use -fstack-protector-all | ||||
SSP_CFLAGS?= -fstack-protector | SSP_CFLAGS?= -fstack-protector-strong | ||||
CFLAGS+= ${SSP_CFLAGS} | CFLAGS+= ${SSP_CFLAGS} | ||||
LDFLAGS+= -fstack-protector | LDFLAGS+= ${SSP_CFLAGS} | ||||
# -lssp_nonshared is needed on i386 where /usr/lib/libc.so is not an ldscript | |||||
# This is currently unused XXX | |||||
. if defined(SSP_NEED_NONSHARED) | |||||
LDFLAGS+= -lssp_nonshared | |||||
. endif | |||||
.endif | .endif |