]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
objtool: Set minimum xxhash version to 0.8
authorJosh Poimboeuf <jpoimboe@kernel.org>
Wed, 12 Nov 2025 23:32:33 +0000 (15:32 -0800)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 18 Nov 2025 08:59:25 +0000 (09:59 +0100)
XXH3 is only supported starting with xxhash 0.8.  Enforce that.

Fixes: 0d83da43b1e1 ("objtool/klp: Add --checksum option to generate per-function checksums")
Closes: https://lore.kernel.org/SN6PR02MB41579B83CD295C9FEE40EED6D4FCA@SN6PR02MB4157.namprd02.prod.outlook.com
Reported-by: Michael Kelley <mhklinux@outlook.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Michael Kelley <mhklinux@outlook.com>
Tested-by: Michael Kelley <mhklinux@outlook.com>
Link: https://patch.msgid.link/7227c94692a3a51840278744c7af31b4797c6b96.1762990139.git.jpoimboe@kernel.org
tools/objtool/Makefile
tools/objtool/builtin-check.c

index 48928c9bebef135dede5ff1730b356f7370c43fb..021f55b7bd87237d03e4f072da2dccd40942ea4d 100644 (file)
@@ -12,7 +12,7 @@ ifeq ($(SRCARCH),loongarch)
 endif
 
 ifeq ($(ARCH_HAS_KLP),y)
-       HAVE_XXHASH = $(shell echo "int main() {}" | \
+       HAVE_XXHASH = $(shell printf "$(pound)include <xxhash.h>\nXXH3_state_t *state;int main() {}" | \
                      $(HOSTCC) -xc - -o /dev/null -lxxhash 2> /dev/null && echo y || echo n)
        ifeq ($(HAVE_XXHASH),y)
                BUILD_KLP        := y
index 1e1ea8396eb3ae198f4d9aac55ea225c40ce3ad8..aab7fa9c7e00a1e284ee1ced2acc133b8a86bb47 100644 (file)
@@ -164,7 +164,7 @@ static bool opts_valid(void)
 
 #ifndef BUILD_KLP
        if (opts.checksum) {
-               ERROR("--checksum not supported; install xxhash-devel/libxxhash-dev and recompile");
+               ERROR("--checksum not supported; install xxhash-devel/libxxhash-dev (version >= 0.8) and recompile");
                return false;
        }
 #endif