d9ebc3e9b4f91cfdd0005fb8206f9539c3375cae
[openwrt/svn-archive/archive.git] / tools / mtd-utils / patches / 100-optional_lzo.patch
1 --- a/Makefile
2 +++ b/Makefile
3 @@ -36,10 +36,16 @@ $(SYMLINKS):
4 ln -sf ../fs/jffs2/$@ $@
5
6 $(BUILDDIR)/mkfs.jffs2: $(addprefix $(BUILDDIR)/,\
7 - crc32.o compr_rtime.o mkfs.jffs2.o compr_zlib.o compr_lzo.o \
8 + crc32.o compr_rtime.o mkfs.jffs2.o compr_zlib.o $(if $(NO_LZO),,compr_lzo.o) \
9 compr.o rbtree.o)
10 -LDFLAGS_mkfs.jffs2 = $(ZLIBLDFLAGS) $(LZOLDFLAGS)
11 -LDLIBS_mkfs.jffs2 = -lz -llzo2
12 +
13 +LDFLAGS_mkfs.jffs2 := $(ZLIBLDFLAGS)
14 +LDLIBS_mkfs.jffs2 := -lz
15 +ifndef NO_LZO
16 +LDFLAGS_mkfs.jffs2 += $(LZOLDFLAGS)
17 +LDLIBS_mkfs.jffs2 += -llzo2
18 +CPPFLAGS += -DCONFIG_JFFS2_LZO
19 +endif
20
21 $(BUILDDIR)/flash_eraseall: $(BUILDDIR)/crc32.o $(BUILDDIR)/flash_eraseall.o
22
23 --- a/compr.h
24 +++ b/compr.h
25 @@ -18,7 +18,6 @@
26
27 #define CONFIG_JFFS2_ZLIB
28 #define CONFIG_JFFS2_RTIME
29 -#define CONFIG_JFFS2_LZO
30
31 #define JFFS2_RUBINMIPS_PRIORITY 10
32 #define JFFS2_DYNRUBIN_PRIORITY 20