Skip to content

Commit 3855601

Browse files
Squashed 'depend/secp256k1/' changes from 9fd06254..50f33677
50f33677 Merge #947: ci: Run PRs on merge result even for i686 a35fdd34 ci: Run PRs on merge result even for i686 3dc8c072 Merge #846: ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs 02dcea1a ci: Make test iterations configurable and tweak for sanitizer builds 489ff5c2 tests: Treat empty SECP2561_TEST_ITERS as if it was unset fcfcb97e ci: Simplify to use generic wrapper for QEMU, Valgrind, etc de4157f1 ci: Run ASan/LSan and reorganize sanitizer and Valgrind jobs 399722a6 Merge #941: Clean up git tree 09b3bb86 Clean up git tree bf0ac460 Merge #930: Add ARM32/ARM64 CI 202a030f Merge #850: add `secp256k1_ec_pubkey_cmp` method 1e78c18d Merge bitcoin-core/secp256k1#940: contrib: Explain explicit header guards 69394879 Merge #926: secp256k1.h: clarify that by default arguments must be != NULL 6eceec6d add `secp256k1_xonly_pubkey_cmp` method 0d9561ae add `secp256k1_ec_pubkey_cmp` method 22a9ea15 contrib: Explain explicit header guards 6c52ae87 Merge #937: Have ge_set_gej_var, gej_double_var and ge_set_all_gej_var initialize all fields of their outputs. 185a6af2 Merge #925: changed include statements without prefix 'include/' 14c9739a tests: Improve secp256k1_ge_set_all_gej_var for some infinity inputs 4a19668c tests: Test secp256k1_ge_set_all_gej_var for all infinity inputs 3c90bdda change local lib headers to be relative for those pointing at "include/" dir 45b6468d Have secp256k1_ge_set_all_gej_var initialize all fields. Previous behaviour would not initialize r->y values in the case where infinity is passed in. Furthermore, the previous behaviour wouldn't initialize anything in the case where all inputs were infinity. 31c0f6de Have secp256k1_gej_double_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in. dd6c3de3 Have secp256k1_ge_set_gej_var initialize all fields. Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in. d0bd2693 Merge bitcoin-core/secp256k1#936: Fix gen_context/ASM build on ARM 8bbad7a1 Add asm build to ARM32 CI 7d65ed52 Add ARM32/ARM64 CI c8483520 Makefile.am: Don't pass a variable twice 2161f317 Makefile.am: Honor config when building gen_context 99f47c20 gen_context: Don't use external ASM because it complicates the build 98e0358d Merge #933: Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers 99e2d5be Avoids a missing brace warning in schnorrsig/tests_impl.h on old compilers. 34388af6 Merge #922: Add mingw32-w64/wine CI build 7012a188 Merge #928: Define SECP256K1_BUILD in secp256k1.c directly. ed5a199b tests: fopen /dev/urandom in binary mode ae9e6485 Define SECP256K1_BUILD in secp256k1.c directly. 4dc37bf8 Add mingw32-w64/wine CI build 0881633d secp256k1.h: clarify that by default arguments must be != NULL efad3506 Merge #906: Use modified divsteps with initial delta=1/2 for constant-time cc2c09e3 Merge #918: Clean up configuration in gen_context 07067967 add ECMULT_GEN_PREC_BITS to basic_config.h a3aa2628 gen_context: Don't include basic-config.h be0609fd Add unit tests for edge cases with delta=1/2 variant of divsteps cd393ce2 Optimization: only do 59 hddivsteps per iteration instead of 62 277b224b Use modified divsteps with initial delta=1/2 for constant-time 376ca366 Fix typo in explanation 1e5d50fa Merge #889: fix uninitialized read in tests c083cc6e Merge #903: Make argument of fe_normalizes_to_zero{_var} const 6e898534 Merge #907: changed import to use brackets <> for openssl 45044722 changed import to use brackets <> for openssl as they are not local to the project 26de4dfe Merge #831: Safegcd inverses, drop Jacobi symbols, remove libgmp 23c3fb62 Make argument of fe_normalizes_to_zero{_var} const 24ad04fc Make scalar_inverse{,_var} benchmark scale with SECP256K1_BENCH_ITERS ebc1af70 Optimization: track f,g limb count and pass to new variable-time update_fg_var b306935a Optimization: use formulas instead of lookup tables for cancelling g bits 9164a1b6 Optimization: special-case zero modulus limbs in modinv64 1f233b3f Remove num/gmp support 20448b8d Remove unused Jacobi symbol support 5437e7bd Remove unused scalar_sqr aa9cc521 Improve field/scalar inverse tests 1e0e885c Make field/scalar code use the new modinv modules for inverses 436281af Move secp256k1_fe_inverse{_var} to per-impl files aa404d53 Move secp256k1_scalar_{inverse{_var},is_even} to per-impl files 08d54964 Improve bounds checks in modinv modules 151aac00 Add tests for modinv modules d8a92fcc Add extensive comments on the safegcd algorithm and implementation 8e415acb Add safegcd based modular inverse modules de0a643c Add secp256k1_ctz{32,64}_var functions 99a1cfec print warnings for conditional-uninitialized 3d2cf6c5 initialize variable in tests REVERT: 9fd06254 Merge pull request #5 from bitcoin-core/master REVERT: 143ecc6f Fix multiset benchmarks REVERT: d66ad94e Merge pull request #3 from kaspanet/new-schnorr REVERT: 2a29b5c6 Merge remote-tracking branch 'upstream/master' into new-schnorr REVERT: f09320ed Revert "Add matching Schnorr implementation " REVERT: ee3ab072 Add matching Schnorr implementation REVERT: 087f4bba Fix missing MIT license attribute in oldschnorr impl bitcoin-core/secp256k1#425 REVERT: 054ade68 Add multiset and oldschnorr to travis REVERT: 2b47e2cf Rename schnorr to oldschnorr and add fixes to build system REVERT: 604052f4 [secp256k1] Implement Schnorr signatures REVERT: 1f46fcb2 Add Multiset/ECMH implementation REVERT: 225587b4 Fix UB(violating alignment rules) in multiset tests REVERT: b0e16b52 Fix docs and small code problems in multiset REVERT: 582b1256 Add multiset serialize/parse functions REVERT: d6dd4762 Fix some build configurations for multiset module REVERT: 41145690 Add ECMH multiset module to libsecp256k1 git-subtree-dir: depend/secp256k1 git-subtree-split: 50f33677122fed79dedb05e8046b2fea93496201
1 parent c6f01da commit 3855601

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+4154
-2669
lines changed

