From 3d5534d27151cd2d7f0acba080a1eabec7c79a40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Tue, 25 Aug 2026 10:01:31 +0200 Subject: [PATCH] checkasm: Fix building for macos/aarch64 Commit 74705b3970cbc277e9366d82ee32d7c3a0a9e3b3 changed to only compile some of the checkasm source files when they are expected to be non-empty, but the condition for when perf/macos_kperf.c is needed is wrong, breaking building checkasm in default macos aarch64 configurations. Checkasm decides whether to enable the macos kperf codepaths on its own, irrespective of ffmpeg's configure's --enable-macos-kperf (which defaults to disabled) - see the end of checkasm's src/perf_internal.h for the condition: #if defined(__APPLE__) && ARCH_AARCH64 /* This only depends on , and isn't needed on other architectures. */ #define HAVE_MACOS_KPERF 1 #else #define HAVE_MACOS_KPERF 0 #endif To approximate this, build macos_kperf.c for any aarch64 target. For non-macOS cases, perf_internal.h defines inline functions in most aarch64 build configurations, so we don't end up with an empty translation unit in any case. --- tests/checkasm/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/checkasm/Makefile b/tests/checkasm/Makefile index 66e45d8830..c5b25e753a 100644 --- a/tests/checkasm/Makefile +++ b/tests/checkasm/Makefile @@ -115,7 +115,7 @@ EXT_CHECKASMOBJS-$(ARCH_ARM) += ext/src/arm/checkasm_32.o \ ext/src/arm/cpu.o ext/src/perf/arm.o EXT_CHECKASMOBJS-$(ARCH_LOONGARCH) += ext/src/loongarch/checkasm.o EXT_CHECKASMOBJS-$(CONFIG_LINUX_PERF) += ext/src/perf/linux.o -EXT_CHECKASMOBJS-$(CONFIG_MACOS_KPERF) += ext/src/perf/macos_kperf.o +EXT_CHECKASMOBJS-$(ARCH_AARCH64) += ext/src/perf/macos_kperf.o EXT_CHECKASMOBJS-$(HAVE_RV) += ext/src/riscv/callcheck.o EXT_CHECKASMOBJS-$(ARCH_RISCV) += ext/src/riscv/cpu.o EXT_CHECKASMOBJS-$(HAVE_X86ASM) += ext/src/x86/checkasm.o