Skip to content

Commit 3dc74f6

Browse files
fanquakePastaPastaPasta
authored andcommitted
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
1 parent 06de2b0 commit 3dc74f6

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

configure.ac

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,12 @@ fi
526526
dnl Don't allow extended (non-ASCII) symbols in identifiers. This is easier for code review.
527527
AX_CHECK_COMPILE_FLAG([-fno-extended-identifiers], [CORE_CXXFLAGS="$CORE_CXXFLAGS -fno-extended-identifiers"], [], [$CXXFLAG_WERROR])
528528

529+
dnl Currently all versions of gcc are subject to a class of bugs, see the
530+
dnl gccbug_90348 test case (only reproduces on GCC 11 and earlier) and
531+
dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111843. To work around that, set
532+
dnl -fstack-reuse=none for all gcc builds. (Only gcc understands this flag)
533+
AX_CHECK_COMPILE_FLAG([-fstack-reuse=none], [CORE_CXXFLAGS="$CORE_CXXFLAGS -fstack-reuse=none"])
534+
529535
enable_arm_crc=no
530536
enable_arm_shani=no
531537
enable_sse42=no
@@ -981,11 +987,6 @@ if test "$TARGET_OS" != "windows"; then
981987
AX_CHECK_COMPILE_FLAG([-fPIC], [PIC_FLAGS="-fPIC"])
982988
fi
983989

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

0 commit comments

Comments
 (0)