HomePhabricator

build with -fstack-reuse=none

Description

build with -fstack-reuse=none

Summary:
This will fix the crypto_tests failure on 32-bits platforms.

Backport of core PR15983:
https://github.com/bitcoin/bitcoin/pull/15983/files

With CMake the flag is set for C++ as well as C, while autotools only
has the C++ flag. This is on purpose as the bug is also affecting gcc
and not only g++. I ran the benchmarks and this caused no noticeable
runtime difference.

Fun fact: you can also get rid of the bug by disabling the optimizations
(i.e. build with debug enabled).

Test Plan:

cmake -GNinja .. \
  -DCMAKE_TOOLCHAIN_FILE=../cmake/platforms/Linux32.cmake \
  -DENABLE_STATIC_LIBSTDCXX=ON \
  -DENABLE_GLIBC_BACK_COMPAT=ON
ninja test_bitcoin
./src/test/test_bitcoin -t crypto_tests

Make sure the test is green. Note that this can't run on WSL because the
kernel only supports 64-bits binaries.

Reviewers: #bitcoin_abc, deadalnix, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: markblundeberg

Differential Revision: https://reviews.bitcoinabc.org/D5040

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on May 8 2019, 18:28
FabienCommitted on Jan 22 2020, 20:34
FabienPushed on Jan 22 2020, 20:34
Reviewer
Restricted Project
Differential Revision
D5040: build with -fstack-reuse=none
Parents
rABCb2fbe53045f1: Enable context creation in preallocated memory
Branches
Unknown
Tags
Unknown