From e5bd2fdaa41597b24ff4e64bc92816ccdf33d314 Mon Sep 17 00:00:00 2001 From: Nick Terrell Date: Mon, 17 Oct 2022 18:40:06 -0700 Subject: [PATCH] [contrib][linux] Disable ASM in the kernel Disable ASM in the kernel for now. It requires a few changes & setup to get working. Instead of doing it in a zstd version update, I'd prefer to package that change as a single patch, and propose it separately from the version update. This makes the version update easier, and reduces some risk. --- contrib/linux-kernel/Makefile | 5 ++++- contrib/linux-kernel/linux.mk | 1 - contrib/linux-kernel/test/Makefile | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/contrib/linux-kernel/Makefile b/contrib/linux-kernel/Makefile index de9c7c4a8..32fb796df 100644 --- a/contrib/linux-kernel/Makefile +++ b/contrib/linux-kernel/Makefile @@ -55,7 +55,9 @@ libzstd: -DZSTD_HAVE_WEAK_SYMBOLS=0 \ -DZSTD_TRACE=0 \ -DZSTD_NO_TRACE \ + -DZSTD_DISABLE_ASM \ -DZSTD_LINUX_KERNEL + rm linux/lib/zstd/decompress/huf_decompress_amd64.S mv linux/lib/zstd/zstd.h linux/include/linux/zstd_lib.h mv linux/lib/zstd/zstd_errors.h linux/include/linux/ cp linux_zstd.h linux/include/linux/zstd.h @@ -103,4 +105,5 @@ test: libzstd .PHONY: clean clean: - $(RM) -rf linux test/test test/static_test + $(RM) -rf linux + $(MAKE) -C test clean diff --git a/contrib/linux-kernel/linux.mk b/contrib/linux-kernel/linux.mk index 00068d2d8..20f08c644 100644 --- a/contrib/linux-kernel/linux.mk +++ b/contrib/linux-kernel/linux.mk @@ -29,7 +29,6 @@ zstd_compress-y := \ zstd_decompress-y := \ zstd_decompress_module.o \ - decompress/huf_decompress_amd64.o \ decompress/huf_decompress.o \ decompress/zstd_ddict.o \ decompress/zstd_decompress.o \ diff --git a/contrib/linux-kernel/test/Makefile b/contrib/linux-kernel/test/Makefile index be82b3fba..53b0c2a65 100644 --- a/contrib/linux-kernel/test/Makefile +++ b/contrib/linux-kernel/test/Makefile @@ -45,4 +45,5 @@ clean: $(RM) -f $(LINUX_ZSTDLIB)/*.o $(RM) -f $(LINUX_ZSTDLIB)/**/*.o $(RM) -f *.o *.a + $(RM) -f static_test $(RM) -f test