diff options
| author | jsing <> | 2026-01-25 10:18:39 +0000 |
|---|---|---|
| committer | jsing <> | 2026-01-25 10:18:39 +0000 |
| commit | 0fdda8ed74c211637a90bd619017daed690ba5d3 (patch) | |
| tree | aa213abe4e9a923d1a0961b02d54b6f597390279 /src | |
| parent | c6ef8fc8d3285a55c002f52df2bb2df42b7734c0 (diff) | |
| download | openbsd-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@
Diffstat (limited to 'src')
| -rw-r--r-- | src/regress/lib/libcrypto/assembly/Makefile | 36 |
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 | |||
| 3 | ARCH ?!= arch -s | ||
| 4 | EGCC = /usr/local/bin/egcc | ||
| 5 | |||
| 6 | .if !exists(${EGCC}) | ||
| 7 | regress: | ||
| 8 | @echo package gcc is required for this regress | ||
| 9 | @echo SKIPPED | ||
| 10 | .else | ||
| 11 | |||
| 12 | .if ${ARCH} == "aarch64" | ||
| 13 | ASSEMBLY += sha/sha1_aarch64_ce.S | ||
| 14 | ASSEMBLY += sha/sha256_aarch64_ce.S | ||
| 15 | ASSEMBLY += sha/sha512_aarch64_ce.S | ||
| 16 | .elif ${ARCH} == "amd64" | ||
| 17 | ASSEMBLY += md5/md5_amd64_generic.S | ||
| 18 | ASSEMBLY += sha/sha1_amd64_generic.S | ||
| 19 | ASSEMBLY += sha/sha1_amd64_shani.S | ||
| 20 | ASSEMBLY += sha/sha256_amd64_generic.S | ||
| 21 | ASSEMBLY += sha/sha256_amd64_shani.S | ||
| 22 | ASSEMBLY += sha/sha512_amd64_generic.S | ||
| 23 | .endif | ||
| 24 | |||
| 25 | .for assembly in ${ASSEMBLY} | ||
| 26 | regress-${assembly}: | ||
| 27 | @echo "Checking ${assembly} compiles with gcc" | ||
| 28 | @${EGCC} -o /dev/null -c ${.CURDIR}/../../../../lib/libcrypto/${assembly} | ||
| 29 | |||
| 30 | REGRESS_TARGETS += regress-${assembly} | ||
| 31 | |||
| 32 | .endfor | ||
| 33 | |||
| 34 | .endif | ||
| 35 | |||
| 36 | .include <bsd.regress.mk> | ||
