All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] build-sys: improve detection of the "isnan" function in uClibc
@ 2017-02-08 15:27 Carlos Santos
  2017-02-09 10:33 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Carlos Santos @ 2017-02-08 15:27 UTC (permalink / raw)
  To: util-linux

Since commit beceb14b450ded6560ed743634a5e80604a8edf3, MATH_LIBS is set
to "-lm" when the isnan function is detected. In uClibc, however, isnan
is a macro that calls __isnan, __isnanf, or __isnanl, depending on the
size of the argument (double, float or long double).

Fixes:
  http://autobuild.buildroot.net/results/2c2/2c29a78ed81ca844a87dcd076ab3e14ea080296d/
  http://autobuild.buildroot.net/results/404/404b10f359b2ae8a7216729fa1bab37fed2d3d4c/

Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
---
 configure.ac | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure.ac b/configure.ac
index 3759921..3bb3ba8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -435,6 +435,7 @@ AM_CONDITIONAL([HAVE_OPENAT], [test "x$have_openat" = xyes])
 
 AC_CHECK_FUNCS([isnan], [],
 	[AC_CHECK_LIB([m], [isnan], [MATH_LIBS="-lm"])]
+	[AC_CHECK_LIB([m], [__isnan], [MATH_LIBS="-lm"])]
 )
 AC_SUBST([MATH_LIBS])
 
-- 
2.7.4


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

* Re: [PATCH] build-sys: improve detection of the "isnan" function in uClibc
  2017-02-08 15:27 [PATCH] build-sys: improve detection of the "isnan" function in uClibc Carlos Santos
@ 2017-02-09 10:33 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2017-02-09 10:33 UTC (permalink / raw)
  To: Carlos Santos; +Cc: util-linux

On Wed, Feb 08, 2017 at 01:27:36PM -0200, Carlos Santos wrote:
> Since commit beceb14b450ded6560ed743634a5e80604a8edf3, MATH_LIBS is set
> to "-lm" when the isnan function is detected. In uClibc, however, isnan
> is a macro that calls __isnan, __isnanf, or __isnanl, depending on the
> size of the argument (double, float or long double).
> 
> Fixes:
>   http://autobuild.buildroot.net/results/2c2/2c29a78ed81ca844a87dcd076ab3e14ea080296d/
>   http://autobuild.buildroot.net/results/404/404b10f359b2ae8a7216729fa1bab37fed2d3d4c/
> 
> Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
> ---
>  configure.ac | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/configure.ac b/configure.ac
> index 3759921..3bb3ba8 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -435,6 +435,7 @@ AM_CONDITIONAL([HAVE_OPENAT], [test "x$have_openat" = xyes])
>  
>  AC_CHECK_FUNCS([isnan], [],
>  	[AC_CHECK_LIB([m], [isnan], [MATH_LIBS="-lm"])]
> +	[AC_CHECK_LIB([m], [__isnan], [MATH_LIBS="-lm"])]
>  )
>  AC_SUBST([MATH_LIBS])

Applied, thanks. (It would be possible to use AC_COMPILE_IFELSE() monster, but if
AC_CHECK_LIB() is good enough than it's probably better.)

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

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

end of thread, other threads:[~2017-02-09 10:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-08 15:27 [PATCH] build-sys: improve detection of the "isnan" function in uClibc Carlos Santos
2017-02-09 10:33 ` Karel Zak

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.