.cirrus.yml

+121-36
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
env:
22
WIDEMUL: auto
3-
BIGNUM: auto
43
STATICPRECOMPUTATION: yes
54
ECMULTGENPRECISION: auto
65
ASM: no
76
BUILD: check
87
WITH_VALGRIND: yes
9-
RUN_VALGRIND: no
108
EXTRAFLAGS:
119
HOST:
1210
ECDH: no
@@ -15,7 +13,8 @@ env:
1513
EXPERIMENTAL: no
1614
CTIMETEST: yes
1715
BENCH: yes
18-
ITERS: 2
16+
TEST_ITERS:
17+
BENCH_ITERS: 2
1918
MAKEFLAGS: -j2
2019

2120
cat_logs_snippet: &CAT_LOGS
@@ -59,35 +58,13 @@ task:
5958
- env: {WIDEMUL: int128, RECOVERY: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes}
6059
- env: {WIDEMUL: int128, ECDH: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes}
6160
- env: {WIDEMUL: int128, ASM: x86_64}
62-
- env: {BIGNUM: no}
63-
- env: {BIGNUM: no, RECOVERY: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes}
64-
- env: {BIGNUM: no, STATICPRECOMPUTATION: no}
61+
- env: { RECOVERY: yes, EXPERIMENTAL: yes, SCHNORRSIG: yes}
62+
- env: { STATICPRECOMPUTATION: no}
6563
- env: {BUILD: distcheck, WITH_VALGRIND: no, CTIMETEST: no, BENCH: no}
6664
- env: {CPPFLAGS: -DDETERMINISTIC}
6765
- env: {CFLAGS: -O0, CTIMETEST: no}
68-
- env:
69-
CFLAGS: "-fsanitize=undefined -fno-omit-frame-pointer"
70-
LDFLAGS: "-fsanitize=undefined -fno-omit-frame-pointer"
71-
UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1"
72-
BIGNUM: no
73-
ASM: x86_64
74-
ECDH: yes
75-
RECOVERY: yes
76-
EXPERIMENTAL: yes
77-
SCHNORRSIG: yes
78-
CTIMETEST: no
7966
- env: { ECMULTGENPRECISION: 2 }
8067
- env: { ECMULTGENPRECISION: 8 }
81-
- env:
82-
RUN_VALGRIND: yes
83-
BIGNUM: no
84-
ASM: x86_64
85-
ECDH: yes
86-
RECOVERY: yes
87-
EXPERIMENTAL: yes
88-
SCHNORRSIG: yes
89-
EXTRAFLAGS: "--disable-openssl-tests"
90-
BUILD:
9168
matrix:
9269
- env:
9370
CC: gcc
@@ -115,11 +92,6 @@ task:
11592
CC: i686-linux-gnu-gcc
11693
- env:
11794
CC: clang --target=i686-pc-linux-gnu -isystem /usr/i686-linux-gnu/include
118-
matrix:
119-
- env:
120-
BIGNUM: gmp
121-
- env:
122-
BIGNUM: no
12395
<< : *MERGE_BASE
12496
test_script:
12597
- ./ci/cirrus.sh
@@ -178,7 +150,7 @@ task:
178150
# If we haven't restored from cached (and just run brew install), this is a no-op.
179151
- brew link valgrind
180152
brew_script:
181-
- brew install automake libtool gmp gcc@9
153+
- brew install automake libtool gcc@9
182154
<< : *MERGE_BASE
183155
test_script:
184156
- ./ci/cirrus.sh
@@ -191,11 +163,10 @@ task:
191163
cpu: 1
192164
memory: 1G
193165
env:
194-
QEMU_CMD: qemu-s390x
166+
WRAPPER_CMD: qemu-s390x
167+
TEST_ITERS: 16
195168
HOST: s390x-linux-gnu
196-
BUILD:
197169
WITH_VALGRIND: no
198-
BIGNUM: no
199170
ECDH: yes
200171
RECOVERY: yes
201172
EXPERIMENTAL: yes
@@ -207,3 +178,117 @@ task:
207178
- rm /etc/ld.so.cache
208179
- ./ci/cirrus.sh
209180
<< : *CAT_LOGS
181+
182+
task:
183+
name: "ARM32: Linux (Debian stable, QEMU)"
184+
container:
185+
dockerfile: ci/linux-debian.Dockerfile
186+
cpu: 1
187+
memory: 1G
188+
env:
189+
WRAPPER_CMD: qemu-arm
190+
TEST_ITERS: 16
191+
HOST: arm-linux-gnueabihf
192+
WITH_VALGRIND: no
193+
ECDH: yes
194+
RECOVERY: yes
195+
EXPERIMENTAL: yes
196+
SCHNORRSIG: yes
197+
CTIMETEST: no
198+
matrix:
199+
- env: {}
200+
- env: {ASM: arm}
201+
<< : *MERGE_BASE
202+
test_script:
203+
- ./ci/cirrus.sh
204+
<< : *CAT_LOGS
205+
206+
task:
207+
name: "ARM64: Linux (Debian stable, QEMU)"
208+
container:
209+
dockerfile: ci/linux-debian.Dockerfile
210+
cpu: 1
211+
memory: 1G
212+
env:
213+
WRAPPER_CMD: qemu-aarch64
214+
TEST_ITERS: 16
215+
HOST: aarch64-linux-gnu
216+
WITH_VALGRIND: no
217+
ECDH: yes
218+
RECOVERY: yes
219+
EXPERIMENTAL: yes
220+
SCHNORRSIG: yes
221+
CTIMETEST: no
222+
<< : *MERGE_BASE
223+
test_script:
224+
- ./ci/cirrus.sh
225+
<< : *CAT_LOGS
226+
227+
task:
228+
name: "x86_64 (mingw32-w64): Windows (Debian stable, Wine)"
229+
container:
230+
dockerfile: ci/linux-debian.Dockerfile
231+
cpu: 1
232+
memory: 1G
233+
env:
234+
WRAPPER_CMD: wine64-stable
235+
TEST_ITERS: 16
236+
HOST: x86_64-w64-mingw32
237+
WITH_VALGRIND: no
238+
ECDH: yes
239+
RECOVERY: yes
240+
EXPERIMENTAL: yes
241+
SCHNORRSIG: yes
242+
CTIMETEST: no
243+
<< : *MERGE_BASE
244+
test_script:
245+
- ./ci/cirrus.sh
246+
<< : *CAT_LOGS
247+
248+
# Sanitizers
249+
task:
250+
container:
251+
dockerfile: ci/linux-debian.Dockerfile
252+
cpu: 1
253+
memory: 1G
254+
env:
255+
ECDH: yes
256+
RECOVERY: yes
257+
EXPERIMENTAL: yes
258+
SCHNORRSIG: yes
259+
CTIMETEST: no
260+
EXTRAFLAGS: "--disable-openssl-tests"
261+
matrix:
262+
- name: "Valgrind (memcheck)"
263+
env:
264+
# The `--error-exitcode` is required to make the test fail if valgrind found errors, otherwise it'll return 0 (https://www.valgrind.org/docs/manual/manual-core.html)
265+
WRAPPER_CMD: "valgrind --error-exitcode=42"
266+
TEST_ITERS: 16
267+
- name: "UBSan, ASan, LSan"
268+
env:
269+
CFLAGS: "-fsanitize=undefined,address"
270+
CFLAGS_FOR_BUILD: "-fsanitize=undefined,address"
271+
UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1"
272+
ASAN_OPTIONS: "strict_string_checks=1:detect_stack_use_after_return=1:detect_leaks=1"
273+
LSAN_OPTIONS: "use_unaligned=1"
274+
TEST_ITERS: 32
275+
# Try to cover many configurations with just a tiny matrix.
276+
matrix:
277+
- env:
278+
ASM: auto
279+
STATICPRECOMPUTATION: yes
280+
- env:
281+
ASM: no
282+
STATICPRECOMPUTATION: no
283+
ECMULTGENPRECISION: 2
284+
matrix:
285+
- env:
286+
CC: clang
287+
- env:
288+
HOST: i686-linux-gnu
289+
CC: i686-linux-gnu-gcc
290+
<< : *MERGE_BASE
291+
test_script:
292+
- ./ci/cirrus.sh
293+
<< : *CAT_LOGS
294+

