Skip to content

Commit 5eb82d5

Browse files
committed
Merge bitcoin#28672: build: move -fstack-reuse=none to CORE_CXXFLAGS
8cfa22a build: move -fstack-reuse=none to CORE_CXXFLAGS (fanquake) Pull request description: This is not a hardening specific flag, it should be used at all times, regardless of if hardening is enabled or not. Note that this was still the case here, but having this exist in the hardening flags is confusing, and may lead someone to move it inside one of the `use_hardening` blocks, where it would become unused, with `--disable-hardening`. Noticed while reviewing hebasto#32 (comment). ACKs for top commit: theuni: ACK 8cfa22a. Agree it's confusing as-is and this better matches the intent. hebasto: ACK 8cfa22a luke-jr: utACK 8cfa22a TheCharlatan: ACK 8cfa22a Tree-SHA512: 74c3219301398361d06b1ef2257fc9ec18055b1661f8733ee909adefee61e458d70991c32adf0e0450905a7ffbddc99799f5fdac894f4896cfade19f961818df
2 parents f4049ea + 8cfa22a commit 5eb82d5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

configure.ac

+6-5
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,12 @@ fi
471471
dnl Don't allow extended (non-ASCII) symbols in identifiers. This is easier for code review.
472472
AX_CHECK_COMPILE_FLAG([-fno-extended-identifiers], [CORE_CXXFLAGS="$CORE_CXXFLAGS -fno-extended-identifiers"], [], [$CXXFLAG_WERROR])
473473

474+
dnl Currently all versions of gcc are subject to a class of bugs, see the
475+
dnl gccbug_90348 test case (only reproduces on GCC 11 and earlier) and
476+
dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111843. To work around that, set
477+
dnl -fstack-reuse=none for all gcc builds. (Only gcc understands this flag)
478+
AX_CHECK_COMPILE_FLAG([-fstack-reuse=none], [CORE_CXXFLAGS="$CORE_CXXFLAGS -fstack-reuse=none"])
479+
474480
enable_arm_crc=no
475481
enable_arm_shani=no
476482
enable_sse42=no
@@ -941,11 +947,6 @@ if test "$TARGET_OS" != "windows"; then
941947
AX_CHECK_COMPILE_FLAG([-fPIC], [PIC_FLAGS="-fPIC"])
942948
fi
943949

944-
dnl Currently all versions of gcc are subject to a class of bugs, see the
945-
dnl gccbug_90348 test case (only reproduces on GCC 11 and earlier) and the related bugs of
946-
dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90348. To work around that, set
947-
dnl -fstack-reuse=none for all gcc builds. (Only gcc understands this flag)
948-
AX_CHECK_COMPILE_FLAG([-fstack-reuse=none], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-reuse=none"])
949950
if test "$use_hardening" != "no"; then
950951
use_hardening=yes
951952
AX_CHECK_COMPILE_FLAG([-Wstack-protector], [HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"])

0 commit comments

Comments
 (0)