Skip to content

Commit b3e1e9a

Browse files
committed
Move valgrind CPPFLAGS into SECP_CONFIG_DEFINES
1 parent 2a39ac1 commit b3e1e9a

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

Makefile.am

Lines changed: 1 addition & 5 deletions
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
@@ -120,10 +116,10 @@ noinst_PROGRAMS += tests
120116
tests_SOURCES = src/tests.c
121117
tests_CPPFLAGS = $(SECP_INCLUDES) $(SECP_TEST_INCLUDES) $(SECP_CONFIG_DEFINES)
122118
if VALGRIND_ENABLED
123-
tests_CPPFLAGS += -DVALGRIND
124119
noinst_PROGRAMS += valgrind_ctime_test
125120
valgrind_ctime_test_SOURCES = src/valgrind_ctime_test.c
126121
valgrind_ctime_test_LDADD = libsecp256k1.la $(SECP_LIBS) $(COMMON_LIB)
122+
valgrind_ctime_test_CPPFLAGS = $(SECP_CONFIG_DEFINES)
127123
endif
128124
if !ENABLE_COVERAGE
129125
tests_CPPFLAGS += -DVERIFY

configure.ac

Lines changed: 1 addition & 1 deletion
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)