From e6d62bbfe12698d67a15dd8b7628ef8f38e4b30b Mon Sep 17 00:00:00 2001 From: Alexander Lobakin Date: Tue, 21 Sep 2021 20:06:49 +0200 Subject: [PATCH 1/3] [contrib][linux] Fix build with CONFIG_WERROR Linux 5.15 introduces a new Kconfig option, CONFIG_WERROR, which forces -Werror for the entire kernel. Current in-kernel ZSTD implementation uses functions deprecated in 1.5.0, and thus fails on -Wdeprecated-declarations. Turn this particular error into warning to be able to build the kernel with CONFIG_WERROR. I'm not disabling them completely to make sure they'll be visible and [hopefully] fixed sooner or later. Signed-off-by: Alexander Lobakin --- contrib/linux-kernel/linux.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/linux-kernel/linux.mk b/contrib/linux-kernel/linux.mk index 65218ec5b..a26bd3325 100644 --- a/contrib/linux-kernel/linux.mk +++ b/contrib/linux-kernel/linux.mk @@ -12,6 +12,7 @@ obj-$(CONFIG_ZSTD_COMPRESS) += zstd_compress.o obj-$(CONFIG_ZSTD_DECOMPRESS) += zstd_decompress.o ccflags-y += -O3 +ccflags-y += -Wno-error=deprecated-declarations zstd_compress-y := \ zstd_compress_module.o \ From c45b27abe79f7e9f2b7919bab94e45d7a22c1d6a Mon Sep 17 00:00:00 2001 From: Alexander Lobakin Date: Tue, 21 Sep 2021 20:17:34 +0200 Subject: [PATCH 2/3] [contrib][linux] Add huf_decompress_amd64.o target to Makefile Commit a5f2c4552803 ("Huffman ASM") added a new ASM source file, but it wasn't added to the kernel Makefile despite that it received support for Huffman ASM according to the internal definitions. This leads to undefined references, as huf_decompress.o now calls those ASM functions. Add it to the list of sources when building inside the kernel tree. Kbuild can handle .S files just fine, so none additional rules needed. Fixes: a5f2c4552803 ("Huffman ASM") Signed-off-by: Alexander Lobakin --- contrib/linux-kernel/linux.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/linux-kernel/linux.mk b/contrib/linux-kernel/linux.mk index a26bd3325..9df9c9c6d 100644 --- a/contrib/linux-kernel/linux.mk +++ b/contrib/linux-kernel/linux.mk @@ -42,6 +42,7 @@ zstd_decompress-y := \ common/fse_decompress.o \ common/zstd_common.o \ decompress/huf_decompress.o \ + decompress/huf_decompress_amd64.o \ decompress/zstd_ddict.o \ decompress/zstd_decompress.o \ decompress/zstd_decompress_block.o \ From d8b7fc51c81756a44fb87cbebd8e018652daf730 Mon Sep 17 00:00:00 2001 From: Alexander Lobakin Date: Thu, 23 Sep 2021 16:33:24 +0200 Subject: [PATCH 3/3] [contrib][linux] Add contrib/linux-kernel/linux to .gitignore The mentioned path is being created/used by the 'import' rule for generating source files for Linux kernel. Signed-off-by: Alexander Lobakin --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index ea574d747..a136ea394 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ dictionary NUL # Build artefacts +contrib/linux-kernel/linux/ projects/ bin/ .buckd/