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.
-# $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
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