diff options
author | MarcoFalke <falke.marco@gmail.com> | 2019-05-16 07:43:55 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2019-05-16 07:43:58 -0400 |
commit | 2b56c9a86a9d349c4ada8fc81e071e02eb04837e (patch) | |
tree | c6486240844bb62a590f813d3490f6cf91a3f301 | |
parent | 9d266dbdecb45bbd69a24ddea5f5cc8e8c153687 (diff) | |
parent | faf38bc056e523485520f98f3f725c583a3b89bf (diff) | |
download | bitcoin-2b56c9a86a9d349c4ada8fc81e071e02eb04837e.tar.xz |
Merge #15983: build with -fstack-reuse=none
faf38bc056 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 https://github.com/bitcoin/bitcoin/pull/15959#issuecomment-490423900
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
-rw-r--r-- | configure.ac | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 854d6b1d49..d57e3b9196 100644 --- a/configure.ac +++ b/configure.ac @@ -734,6 +734,10 @@ if test x$TARGET_OS != xwindows; then AX_CHECK_COMPILE_FLAG([-fPIC],[PIC_FLAGS="-fPIC"]) fi +# 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 gcc builds. (Only gcc understands this flag) +AX_CHECK_COMPILE_FLAG([-fstack-reuse=none],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-reuse=none"]) if test x$use_hardening != xno; then use_hardening=yes AX_CHECK_COMPILE_FLAG([-Wstack-protector],[HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"]) |