aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSebastian Gottschall <[email protected]>2020-08-24 21:20:41 +0200
committerGitHub <[email protected]>2020-08-24 12:20:41 -0700
commit184df27eef0abdc7ab2105b21257f753834b936b (patch)
tree32557e08b1fc7ec169ab02c0cc3ed69ee8e7de7e /lib
parent04c37b6851fcfde84ec3be4ff63f5ee9022bf830 (diff)
Avoid symbol collision with in-kernel zstdlib
For Linux, when zfs is compiled as an in kernel static variant and the in kernel zstd library is compiled statically into the kernel a symbol collision will occur. This wrapper header renames all of the relevant zstd functions to avoid this problem. Reviewed-by: Kjeld Schouten <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Sebastian Gottschall <[email protected]> Closes #10775
Diffstat (limited to 'lib')
-rw-r--r--lib/libzstd/Makefile.am6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libzstd/Makefile.am b/lib/libzstd/Makefile.am
index 7c7035c41..df31d8b23 100644
--- a/lib/libzstd/Makefile.am
+++ b/lib/libzstd/Makefile.am
@@ -13,3 +13,9 @@ KERNEL_C = \
zfs_zstd.c
nodist_libzstd_la_SOURCES = $(KERNEL_C)
+
+lib/zstd.$(OBJEXT): CFLAGS += -fno-tree-vectorize -include $(top_srcdir)/module/zstd/include/zstd_compat_wrapper.h -Wp,-w
+lib/zstd.l$(OBJEXT): CFLAGS += -fno-tree-vectorize -include $(top_srcdir)/module/zstd/include/zstd_compat_wrapper.h -Wp,-w
+
+zfs_zstd.$(OBJEXT): CFLAGS += -include $(top_srcdir)/module/zstd/include/zstd_compat_wrapper.h
+zfs_zstd.l$(OBJEXT): CFLAGS += -include $(top_srcdir)/module/zstd/include/zstd_compat_wrapper.h