From a2096bf1bbd8b34c4a47fbd7ac111eca6773a053 Mon Sep 17 00:00:00 2001 From: mortimer Date: Fri, 18 Jun 2021 14:09:31 +0000 Subject: [PATCH] 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@ --- regress/gnu/lib/libexecinfo/Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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 .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: -- 2.20.1