File: 100-ld-as-needed.patch

package info (click to toggle)
mgen 5.02.c%2Breally5.1.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,468 kB
  • sloc: cpp: 78,523; ansic: 4,169; python: 1,334; sh: 30; makefile: 18
file content (35 lines) | stat: -rw-r--r-- 1,359 bytes parent folder | download | duplicates (3)
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
Description: fix dpkg-shlibdeps warning
 Essentially this says don't link in libraries when no symbol from those
 libraries are used. Not implementing this patch causes warning messages
 to appear during dpkg-shlibdeps processing, and eliminating those is the
 first motivation for this patch. For more information see
 https://buildd.debian.org/~brlink/bytag/I-shlibs-useless-link.html .
 One option would have been to remove the '-ldl' argument. However it seems
 safer and more generic to use '-Wl,--as-needed'. This can be viewed as part of
 a wider Ubuntu/Debian movement to tighten the linking in of libraries.
 For more information on this wider movement see
 http://wiki.debian.org/ToolChain/DSOLinking .
Author: Nicholas Bamber <nicholas@periapt.co.uk>
Forwarded: yes, sent private email to upstream authors
Last-Update: 2012-02-21
--- a/makefiles/Makefile.freebsd
+++ b/makefiles/Makefile.freebsd
@@ -6,7 +6,7 @@
 #    (Where to find X11 libraries, etc)
 #
 SYSTEM_INCLUDES =  
-SYSTEM_LDFLAGS = 
+SYSTEM_LDFLAGS = -Wl,--as-needed
 SYSTEM_LIBS = -pthread
 ####SYSTEM_LIBS = -lc_r
 
--- a/makefiles/Makefile.linux
+++ b/makefiles/Makefile.linux
@@ -7,6 +7,7 @@
 #
 SYSTEM_INCLUDES = -I/usr/X11R6/include 
 SYSTEM_LDFLAGS = -L/usr/X11R6/lib 
+SYSTEM_LDFLAGS += -Wl,--as-needed
 SYSTEM_LIBS = -ldl -lpthread -lpcap
 
 # 2) System specific capabilities