Package: fsvs / 1.2.7-1

ld-as-needed.diff 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
Author: Matthias Klose <doko@debian.org>
Description: Fix build with --as-needed

Index: b/src/Makefile.in
===================================================================
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -18,7 +18,8 @@ VERSION	= $(shell  perl -e '($$r) = (q(
 CFLAGS	:= @CFLAGS@
 CFLAGS	+= -fgnu89-inline -Wall -funsigned-char -Os -DFSVS_VERSION='"$(VERSION)"'
 LDFLAGS	:= @LDFLAGS@
-FSVS_LDFLAGS = $(LDFLAGS) -lsvn_subr-1 -lsvn_delta-1 -lsvn_ra-1 -lpcre -lgdbm -ldl
+FSVS_LDFLAGS = $(LDFLAGS)
+FSVS_LIBS = -lsvn_subr-1 -lsvn_delta-1 -lsvn_ra-1 -lpcre -lgdbm -ldl
 EXTRALIBS	:= @EXTRALIBS@
 WAA_CHARS?= @WAA_WC_MD5_CHARS@
 
@@ -152,7 +153,7 @@ docs: $(MANDEST)/fsvs-howto-backup.5 $(M
 # change, too.
 $(DEST): $(C_FILES:%.c=%.o)
 #	@echo "     Link $@"
-	$(CC) $(FSVS_LDFLAGS) $(LDLIBS) $(LIBS) $(EXTRALIBS) -o $@ $^
+	$(CC) $(FSVS_LDFLAGS) -o $@ $^ $(FSVS_LIBS) $(LDLIBS) $(LIBS) $(EXTRALIBS)
 ifeq (@ENABLE_RELEASE@, 1)
 	-strip $@
 endif