summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsing <>2026-01-25 10:18:39 +0000
committerjsing <>2026-01-25 10:18:39 +0000
commit0fdda8ed74c211637a90bd619017daed690ba5d3 (patch)
treeaa213abe4e9a923d1a0961b02d54b6f597390279
parentc6ef8fc8d3285a55c002f52df2bb2df42b7734c0 (diff)
downloadopenbsd-0fdda8ed74c211637a90bd619017daed690ba5d3.tar.gz
openbsd-0fdda8ed74c211637a90bd619017daed690ba5d3.tar.bz2
openbsd-0fdda8ed74c211637a90bd619017daed690ba5d3.zip
Add a regress test that ensures our pure assembly code builds with gcc
This requires egcc to be installed, if not we'll just skip the test. Discussed with tb@
-rw-r--r--src/regress/lib/libcrypto/assembly/Makefile36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/regress/lib/libcrypto/assembly/Makefile b/src/regress/lib/libcrypto/assembly/Makefile
new file mode 100644
index 0000000000..48c316cc9f
--- /dev/null
+++ b/src/regress/lib/libcrypto/assembly/Makefile
@@ -0,0 +1,36 @@
1# $OpenBSD: Makefile,v 1.1 2026/01/25 10:18:39 jsing Exp $
2
3ARCH ?!= arch -s
4EGCC = /usr/local/bin/egcc
5
6.if !exists(${EGCC})
7regress:
8 @echo package gcc is required for this regress
9 @echo SKIPPED
10.else
11
12.if ${ARCH} == "aarch64"
13ASSEMBLY += sha/sha1_aarch64_ce.S
14ASSEMBLY += sha/sha256_aarch64_ce.S
15ASSEMBLY += sha/sha512_aarch64_ce.S
16.elif ${ARCH} == "amd64"
17ASSEMBLY += md5/md5_amd64_generic.S
18ASSEMBLY += sha/sha1_amd64_generic.S
19ASSEMBLY += sha/sha1_amd64_shani.S
20ASSEMBLY += sha/sha256_amd64_generic.S
21ASSEMBLY += sha/sha256_amd64_shani.S
22ASSEMBLY += sha/sha512_amd64_generic.S
23.endif
24
25.for assembly in ${ASSEMBLY}
26regress-${assembly}:
27 @echo "Checking ${assembly} compiles with gcc"
28 @${EGCC} -o /dev/null -c ${.CURDIR}/../../../../lib/libcrypto/${assembly}
29
30REGRESS_TARGETS += regress-${assembly}
31
32.endfor
33
34.endif
35
36.include <bsd.regress.mk>