mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 16:50:25 -04: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
(cherry picked from commit 1b8db4b4e3)
This commit is contained in:
parent
e8e5d75e6a
commit
706df48aed
2 changed files with 3 additions and 5 deletions
|
|
@ -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