All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/iputils: patch ping to link against libm
@ 2016-02-15 13:00 Martin Bark
  2016-02-15 22:17 ` Thomas Petazzoni
  2016-02-20 14:51 ` Thomas Petazzoni
  0 siblings, 2 replies; 10+ messages in thread
From: Martin Bark @ 2016-02-15 13:00 UTC (permalink / raw)
  To: buildroot

ping fails to compile with uClibc based toolchains with the error

undefined reference to `__finite'

Add a patch to link ping against libm to resolve the math library function
finite().

Note, this error is not seen with glibc based toolchains because finite
seems to be resolved in both libm and libc.

Fixes:
http://autobuild.buildroot.net/results/08f7386f75c881bc582b338824f8ccd509b2921e/
http://autobuild.buildroot.net/results/5aeef61fbd399dd78dc72b9e7cce978e6f1f58b4/

A pull request has been sent to fix this issue upstream, see
https://github.com/iputils/iputils/pull/42

Signed-off-by: Martin Bark <martin@barkynet.com>
---
 package/iputils/0001-ping-link-against-libm.patch | 29 +++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 package/iputils/0001-ping-link-against-libm.patch

diff --git a/package/iputils/0001-ping-link-against-libm.patch b/package/iputils/0001-ping-link-against-libm.patch
new file mode 100644
index 0000000..d151c5b
--- /dev/null
+++ b/package/iputils/0001-ping-link-against-libm.patch
@@ -0,0 +1,29 @@
+From 8d189e73e660a637ae3f5a604448103ea42e397d Mon Sep 17 00:00:00 2001
+From: Martin Bark <martin@barkynet.com>
+Date: Fri, 12 Feb 2016 16:52:19 +0000
+Subject: [PATCH] ping: link against libm
+
+This commit links ping against libm because ping.c calls the math library
+function finite().
+
+Signed-off-by: Martin Bark <martin@barkynet.com>
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 8b37c42..fb80f6f 100644
+--- a/Makefile
++++ b/Makefile
+@@ -156,7 +156,7 @@ LIB_clockdiff = $(LIB_CAP)
+ DEF_ping_common = $(DEF_CAP) $(DEF_IDN)
+ DEF_ping6_common = $(DEF_CAP) $(DEF_IDN)
+ DEF_ping  = $(DEF_CAP) $(DEF_IDN) $(DEF_WITHOUT_IFADDRS)
+-LIB_ping  = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV)
++LIB_ping  = $(LIB_CAP) $(LIB_IDN) $(LIB_RESOLV) -lm
+ 
+ ping: ping_common.o ping6_common.o
+ ping.o ping_common.o ping6_common.o: ping.h in6_flowlabel.h
+-- 
+2.7.0
+
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-02-20 14:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-15 13:00 [Buildroot] [PATCH 1/1] package/iputils: patch ping to link against libm Martin Bark
2016-02-15 22:17 ` Thomas Petazzoni
2016-02-16 10:13   ` Martin Bark
2016-02-16 19:03   ` Waldemar Brodkorb
2016-02-16 19:58     ` Martin Bark
2016-02-16 20:30       ` Thomas Petazzoni
2016-02-16 20:28     ` Thomas Petazzoni
2016-02-17  0:17       ` Arnout Vandecappelle
2016-02-17  7:56         ` Thomas Petazzoni
2016-02-20 14:51 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.