Package: lz4 / 1.8.3-1

0002-Fix-static-link.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
From d4a7927ce764832531f234cfa87f4aa2a3dc6588 Mon Sep 17 00:00:00 2001
From: Nobuhiro Iwamatsu <iwamatsu@debian.org>
Date: Tue, 15 May 2018 07:49:35 +0900
Subject: [PATCH] Fix static link

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org>
---
 programs/Makefile | 6 +++---
 tests/Makefile    | 3 ++-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/programs/Makefile b/programs/Makefile
index 72bdcaa..0be2214 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -41,7 +41,7 @@ LIBVER_MINOR := $(shell echo $(LIBVER_MINOR_SCRIPT))
 LIBVER_PATCH := $(shell echo $(LIBVER_PATCH_SCRIPT))
 LIBVER   := $(shell echo $(LIBVER_SCRIPT))
 
-SRCFILES := $(sort $(wildcard $(LZ4DIR)/*.c) $(wildcard *.c))
+SRCFILES := $(sort $(wildcard $(LZ4DIR)/xxhash.c) $(wildcard *.c))
 OBJFILES := $(SRCFILES:.c=.o)
 
 CPPFLAGS += -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_
@@ -76,7 +76,7 @@ all32: CFLAGS+=-m32
 all32: all
 
 lz4: $(OBJFILES)
-	$(CC) $(FLAGS) $^ -o $@$(EXT)
+	$(CC) $(FLAGS) $^ -o $@$(EXT) -L ../lib -llz4
 
 lz4-release: DEBUGFLAGS=
 lz4-release: lz4
@@ -86,7 +86,7 @@ lz4c: lz4
 
 lz4c32: CFLAGS += -m32
 lz4c32 : $(SRCFILES)
-	$(CC) $(FLAGS) $^ -o $@$(EXT)
+	$(CC) $(FLAGS) $^ -o $@$(EXT) -L ../lib -llz4
 
 lz4.1: lz4.1.md $(LIBVER_SRC)
 	cat $< | $(MD2ROFF) $(MD2ROFF_FLAGS) | sed -n '/^\.\\\".*/!p' > $@
diff --git a/tests/Makefile b/tests/Makefile
index d238561..559d0cd 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -43,6 +43,7 @@ CFLAGS  += $(DEBUGFLAGS) $(MOREFLAGS)
 CPPFLAGS+= -I$(LZ4DIR) -I$(PRGDIR) -DXXH_NAMESPACE=LZ4_
 FLAGS    = $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
 
+export LD_LIBRARY_PATH += $(LZ4DIR)
 
 # Define *.exe as extension for Windows systems
 ifneq (,$(filter Windows%,$(OS)))
@@ -69,7 +70,7 @@ all32: CFLAGS+=-m32
 all32: all
 
 lz4:
-	$(MAKE) -C $(PRGDIR) $@ CFLAGS="$(CFLAGS)"
+	# $(MAKE) -C $(PRGDIR) $@ CFLAGS="$(CFLAGS)"
 
 lib liblz4.pc:
 	$(MAKE) -C $(LZ4DIR) $@ CFLAGS="$(CFLAGS)"
-- 
2.17.0