Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

objtool: Set minimum xxhash version to 0.8

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

authored by

Josh Poimboeuf and committed by
Peter Zijlstra
ee0b48fa 9c7dc1dd

+2 -2
+1 -1
tools/objtool/Makefile
··· 12 12 endif 13 13 14 14 ifeq ($(ARCH_HAS_KLP),y) 15 - HAVE_XXHASH = $(shell echo "int main() {}" | \ 15 + HAVE_XXHASH = $(shell printf "$(pound)include <xxhash.h>\nXXH3_state_t *state;int main() {}" | \ 16 16 $(HOSTCC) -xc - -o /dev/null -lxxhash 2> /dev/null && echo y || echo n) 17 17 ifeq ($(HAVE_XXHASH),y) 18 18 BUILD_KLP := y
+1 -1
tools/objtool/builtin-check.c
··· 164 164 165 165 #ifndef BUILD_KLP 166 166 if (opts.checksum) { 167 - ERROR("--checksum not supported; install xxhash-devel/libxxhash-dev and recompile"); 167 + ERROR("--checksum not supported; install xxhash-devel/libxxhash-dev (version >= 0.8) and recompile"); 168 168 return false; 169 169 } 170 170 #endif