1
Description: fix build with ld --as-needed
2
when building with ld --as-needed libraries must be placed
3
after object files needing them on the command line so the symbols
4
of the libraries are registered as needed.
5
Author: Julian Taylor <jtaylor.debian@googlemail.com>
6
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/cdpr/+bug/803174
7
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=632665
8
--- cdpr-2.4.orig/Makefile
10
@@ -16,7 +16,7 @@ CFLAGS = -Wall -W -O2
11
# Build for Solaris with the pcap headers/libs one dir up
12
#CFLAGS = -DSOLARIS -Wall -I. -I../libpcap-0.7.1 -L../libpcap-0.7.1 -ggdb
18
#LDFLAGS = -lsocket -lnsl -lpcap
19
@@ -33,7 +33,7 @@ conffile.o: conffile.c cdp.h cdpr.h
20
gcc -c $(CFLAGS) conffile.c
22
cdpr: cdpr.o cdprs.o conffile.o
23
- gcc $(LDFLAGS) -o cdpr cdpr.o cdprs.o conffile.o
24
+ gcc $(LDFLAGS) -o cdpr cdpr.o cdprs.o conffile.o $(LIBS)
27
mkdir -p $(DESTDIR)$(prefix)/sbin/