mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-24 03:37:16 +00:00
arm: enable stack-smashing protection
With current generation clang/llvm it can pass all of our tests in libc/ssp. While here, remove the extra MACHINE_CPUARCH check for mips. SSP is included in BROKEN_OPTIONS for this architecture in src.opts.mk, which is enough to ensure normal builds won't set SSP_CFLAGS. Reviewed by: kevans, imp, emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D31400
This commit is contained in:
parent
bcd2f41f7d
commit
1b8db4b4e3
|
@ -239,12 +239,11 @@ CFLAGS.clang+= -Qunused-arguments
|
|||
# but not yet.
|
||||
CXXFLAGS.clang+= -Wno-c++11-extensions
|
||||
|
||||
.if ${MK_SSP} != "no" && \
|
||||
${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
|
||||
.if ${MK_SSP} != "no"
|
||||
# Don't use -Wstack-protector as it breaks world with -Werror.
|
||||
SSP_CFLAGS?= -fstack-protector-strong
|
||||
CFLAGS+= ${SSP_CFLAGS}
|
||||
.endif # SSP && !ARM && !MIPS
|
||||
.endif # SSP
|
||||
|
||||
# Additional flags passed in CFLAGS and CXXFLAGS when MK_DEBUG_FILES is
|
||||
# enabled.
|
||||
|
|
|
@ -213,8 +213,7 @@ CFLAGS+= -fwrapv
|
|||
#
|
||||
# GCC SSP support
|
||||
#
|
||||
.if ${MK_SSP} != "no" && \
|
||||
${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips"
|
||||
.if ${MK_SSP} != "no"
|
||||
CFLAGS+= -fstack-protector
|
||||
.endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue