libnetfilter_conntrack: fix static linking
authorGustavo Zacarias <gustavo@zacarias.com.ar>
Wed, 14 Jan 2015 16:02:43 +0000 (13:02 -0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 14 Jan 2015 18:25:08 +0000 (19:25 +0100)
It has a hardcoded -ldl link invocation, so drop it. Fixes:
http://autobuild.buildroot.net/results/66ba5f76694d0738b113463579ce6b2fa49a89d6/

Also add hash file and rename uclinux patch to new naming convention.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/libnetfilter_conntrack/0001-uclinux.patch [new file with mode: 0644]
package/libnetfilter_conntrack/0002-src-Makefile.am-drop-hardcoded-ldl.patch [new file with mode: 0644]
package/libnetfilter_conntrack/libnetfilter_conntrack-01-uclinux.patch [deleted file]
package/libnetfilter_conntrack/libnetfilter_conntrack.hash [new file with mode: 0644]
package/libnetfilter_conntrack/libnetfilter_conntrack.mk

diff --git a/package/libnetfilter_conntrack/0001-uclinux.patch b/package/libnetfilter_conntrack/0001-uclinux.patch
new file mode 100644 (file)
index 0000000..ef79a80
--- /dev/null
@@ -0,0 +1,26 @@
+From bdf4afdcb68f62fcd05536b8cb68478d3ea31c68 Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <gustavo@zacarias.com.ar>
+Date: Tue, 10 Sep 2013 15:46:19 -0300
+Subject: [PATCH] configure: uclinux is also linux
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 12e1d16..1edfd66 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -19,7 +19,7 @@ AC_PROG_INSTALL
+ AC_PROG_LN_S
+ case "$host" in 
+-*-*-linux*) ;;
++*-*-linux* | *-*-uclinux*) ;;
+ *) AC_MSG_ERROR([Linux only, dude!]);;
+ esac
+-- 
+1.8.1.5
+
diff --git a/package/libnetfilter_conntrack/0002-src-Makefile.am-drop-hardcoded-ldl.patch b/package/libnetfilter_conntrack/0002-src-Makefile.am-drop-hardcoded-ldl.patch
new file mode 100644 (file)
index 0000000..e5ad3ba
--- /dev/null
@@ -0,0 +1,27 @@
+From b8d32eff8dbfff5a93b6ea6ee9f5747e16cb32c4 Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <gustavo@zacarias.com.ar>
+Date: Wed, 14 Jan 2015 10:53:20 -0300
+Subject: [PATCH] src/Makefile.am: drop hardcoded -ldl
+
+This breaks static builds where the toolchain completely lacks libdl.
+
+Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
+---
+ src/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 7d6c905..374598a 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -11,6 +11,6 @@ lib_LTLIBRARIES = libnetfilter_conntrack.la
+ libnetfilter_conntrack_la_LIBADD = conntrack/libnfconntrack.la \
+                                  expect/libnfexpect.la \
+                                  ${LIBNFNETLINK_LIBS} ${LIBMNL_LIBS}
+-libnetfilter_conntrack_la_LDFLAGS = -Wc,-nostartfiles -lnfnetlink -ldl        \
++libnetfilter_conntrack_la_LDFLAGS = -Wc,-nostartfiles -lnfnetlink \
+                                   -version-info $(LIBVERSION)
+ libnetfilter_conntrack_la_SOURCES = main.c callback.c
+-- 
+2.0.5
+
diff --git a/package/libnetfilter_conntrack/libnetfilter_conntrack-01-uclinux.patch b/package/libnetfilter_conntrack/libnetfilter_conntrack-01-uclinux.patch
deleted file mode 100644 (file)
index ef79a80..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-From bdf4afdcb68f62fcd05536b8cb68478d3ea31c68 Mon Sep 17 00:00:00 2001
-From: Gustavo Zacarias <gustavo@zacarias.com.ar>
-Date: Tue, 10 Sep 2013 15:46:19 -0300
-Subject: [PATCH] configure: uclinux is also linux
-
-Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
----
- configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/configure.ac b/configure.ac
-index 12e1d16..1edfd66 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -19,7 +19,7 @@ AC_PROG_INSTALL
- AC_PROG_LN_S
- case "$host" in 
--*-*-linux*) ;;
-+*-*-linux* | *-*-uclinux*) ;;
- *) AC_MSG_ERROR([Linux only, dude!]);;
- esac
--- 
-1.8.1.5
-
diff --git a/package/libnetfilter_conntrack/libnetfilter_conntrack.hash b/package/libnetfilter_conntrack/libnetfilter_conntrack.hash
new file mode 100644 (file)
index 0000000..13fde40
--- /dev/null
@@ -0,0 +1,3 @@
+# From ftp://ftp.netfilter.org/pub/libnetfilter_conntrack/libnetfilter_conntrack-1.0.4.tar.bz2.{md5sum,sha1sum}
+md5    18cf80c4b339a3285e78822dbd4f08d7        libnetfilter_conntrack-1.0.4.tar.bz2
+sha1   34fae1a30cbd51d46945e9f35790118c3462b0c6        libnetfilter_conntrack-1.0.4.tar.bz2
index df037b9cea45056f5f59149f98ca92312f9955be..7841f27f0c527904066f65069a21a8f7467d55a6 100644 (file)
@@ -9,6 +9,7 @@ LIBNETFILTER_CONNTRACK_SOURCE = libnetfilter_conntrack-$(LIBNETFILTER_CONNTRACK_
 LIBNETFILTER_CONNTRACK_SITE = http://www.netfilter.org/projects/libnetfilter_conntrack/files
 LIBNETFILTER_CONNTRACK_INSTALL_STAGING = YES
 LIBNETFILTER_CONNTRACK_DEPENDENCIES = host-pkgconf libnfnetlink libmnl
+# For 0001-uclinux.patch & 0002-src-Makefile.am-drop-hardcoded-ldl.patch
 LIBNETFILTER_CONNTRACK_AUTORECONF = YES
 LIBNETFILTER_CONNTRACK_LICENSE = GPLv2+
 LIBNETFILTER_CONNTRACK_LICENSE_FILES = COPYING