Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] yajl: fix build with uClibc
@ 2016-04-20  9:38 Vicente Olivert Riera
  2016-04-21  6:15 ` Jörg Krause
  0 siblings, 1 reply; 3+ messages in thread
From: Vicente Olivert Riera @ 2016-04-20  9:38 UTC (permalink / raw)
  To: buildroot

The failure looks like this:

../yajl-2.1.0/lib/libyajl.so.2.1.0: undefined reference to `__isinf'
../yajl-2.1.0/lib/libyajl.so.2.1.0: undefined reference to `__isnan'

We already have a patch (0001) which should fix this problem, however,
as stated here [1], it doesn't work when cross compiling.

To fix the problem we add -lm to CFLAGS when building with uClibc.

Fixes:

  http://autobuild.buildroot.net/results/308/30892ffb298acc2334f8c694038c420120fe43b9/

1: https://github.com/lloyd/yajl/issues/58#issuecomment-15683796

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
 package/yajl/yajl.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/yajl/yajl.mk b/package/yajl/yajl.mk
index 7770e86..145bf2c 100644
--- a/package/yajl/yajl.mk
+++ b/package/yajl/yajl.mk
@@ -11,4 +11,8 @@ YAJL_LICENSE = ISC
 YAJL_LICENSE_FILES = COPYING
 YAJL_PATCH = https://github.com/vriera/yajl/commit/6d09f11b8fd358cab0e31b965327e64a599f9ce9.patch
 
+ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
+YAJL_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -lm"
+endif
+
 $(eval $(cmake-package))
-- 
2.7.3

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

end of thread, other threads:[~2016-04-22 13:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-20  9:38 [Buildroot] [PATCH] yajl: fix build with uClibc Vicente Olivert Riera
2016-04-21  6:15 ` Jörg Krause
2016-04-22 13:58   ` Benoît Mauduit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox