Latest dav1d fails to build because llvm-16 doesn't support ".option
arch ..." on risc-v.  llvm-17 from ports fixes that problem, but the
code in tests/checkasm/checkasm.h then fails because it assumes that
CLOKC_MONOTONIC_RAW is available.  That could also be worked around
but:
1. we don't have kernel support for the Vector extension anyway, so it
currently doesn't bring any value anyway
2. adding another special llvm version requirement means we'll have to
handle it one day when updating base-clang and/or dropping
devel/llvm/17

So the diff below drops asm on riscv64 and lets dav1d build there.

ok?


Index: Makefile
===================================================================
RCS file: /home/cvs/ports/multimedia/dav1d/Makefile,v
diff -u -p -r1.40 Makefile
--- Makefile    10 Dec 2024 12:14:18 -0000      1.40
+++ Makefile    25 Dec 2024 17:37:39 -0000
@@ -34,8 +34,11 @@ BUILD_DEPENDS+=      devel/nasm
 CONFIGURE_ARGS+=-Ddefault_library=both \
                -Dxxhash_muxer=disabled
 
-.if ${MACHINE_ARCH} == "arm"
+# riscv64 RVV asm code needs llvm>=17
+.if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "riscv64"
 CONFIGURE_ARGS+=-Denable_asm=false
+.endif
+.if ${MACHINE_ARCH} == "arm"
 # XXX SIGBUS otherwise
 CFLAGS+=       -O1
 #CFLAGS+=      -fno-slp-vectorize

-- 
jca

Reply via email to