mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] lz4: fix KERNEL_LZ4 support
@ 2017-02-08 21:19 Arnd Bergmann
  2017-02-08 21:34 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2017-02-08 21:19 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Arnd Bergmann, Sven Schmidt, linux-kernel

The updated lz4 library removed the #ifdef guards around the various
EXPORT_SYMBOL statements in the original kernel lz4 support, which broke
CONFIG_KERNEL_LZ4 on x86:

x86_64-linux-ld: -r and -pie may not be used together
scripts/Makefile.build:308: recipe for target 'arch/x86/boot/compressed/misc.o' failed

This uses a simpler way to do the same thing, by overriding the
EXPORT_SYMBOL macro.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 lib/lz4/lz4_decompress.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/lz4/lz4_decompress.c b/lib/lz4/lz4_decompress.c
index 9bf918233749..a390f63bc475 100644
--- a/lib/lz4/lz4_decompress.c
+++ b/lib/lz4/lz4_decompress.c
@@ -40,6 +40,11 @@
 #include <linux/kernel.h>
 #include <asm/unaligned.h>
 
+#ifdef STATIC
+#undef EXPORT_SYMBOL
+#define EXPORT_SYMBOL(x)
+#endif
+
 /*-*****************************
  *	Decompression functions
  *******************************/
-- 
2.9.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-09 11:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-08 21:19 [PATCH] lz4: fix KERNEL_LZ4 support Arnd Bergmann
2017-02-08 21:34 ` Andrew Morton
2017-02-08 22:06   ` Arnd Bergmann
2017-02-09 11:09     ` Sven Schmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®