Skip to content

Commit

Permalink
Merge bitcoin-core/secp256k1#1027: build: Add a check that Valgrind a…
Browse files Browse the repository at this point in the history
…ctually supports a host platform

7c7ce87 build: Add a check that Valgrind actually supports a host platform (Hennadii Stepanov)

Pull request description:

  This PR adds a check that Valgrind actually supports a host platform.

  On master (49f608d):
  ```
  $ ./autogen.sh &> /dev/null && ./configure -q --host=riscv64-linux-gnu 2>&1 | grep valgrind
    valgrind                = yes
  ```

  With this PR:
  ```
  $ ./autogen.sh &> /dev/null && ./configure -q --host=riscv64-linux-gnu 2>&1 | grep valgrind
    valgrind                = no
  ```

  Closes bitcoin#1023.

ACKs for top commit:
  sipa:
    utACK 7c7ce87
  real-or-random:
    utACK 7c7ce87

Tree-SHA512: 27f660f7b992ab35dba64b525af1c631f33b8cb25b6a990c81ec4d358c609a2dc03b0932847db9d5aa35eaa880929c7ad2bb4e7719785c2402b1b291cfa91ede
  • Loading branch information
real-or-random committed Dec 5, 2021
2 parents 6ad908a + 7c7ce87 commit 4f01840
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion build-aux/m4/bitcoin_secp.m4
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ AC_DEFUN([SECP_VALGRIND_CHECK],[
if test x"$has_valgrind" != x"yes"; then
CPPFLAGS_TEMP="$CPPFLAGS"
CPPFLAGS="$VALGRIND_CPPFLAGS $CPPFLAGS"
AC_CHECK_HEADER([valgrind/memcheck.h], [has_valgrind=yes; AC_DEFINE(HAVE_VALGRIND,1,[Define this symbol if valgrind is installed])])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <valgrind/memcheck.h>
]], [[
#if defined(NVALGRIND)
# error "Valgrind does not support this platform."
#endif
]])], [has_valgrind=yes; AC_DEFINE(HAVE_VALGRIND,1,[Define this symbol if valgrind is installed, and it supports the host platform])])
fi
])

Expand Down

0 comments on commit 4f01840

Please sign in to comment.