summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authormortimer <mortimer@cvs.openbsd.org>2021-06-18 14:09:32 +0000
committermortimer <mortimer@cvs.openbsd.org>2021-06-18 14:09:32 +0000
commit044481127c59a066bdb151aad7cce1059d37280b (patch)
tree48b95a2bffa6492186f5c04742e79a431a9db29e /regress
parent684de498d62d3aeb28615cecba99787033be9ed7 (diff)
Limit regress libexecinfo to amd64 or llvm >=12.
Only amd64 has unwind info by default, so this regress test only works on amd64. In llvm12, more architectures have unwind info by default, so this test should work on those architectures. Found by bluhm. OK bluhm@
Diffstat (limited to 'regress')
-rw-r--r--regress/gnu/lib/libexecinfo/Makefile15
1 files changed, 14 insertions, 1 deletions
diff --git a/regress/gnu/lib/libexecinfo/Makefile b/regress/gnu/lib/libexecinfo/Makefile
index 93d7ae9e824..c19c64b0792 100644
--- a/regress/gnu/lib/libexecinfo/Makefile
+++ b/regress/gnu/lib/libexecinfo/Makefile
@@ -1,8 +1,14 @@
-# $OpenBSD: Makefile,v 1.1 2021/06/10 23:40:46 jca Exp $
+# $OpenBSD: Makefile,v 1.2 2021/06/18 14:09:31 mortimer Exp $
.include <bsd.own.mk>
.if ${COMPILER_VERSION} == "clang"
+
+# Only amd64 has unwind info by default in llvm11. llvm12 adds more arches.
+CLANG_VERSION!=clang --version | head -1 | grep -E -o 'version [[:digit:]]+' | cut -d' ' -f 2
+CLANG_GE_12!=if [ ${CLANG_VERSION} -ge 12 ] ; then echo 1 ; fi
+.if ${MACHINE} == "amd64" || ${CLANG_GE_12} == "1"
+
PROG= t_backtrace
.PATH: ${SRCDIR} ${BSDSRCDIR}/regress/lib/libc/sys/
@@ -24,6 +30,13 @@ LDFLAGS+= -L${BSDOBJDIR}/lib/libexecinfo/
run-regress-${PROG}: ${PROG}
./${PROG} -r 1
+.else # Clang arch but no unwind info
+REGRESS_TARGETS=run-regress-skiparch
+run-regress-skiparch:
+ # No unwind info on this arch
+ @echo SKIPPED
+.endif
+
.else # Not clang arch
REGRESS_TARGETS=run-regress-skiparch
run-regress-skiparch: