~ubuntu-branches/ubuntu/trusty/cdpr/trusty

« back to all changes in this revision

Viewing changes to debian/patches/0003-fix-as-needed-build.patch

  • Committer: Bazaar Package Importer
  • Author(s): Julian Taylor
  • Date: 2011-08-21 16:25:51 UTC
  • Revision ID: james.westby@ubuntu.com-20110821162551-fss9uaw4qnhyijfl
Tags: 2.4-1ubuntu1
* debian/patches/0003-fix-as-needed-build.patch:
  - fix build with ld --as-needed (LP: #803174)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
9
+++ cdpr-2.4/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
 
13
 
 
14
-LDFLAGS = -lpcap
 
15
+LIBS = -lpcap
 
16
 
 
17
 # Build for Solaris
 
18
 #LDFLAGS = -lsocket -lnsl -lpcap
 
19
@@ -33,7 +33,7 @@ conffile.o: conffile.c cdp.h cdpr.h
 
20
        gcc -c $(CFLAGS) conffile.c
 
21
 
 
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)
 
25
 
 
26
 install: all
 
27
        mkdir -p $(DESTDIR)$(prefix)/sbin/