diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2023-04-17 19:51:06 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2023-04-17 19:51:06 +0000 |
commit | 444015017198e2948221385ad244b3be5e13ff65 (patch) | |
tree | 3bb92cd2f15011d3756d00a6964b624c3924ddb2 /regress/lib/libcrypto/bn | |
parent | 073fa571c7043c76e71845a939f35de6c3d3b5be (diff) |
Allow overriding the bc implementation used in run-bc
While base bc is great, it uses libcrypto's BIGNUM implementation.
This implies that the independent verification of the bn_test isn't
as independent as it should be.
With this commit, run-bc picks up bn-gh if it is installed. This appears
to work on amd64, arm64 and sparc64 (where gbc is busted). I will send
PRs to the regress maintainers once I will have tested this a bit more
thoroughly. Committing this early since I juggle way too many diffs
already.
Diffstat (limited to 'regress/lib/libcrypto/bn')
-rw-r--r-- | regress/lib/libcrypto/bn/Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/regress/lib/libcrypto/bn/Makefile b/regress/lib/libcrypto/bn/Makefile index 2ba1d396ddc..9d9d77ae2d1 100644 --- a/regress/lib/libcrypto/bn/Makefile +++ b/regress/lib/libcrypto/bn/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.30 2023/04/17 19:37:18 tb Exp $ +# $OpenBSD: Makefile,v 1.31 2023/04/17 19:51:05 tb Exp $ PROGS += bn_add_sub PROGS += bn_cmp @@ -53,10 +53,15 @@ CLEANFILES += bn_isqrt_gen_tables.txt.tmp bn_isqrt_gen_tables.txt run-regress-bn_test bn_test.out: bn_test ./bn_test -out bn_test.out +.if exists(/usr/local/bin/bc-gh) +BC ?= bc-gh +.endif +BC ?= bc + REGRESS_TARGETS += run-bc .PHONY: run-bc run-bc: bn_test.out - bc < $> | tee bc.out | grep -v '^0$$' + ${BC} < $> | tee bc.out | grep -v '^0$$' ! grep -v '^test ' <bc.out | grep -v '^0$$' CLEANFILES += bn_test.out bc.out |