.gitignore

+8-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ bench_sign
66
bench_verify
77
bench_recover
88
bench_internal
9-
bench_multiset
109
tests
1110
exhaustive_tests
1211
gen_context
@@ -34,6 +33,14 @@ libtool
3433
*~
3534
*.log
3635
*.trs
36+
37+
coverage/
38+
coverage.html
39+
coverage.*.html
40+
*.gcda
41+
*.gcno
42+
*.gcov
43+
3744
src/libsecp256k1-config.h
3845
src/libsecp256k1-config.h.in
3946
src/ecmult_static_context.h

Makefile.am

+12-16
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ noinst_HEADERS += src/scalar_8x32_impl.h
1414
noinst_HEADERS += src/scalar_low_impl.h
1515
noinst_HEADERS += src/group.h
1616
noinst_HEADERS += src/group_impl.h
17-
noinst_HEADERS += src/num_gmp.h
18-
noinst_HEADERS += src/num_gmp_impl.h
1917
noinst_HEADERS += src/ecdsa.h
2018
noinst_HEADERS += src/ecdsa_impl.h
2119
noinst_HEADERS += src/eckey.h
@@ -26,14 +24,16 @@ noinst_HEADERS += src/ecmult_const.h
2624
noinst_HEADERS += src/ecmult_const_impl.h
2725
noinst_HEADERS += src/ecmult_gen.h
2826
noinst_HEADERS += src/ecmult_gen_impl.h
29-
noinst_HEADERS += src/num.h
30-
noinst_HEADERS += src/num_impl.h
3127
noinst_HEADERS += src/field_10x26.h
3228
noinst_HEADERS += src/field_10x26_impl.h
3329
noinst_HEADERS += src/field_5x52.h
3430
noinst_HEADERS += src/field_5x52_impl.h
3531
noinst_HEADERS += src/field_5x52_int128_impl.h
3632
noinst_HEADERS += src/field_5x52_asm_impl.h
33+
noinst_HEADERS += src/modinv32.h
34+
noinst_HEADERS += src/modinv32_impl.h
35+
noinst_HEADERS += src/modinv64.h
36+
noinst_HEADERS += src/modinv64_impl.h
3737
noinst_HEADERS += src/assumptions.h
3838
noinst_HEADERS += src/util.h
3939
noinst_HEADERS += src/scratch.h
@@ -68,7 +68,7 @@ endif
6868
endif
6969

7070
libsecp256k1_la_SOURCES = src/secp256k1.c
71-
libsecp256k1_la_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES)
71+
libsecp256k1_la_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES)
7272
libsecp256k1_la_LIBADD = $(SECP_LIBS) $(COMMON_LIB)
7373

7474
if VALGRIND_ENABLED
@@ -81,27 +81,27 @@ noinst_PROGRAMS += bench_verify bench_sign bench_internal bench_ecmult
8181
bench_verify_SOURCES = src/bench_verify.c
8282
bench_verify_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB)
8383
# SECP_TEST_INCLUDES are only used here for CRYPTO_CPPFLAGS
84-
bench_verify_CPPFLAGS = -DSECP256K1_BUILD $(SECP_TEST_INCLUDES)
84+
bench_verify_CPPFLAGS = $(SECP_TEST_INCLUDES)
8585
bench_sign_SOURCES = src/bench_sign.c
8686
bench_sign_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_TEST_LIBS) $(COMMON_LIB)
8787
bench_internal_SOURCES = src/bench_internal.c
8888
bench_internal_LDADD = $(SECP_LIBS) $(COMMON_LIB)
89-
bench_internal_CPPFLAGS = -DSECP256K1_BUILD $(SECP_INCLUDES)
89+
bench_internal_CPPFLAGS = $(SECP_INCLUDES)
9090
bench_ecmult_SOURCES = src/bench_ecmult.c
9191
bench_ecmult_LDADD = $(SECP_LIBS) $(COMMON_LIB)
92-
bench_ecmult_CPPFLAGS = -DSECP256K1_BUILD $(SECP_INCLUDES)
92+
bench_ecmult_CPPFLAGS = $(SECP_INCLUDES)
9393
endif
9494

9595
TESTS =
9696
if USE_TESTS
9797
noinst_PROGRAMS += tests
9898
tests_SOURCES = src/tests.c
99-
tests_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/src -I$(top_srcdir)/include $(SECP_INCLUDES) $(SECP_TEST_INCLUDES)
99+
tests_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/include $(SECP_INCLUDES) $(SECP_TEST_INCLUDES)
100100
if VALGRIND_ENABLED
101101
tests_CPPFLAGS += -DVALGRIND
102102
noinst_PROGRAMS += valgrind_ctime_test
103103
valgrind_ctime_test_SOURCES = src/valgrind_ctime_test.c
104-
valgrind_ctime_test_LDADD = libsecp256k1.la $(SECP_LIBS) $(SECP_LIBS) $(COMMON_LIB)
104+
valgrind_ctime_test_LDADD = libsecp256k1.la $(SECP_LIBS) $(COMMON_LIB)
105105
endif
106106
if !ENABLE_COVERAGE
107107
tests_CPPFLAGS += -DVERIFY
@@ -114,7 +114,7 @@ endif
114114
if USE_EXHAUSTIVE_TESTS
115115
noinst_PROGRAMS += exhaustive_tests
116116
exhaustive_tests_SOURCES = src/tests_exhaustive.c
117-
exhaustive_tests_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/src $(SECP_INCLUDES)
117+
exhaustive_tests_CPPFLAGS = -I$(top_srcdir)/src $(SECP_INCLUDES)
118118
if !ENABLE_COVERAGE
119119
exhaustive_tests_CPPFLAGS += -DVERIFY
120120
endif
@@ -129,7 +129,7 @@ CPPFLAGS_FOR_BUILD +=-I$(top_srcdir) -I$(builddir)/src
129129
gen_context_OBJECTS = gen_context.o
130130
gen_context_BIN = gen_context$(BUILD_EXEEXT)
131131
gen_%.o: src/gen_%.c src/libsecp256k1-config.h
132-
$(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c $< -o $@
132+
$(CC_FOR_BUILD) $(DEFS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c $< -o $@
133133

134134
$(gen_context_BIN): $(gen_context_OBJECTS)
135135
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $^ -o $@
@@ -151,10 +151,6 @@ if ENABLE_MODULE_ECDH
151151
include src/modules/ecdh/Makefile.am.include
152152
endif
153153

154-
if ENABLE_MODULE_MULTISET
155-
include src/modules/multiset/Makefile.am.include
156-
endif
157-
158154
if ENABLE_MODULE_RECOVERY
159155
include src/modules/recovery/Makefile.am.include
160156
endif

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ Implementation details
3434
* Optimized implementation of arithmetic modulo the curve's field size (2^256 - 0x1000003D1).
3535
* Using 5 52-bit limbs (including hand-optimized assembly for x86_64, by Diederik Huys).
3636
* Using 10 26-bit limbs (including hand-optimized assembly for 32-bit ARM, by Wladimir J. van der Laan).
37-
* Field inverses and square roots using a sliding window over blocks of 1s (by Peter Dettman).
3837
* Scalar operations
3938
* Optimized implementation without data-dependent branches of arithmetic modulo the curve's order.
4039
* Using 4 64-bit limbs (relying on __int128 support in the compiler).
4140
* Using 8 32-bit limbs.
41+
* Modular inverses (both field elements and scalars) based on [safegcd](https://gcd.cr.yp.to/index.html) with some modifications, and a variable-time variant (by Peter Dettman).
4242
* Group operations
4343
* Point addition formula specifically simplified for the curve equation (y^2 = x^3 + 7).
4444
* Use addition between points in Jacobian and affine coordinates where possible.
@@ -96,7 +96,8 @@ To create a report, `gcovr` is recommended, as it includes branch coverage repor
9696

9797
To create a HTML report with coloured and annotated source code:
9898

99-
$ gcovr --exclude 'src/bench*' --html --html-details -o coverage.html
99+
$ mkdir -p coverage
100+
$ gcovr --exclude 'src/bench*' --html --html-details -o coverage/coverage.html
100101

101102
Reporting a vulnerability
102103
------------

build-aux/m4/bitcoin_secp.m4

-13
Original file line numberDiff line numberDiff line change
@@ -75,19 +75,6 @@ if test x"$has_libcrypto" = x"yes" && test x"$has_openssl_ec" = x; then
7575
fi
7676
])
7777

78-
dnl
79-
AC_DEFUN([SECP_GMP_CHECK],[
80-
if test x"$has_gmp" != x"yes"; then
81-
CPPFLAGS_TEMP="$CPPFLAGS"
82-
CPPFLAGS="$GMP_CPPFLAGS $CPPFLAGS"
83-
LIBS_TEMP="$LIBS"
84-
LIBS="$GMP_LIBS $LIBS"
85-
AC_CHECK_HEADER(gmp.h,[AC_CHECK_LIB(gmp, __gmpz_init,[has_gmp=yes; GMP_LIBS="$GMP_LIBS -lgmp"; AC_DEFINE(HAVE_LIBGMP,1,[Define this symbol if libgmp is installed])])])
86-
CPPFLAGS="$CPPFLAGS_TEMP"
87-
LIBS="$LIBS_TEMP"
88-
fi
89-
])
90-
9178
AC_DEFUN([SECP_VALGRIND_CHECK],[
9279
if test x"$has_valgrind" != x"yes"; then
9380
CPPFLAGS_TEMP="$CPPFLAGS"

0 commit comments

Comments
 (0)