From 0fdda8ed74c211637a90bd619017daed690ba5d3 Mon Sep 17 00:00:00 2001 From: jsing <> Date: Sun, 25 Jan 2026 10:18:39 +0000 Subject: 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@ --- src/regress/lib/libcrypto/assembly/Makefile | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 src/regress/lib/libcrypto/assembly/Makefile 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 @@ +# $OpenBSD: Makefile,v 1.1 2026/01/25 10:18:39 jsing Exp $ + +ARCH ?!= arch -s +EGCC = /usr/local/bin/egcc + +.if !exists(${EGCC}) +regress: + @echo package gcc is required for this regress + @echo SKIPPED +.else + +.if ${ARCH} == "aarch64" +ASSEMBLY += sha/sha1_aarch64_ce.S +ASSEMBLY += sha/sha256_aarch64_ce.S +ASSEMBLY += sha/sha512_aarch64_ce.S +.elif ${ARCH} == "amd64" +ASSEMBLY += md5/md5_amd64_generic.S +ASSEMBLY += sha/sha1_amd64_generic.S +ASSEMBLY += sha/sha1_amd64_shani.S +ASSEMBLY += sha/sha256_amd64_generic.S +ASSEMBLY += sha/sha256_amd64_shani.S +ASSEMBLY += sha/sha512_amd64_generic.S +.endif + +.for assembly in ${ASSEMBLY} +regress-${assembly}: + @echo "Checking ${assembly} compiles with gcc" + @${EGCC} -o /dev/null -c ${.CURDIR}/../../../../lib/libcrypto/${assembly} + +REGRESS_TARGETS += regress-${assembly} + +.endfor + +.endif + +.include -- cgit v1.2.3-55-g6feb