From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] package/libubox: Fix linking against libm
Date: Fri, 1 May 2015 11:51:24 +0200 [thread overview]
Message-ID: <20150501115124.1fd77b67@free-electrons.com> (raw)
In-Reply-To: <1430247544-2735-1-git-send-email-bernd.kuhls@t-online.de>
Dear Bernd Kuhls,
On Tue, 28 Apr 2015 20:59:04 +0200, Bernd Kuhls wrote:
> Fixes
> http://autobuild.buildroot.net/results/94d/94dd7f38ae105e7cd2f342d718e27a65edcf3a3d/
> http://autobuild.buildroot.net/results/1ca/1ca29f3adc1b9b2a841df7d118548654b3235432/
> http://autobuild.buildroot.net/results/231/231e5966948dcef579190c48d2aaf24414159483/
> http://autobuild.buildroot.net/results/b55/b55aecc18a9870c342e0be4ed58cd609527bff96/
> http://autobuild.buildroot.net/results/947/9473b109cf942296b0643e074839209134f6e3fc/
> and many others
>
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> package/libubox/libubox.mk | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/package/libubox/libubox.mk b/package/libubox/libubox.mk
> index 5d9c01d..15a3739 100644
> --- a/package/libubox/libubox.mk
> +++ b/package/libubox/libubox.mk
> @@ -10,6 +10,11 @@ LIBUBOX_LICENSE = LGPLv2.1, GPLv2, BSD-3c, MIT
> LIBUBOX_INSTALL_STAGING = YES
> LIBUBOX_DEPENDENCIES = $(if $(BR2_PACKAGE_JSON_C),json-c)
>
> +# For uClibc-based toolchains, libubox forgets to link with -lm
> +ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
> +LIBUBOX_CONF_OPTS = -DCMAKE_C_FLAGS="-lm"
> +endif
This is not the right fix. This is just a workaround.
The real problem is in json-c, it uses isnan() without linking against
libm. So the json-c configure.ac script should be adjusted to link
against libm when needed, and reflect that in json-c pkg-config file
as well.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
prev parent reply other threads:[~2015-05-01 9:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-28 18:59 [Buildroot] [PATCH 1/1] package/libubox: Fix linking against libm Bernd Kuhls
2015-05-01 9:51 ` Thomas Petazzoni [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150501115124.1fd77b67@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox