mirror of
https://github.com/facebook/zstd.git
synced 2025-12-24 17:21:03 +03:00
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 <alobakin@pm.me>
Zstd in the Linux Kernel
This directory contains the scripts needed to transform upstream zstd into the version imported into the kernel. All the transforms are automated and tested by our continuous integration.
Upgrading Zstd in the Linux Kernel
cdinto this directory.- Run
make libzstdand read the output. Make sure that all the diffs printed and changes made by the script are correct. - Run
make testand ensure that it passes. - Import zstd into the Linux Kernel
make import LINUX=/path/to/linux/repo - Inspect the diff for sanity.
- Check the Linux Kernel history for zstd. If any patches were made to the kernel version of zstd, but not to upstream zstd, then port them upstream if necessary.
- Test the diff. Benchmark if necessary. Make sure to test multiple architectures: At least x86, i386, and arm.
- Submit the patch to the LKML.