Package: snowdrop / 0.02b-10

link-as-needed.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
Description: Link as needed
Author: Arno Töll <debian@toell.net>
Last-Update: 2011-06-30

* Makefile:
  + Add -Wl,--as-needed to LDFLAGS
--- a/Makefile
+++ b/Makefile
@@ -30,6 +30,7 @@
 
 CFLAGS  += -ggdb -O2 -fomit-frame-pointer -funroll-loops -fexpensive-optimizations \
           -ffast-math -Wall -g
+LDFLAGS += -Wl,--as-needed
 
 
 all: modules snowdrop toinstall
@@ -56,7 +57,7 @@
 	  echo "[+] Building 'sd-$$i'..." ; \
 	  ADDME="-lmd5"; \
 	  test "$$USEOPENSSL" = "" || ADDME="-DUSE_OPENSSL -DUSE_GNUTLS -lgnutls-extra -lgnutls-openssl $(shell pkg-config --libs --cflags gnutls)" ; \
-	  $(CC) -DVER=\"$(VER)\" $(CFLAGS) -DTARGETLANG=\"$$i\" snowdrop.c lang-$$i.o -o sd-$$i $$ADDME || exit 1; \
+	  $(CC) $(LDFLAGS) -DVER=\"$(VER)\" $(CFLAGS) -DTARGETLANG=\"$$i\" snowdrop.c lang-$$i.o -o sd-$$i $$ADDME || exit 1; \
 	done; \
 	echo "[*] Main code compiled."