environment/configure/hardening.sh: enable -fstack-clash-protection
This flag will make GCC 8 touch all space allocated using alloca(3) and thus detect code jumping over the "stack gap".
This commit is contained in:
parent
9ecfc32a1d
commit
6b81302e38
|
@ -17,8 +17,8 @@ if [ -z "$nopie" ]; then
|
|||
LDFLAGS="-specs=${_GCCSPECSDIR}/hardened-ld -Wl,-z,relro -Wl,-z,now ${LDFLAGS}"
|
||||
else
|
||||
# Enable FORITFY_SOURCE=2
|
||||
CFLAGS="-D_FORTIFY_SOURCE=2 ${CFLAGS}"
|
||||
CXXFLAGS="-D_FORTIFY_SOURCE=2 ${CXXFLAGS}"
|
||||
CFLAGS="-fstack-clash-protection -D_FORTIFY_SOURCE=2 ${CFLAGS}"
|
||||
CXXFLAGS="-fstack-clash-protection -D_FORTIFY_SOURCE=2 ${CXXFLAGS}"
|
||||
LDFLAGS="-Wl,-z,relro -Wl,-z,now ${LDFLAGS}"
|
||||
fi
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue