diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2010-04-16 13:43:01 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2010-04-19 11:40:42 +0200 |
commit | 711069515b084c74014dc637a7f1b0fdee64f2bb (patch) | |
tree | 0aa4842b60c4c36751facc3c342b3ad0df23ed59 /patches/libpcap-1.1.1 | |
parent | b1d290d7d76d51eb53fd61a5d2c8bcc9909b0e9f (diff) | |
download | ptxdist-711069515b084c74014dc637a7f1b0fdee64f2bb.tar.gz ptxdist-711069515b084c74014dc637a7f1b0fdee64f2bb.tar.xz |
[libpcap] only compile shared library and install it
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches/libpcap-1.1.1')
-rw-r--r-- | patches/libpcap-1.1.1/0002-compile-static-lib-without-fPIC.patch | 95 | ||||
-rw-r--r-- | patches/libpcap-1.1.1/0002-dont-compile-static-lib.diff | 34 | ||||
-rw-r--r-- | patches/libpcap-1.1.1/series | 2 |
3 files changed, 35 insertions, 96 deletions
diff --git a/patches/libpcap-1.1.1/0002-compile-static-lib-without-fPIC.patch b/patches/libpcap-1.1.1/0002-compile-static-lib-without-fPIC.patch deleted file mode 100644 index d417732bd..000000000 --- a/patches/libpcap-1.1.1/0002-compile-static-lib-without-fPIC.patch +++ /dev/null @@ -1,95 +0,0 @@ -From b3f3e35dbd100fb10cbd0ee5cf86baecce48a673 Mon Sep 17 00:00:00 2001 -From: Marc Kleine-Budde <mkl@pengutronix.de> -Date: Sun, 10 Jan 2010 00:47:38 +0100 -Subject: [PATCH 2/4] compile static lib without -fPIC - -Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> ---- - Makefile.in | 26 ++++++++++++++------------ - 1 file changed, 14 insertions(+), 12 deletions(-) - -Index: b/Makefile.in -=================================================================== ---- a/Makefile.in -+++ b/Makefile.in -@@ -76,9 +76,13 @@ YACC = @V_YACC@ - # Explicitly define compilation rule since SunOS 4's make doesn't like gcc. - # Also, gcc does not remove the .o before forking 'as', which can be a - # problem if you don't own the file but can write to the directory. --.c.o: -+%.o: %.c - @rm -f $@ -- $(CC) $(CFLAGS) -c $(srcdir)/$*.c -+ $(CC) $(filter-out -fPIC,$(CFLAGS)) -c $(srcdir)/$*.c -o $@ -+ -+%.do: %.c -+ @rm -f $@ -+ $(CC) $(CFLAGS) -c $(srcdir)/$*.c -o $@ - - PSRC = pcap-@V_PCAP@.c @USB_SRC@ @BT_SRC@ @CAN_SRC@ - FSRC = fad-@V_FINDALLDEVS@.c -@@ -94,6 +98,7 @@ SRC = $(PSRC) $(FSRC) $(CSRC) $(SSRC) $( - # We would like to say "OBJ = $(SRC:.c=.o)" but Ultrix's make cannot - # hack the extra indirection - OBJ = $(PSRC:.c=.o) $(FSRC:.c=.o) $(CSRC:.c=.o) $(SSRC:.c=.o) $(GENSRC:.c=.o) $(LIBOBJS) -+DOBJ = $(PSRC:.c=.do) $(FSRC:.c=.do) $(CSRC:.c=.do) $(SSRC:.c=.do) $(GENSRC:.c=.do) $(LIBOBJS:.o=.do) - PUBHDR = \ - pcap.h \ - pcap-bpf.h \ -@@ -129,7 +134,7 @@ GENHDR = \ - TAGFILES = \ - $(SRC) $(HDR) - --CLEANFILES = $(OBJ) libpcap.* filtertest findalldevstest selpolltest \ -+CLEANFILES = $(OBJ) $(DOBJ) libpcap.* filtertest findalldevstest selpolltest \ - opentest $(PROG)-`cat $(srcdir)/VERSION`.tar.gz $(GENSRC) $(GENHDR) \ - lex.yy.c pcap-config - -@@ -333,12 +338,12 @@ libpcap.a: $(OBJ) - - shared: libpcap.$(DYEXT) - --libpcap.so: $(OBJ) -+libpcap.so: $(DOBJ) - @rm -f $@ - VER=`cat $(srcdir)/VERSION`; \ - MAJOR_VER=`sed 's/\([0-9][0-9]*\)\..*/\1/' $(srcdir)/VERSION`; \ - @V_SHLIB_CMD@ @V_SHLIB_OPT@ @V_SONAME_OPT@$@.$$MAJOR_VER $(LDFLAGS) \ -- -o $@.$$VER $(OBJ) $(ADDLOBJS) $(LIBS) -+ -o $@.$$VER $(DOBJ) $(ADDLOBJS) $(LIBS) - - # - # The following rule succeeds, but the result is untested. -@@ -414,7 +419,6 @@ scanner.c: $(srcdir)/scanner.l - $(srcdir)/runlex.sh $(LEX) -o$@ $< - - scanner.o: scanner.c tokdefs.h -- $(CC) $(CFLAGS) -c scanner.c - - pcap.o: version.h - -@@ -427,10 +431,11 @@ grammar.c: $(srcdir)/grammar.y - - grammar.o: grammar.c - @rm -f $@ -- $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c -+ $(CC) $(filter-out -fPIC,$(CFLAGS)) -Dyylval=pcap_lval -c grammar.c -o $@ - --version.o: version.c -- $(CC) $(CFLAGS) -c version.c -+grammar.do: grammar.c -+ @rm -f $@ -+ $(CC) $(CFLAGS) -Dyylval=pcap_lval -c grammar.c -o $@ - - snprintf.o: $(srcdir)/missing/snprintf.c - $(CC) $(CFLAGS) -o $@ -c $(srcdir)/missing/snprintf.c -@@ -466,9 +471,6 @@ bpf_filter.c: $(srcdir)/bpf/net/bpf_filt - rm -f bpf_filter.c - ln -s $(srcdir)/bpf/net/bpf_filter.c bpf_filter.c - --bpf_filter.o: bpf_filter.c -- $(CC) $(CFLAGS) -c bpf_filter.c -- - # - # Generate the pcap-config script. - # diff --git a/patches/libpcap-1.1.1/0002-dont-compile-static-lib.diff b/patches/libpcap-1.1.1/0002-dont-compile-static-lib.diff new file mode 100644 index 000000000..fefd05e4b --- /dev/null +++ b/patches/libpcap-1.1.1/0002-dont-compile-static-lib.diff @@ -0,0 +1,34 @@ +From: Michael Olbrich <m.olbrich@pengutronix.de> +Subject: build and install share lib only + +This patch removes the static library from the dependency list +for "all" and "install". This way libpcap.a is not built and +tcpdump cannot link against it. + +Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> +--- + Makefile.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: b/Makefile.in +=================================================================== +--- a/Makefile.in ++++ b/Makefile.in +@@ -324,7 +324,7 @@ EXTRA_DIST = \ + Win32/Src/inet_net.c \ + Win32/Src/inet_pton.c + +-all: libpcap.a shared pcap-config ++all: shared pcap-config + + libpcap.a: $(OBJ) + @rm -f $@ +@@ -497,7 +497,7 @@ selpolltest: selpolltest.c libpcap.a + opentest: opentest.c libpcap.a + $(CC) $(CFLAGS) -I. -L. -o opentest $(srcdir)/opentest.c libpcap.a $(LIBS) + +-install: install-shared install-archive pcap-config ++install: install-shared pcap-config + [ -d $(DESTDIR)$(libdir) ] || \ + (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir)) + [ -d $(DESTDIR)$(includedir) ] || \ diff --git a/patches/libpcap-1.1.1/series b/patches/libpcap-1.1.1/series index 5e6f782dd..9c6cddcbc 100644 --- a/patches/libpcap-1.1.1/series +++ b/patches/libpcap-1.1.1/series @@ -1,3 +1,3 @@ 0001-add-CFLAGS-CPPFLAGS-and-LDFLAGS-to-Makefile.in.patch -0002-compile-static-lib-without-fPIC.patch +0002-dont-compile-static-lib.diff 0004-pcap-config-add-SYSROOT-support.patch |