1
From: Jan Engelhardt <jengelh@medozas.de>
2
Date: Sat, 3 Sep 2011 11:34:40 +0000 (+0200)
3
Subject: libxt_statistic: link with -lm
4
X-Git-Tag: v1.4.12.2~14^2~4
5
X-Git-Url: http://git.netfilter.org/cgi-bin/gitweb.cgi?p=iptables.git;a=commitdiff_plain;h=d4e72dc1c684c2f8361d87e6bde2902cd2ee8efb
7
libxt_statistic: link with -lm
9
$ ldd -r libxt_statistic.so
10
undefined symbol: lround (./libxt_statistic.so)
12
References: https://bugs.archlinux.org/task/25358
13
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
16
diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in
17
index 2b48d84..dbf210c 100644
18
--- a/extensions/GNUmakefile.in
19
+++ b/extensions/GNUmakefile.in
20
@@ -90,11 +90,14 @@ init%.o: init%.c
24
- ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $<;
25
+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $< ${$*_LIBADD};
27
lib%.oo: ${srcdir}/lib%.c
28
${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=lib$*_init -DPIC -fPIC ${CFLAGS} -o $@ -c $<;
30
+# Need the LIBADDs in iptables/Makefile.am too for libxtables_la_LIBADD
31
+xt_statistic_LIBADD = -lm
36
diff --git a/iptables/Makefile.am b/iptables/Makefile.am
37
index addb159..f6db32d 100644
38
--- a/iptables/Makefile.am
39
+++ b/iptables/Makefile.am
40
@@ -6,12 +6,17 @@ AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_srcdir}
41
lib_LTLIBRARIES = libxtables.la
42
libxtables_la_SOURCES = xtables.c xtoptions.c
43
libxtables_la_LDFLAGS = -version-info ${libxtables_vcurrent}:0:${libxtables_vage}
44
+libxtables_la_LIBADD =
46
+# With --enable-static, shipped extensions are linked into the main executable,
47
+# so we need all the LIBADDs here too
48
+libxtables_la_LIBADD += -lm
51
libxtables_la_CFLAGS = ${AM_CFLAGS}
52
-libxtables_la_LIBADD = -ldl
53
+libxtables_la_LIBADD += -ldl
55
libxtables_la_CFLAGS = ${AM_CFLAGS} -DNO_SHARED_LIBS=1
56
-libxtables_la_LIBADD =
59
xtables_multi_SOURCES = xtables-multi.c iptables-xml.c