Skip to content

Commit 4f1a54e

Browse files
committed
Move valgrind CPPFLAGS into SECP_CONFIG_DEFINES
1 parent cc3b8a4 commit 4f1a54e

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

Makefile.am

+1-5
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,6 @@ libsecp256k1_la_CPPFLAGS = $(SECP_INCLUDES) $(SECP_CONFIG_DEFINES)
9696
libsecp256k1_la_LIBADD = $(SECP_LIBS) $(COMMON_LIB) $(PRECOMPUTED_LIB)
9797
libsecp256k1_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION_CURRENT):$(LIB_VERSION_REVISION):$(LIB_VERSION_AGE)
9898

99-
if VALGRIND_ENABLED
100-
libsecp256k1_la_CPPFLAGS += -DVALGRIND
101-
endif
102-
10399
noinst_PROGRAMS =
104100
if USE_BENCHMARK
105101
noinst_PROGRAMS += bench bench_internal bench_ecmult
@@ -123,10 +119,10 @@ noverify_tests_CPPFLAGS = $(SECP_INCLUDES) $(SECP_TEST_INCLUDES) $(SECP_CONFIG_D
123119
noverify_tests_LDADD = $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB) $(PRECOMPUTED_LIB)
124120
noverify_tests_LDFLAGS = -static
125121
if VALGRIND_ENABLED
126-
noverify_tests_CPPFLAGS += -DVALGRIND
127122
noinst_PROGRAMS += valgrind_ctime_test
128123
valgrind_ctime_test_SOURCES = src/valgrind_ctime_test.c
129124
valgrind_ctime_test_LDADD = libsecp256k1.la $(SECP_LIBS) $(COMMON_LIB)
125+
valgrind_ctime_test_CPPFLAGS = $(SECP_CONFIG_DEFINES)
130126
endif
131127
if !ENABLE_COVERAGE
132128
TESTS += tests

configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ case $set_ecmult_gen_precision in
344344
esac
345345

346346
if test x"$enable_valgrind" = x"yes"; then
347-
SECP_INCLUDES="$SECP_INCLUDES $VALGRIND_CPPFLAGS"
347+
SECP_CONFIG_DEFINES="$SECP_CONFIG_DEFINES $VALGRIND_CPPFLAGS -DVALGRIND"
348348
fi
349349

350350
# Add -Werror and similar flags passed from the outside (for testing, e.g., in CI).

0 commit comments

Comments
 (0)