Skip to content

Commit 2b56c9a

Browse files
author
MarcoFalke
committed
Merge #15983: build with -fstack-reuse=none
faf38bc build with -fstack-reuse=none (MarcoFalke) Pull request description: All versions of gcc that we commonly use for building are subject to bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90348. To work around that, set `-fstack-reuse=none` for all builds. See bitcoin/bitcoin#15959 (comment) This option does not exist for clang https://clang.llvm.org/docs/ClangCommandLineReference.html#target-independent-compilation-options, but it does for gcc https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html ACKs for commit faf38b: Tree-SHA512: f5597583402d31ea7b89ac358a6f4a537bbb82a1dde2bd41bac65ee0fd88c7af75ee4c24c6b8eed6b139bf4dbf07ab2987f8fc30fb3eab179cd2d753a8a2a47d
2 parents 9d266db + faf38bc commit 2b56c9a

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)