Skip to content

Commit 5935f01

Browse files
author
MarcoFalke
committed
build with -fstack-reuse=none
Github-Pull: #15983 Rebased-From: faf38bc
1 parent be92be5 commit 5935f01

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
@@ -725,6 +725,10 @@ if test x$TARGET_OS != xwindows; then
725725
AX_CHECK_COMPILE_FLAG([-fPIC],[PIC_FLAGS="-fPIC"])
726726
fi
727727

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

0 commit comments

Comments
 (0)