1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-11 07:50:57 +00:00

build(crypto): make valgrind flag compatible with secp256k1-zkp (#2027)

Co-authored-by: Ondřej Vejpustek <ondrej.vejpustek@satoshilabs.com>
This commit is contained in:
Pavol Rusnak 2021-12-20 15:19:14 +01:00 committed by GitHub
parent 9a9201fe8a
commit c0510fc91e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -51,10 +51,12 @@ ZKP_PATH = ../vendor/secp256k1-zkp
CFLAGS += -DSECP256K1_CONTEXT_SIZE=208
VALGRIND ?= 1
ifeq ($(VALGRIND),1)
CFLAGS += -DVALGRIND
endif
CFLAGS += -I.
CFLAGS += -I..
CFLAGS += -DVALGRIND=$(VALGRIND)
CFLAGS += -DUSE_ETHEREUM=1
CFLAGS += -DUSE_GRAPHENE=1
CFLAGS += -DUSE_KECCAK=1

View File

@ -32,7 +32,7 @@
#include "check_mem.h"
#if VALGRIND
#ifdef VALGRIND
#include <valgrind/memcheck.h>
#include <valgrind/valgrind.h>
#endif
@ -77,7 +77,7 @@
#include "zkp_context.h"
#include "zkp_ecdsa.h"
#if VALGRIND
#ifdef VALGRIND
/*
* This is a clever trick to make Valgrind's Memcheck verify code
* is constant-time with respect to secret data.