Skip to content

Commit 4f01840

Browse files
Merge bitcoin-core/secp256k1#1027: build: Add a check that Valgrind actually 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
2 parents 6ad908a + 7c7ce87 commit 4f01840

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

build-aux/m4/bitcoin_secp.m4

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ AC_DEFUN([SECP_VALGRIND_CHECK],[
1313
if test x"$has_valgrind" != x"yes"; then
1414
CPPFLAGS_TEMP="$CPPFLAGS"
1515
CPPFLAGS="$VALGRIND_CPPFLAGS $CPPFLAGS"
16-
AC_CHECK_HEADER([valgrind/memcheck.h], [has_valgrind=yes; AC_DEFINE(HAVE_VALGRIND,1,[Define this symbol if valgrind is installed])])
16+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
17+
#include <valgrind/memcheck.h>
18+
]], [[
19+
#if defined(NVALGRIND)
20+
# error "Valgrind does not support this platform."
21+
#endif
22+
]])], [has_valgrind=yes; AC_DEFINE(HAVE_VALGRIND,1,[Define this symbol if valgrind is installed, and it supports the host platform])])
1723
fi
1824
])
1925

0 commit comments

Comments
 (0)