Skip to content

Commit faf38bc

Browse files
author
MarcoFalke
committed
build with -fstack-reuse=none
1 parent 49c1aa5 commit faf38bc

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

configure.ac

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -734,6 +734,10 @@ if test x$TARGET_OS != xwindows; then
734734
AX_CHECK_COMPILE_FLAG([-fPIC],[PIC_FLAGS="-fPIC"])
735735
fi
736736

737+
# All versions of gcc that we commonly use for building are subject to bug
738+
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90348. To work around that, set
739+
# -fstack-reuse=none for all gcc builds. (Only gcc understands this flag)
740+
AX_CHECK_COMPILE_FLAG([-fstack-reuse=none],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-reuse=none"])
737741
if test x$use_hardening != xno; then
738742
use_hardening=yes
739743
AX_CHECK_COMPILE_FLAG([-Wstack-protector],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"])

0 commit comments

Comments
 (0)