0002-build-sys-improve-detection-of-the-isnan-function-in.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 064a0445f33a67e5498d492dabe0dfc687859756 Mon Sep 17 00:00:00 2001
  2. From: Carlos Santos <casantos@datacom.ind.br>
  3. Date: Wed, 8 Feb 2017 09:29:30 -0200
  4. Subject: [PATCH] build-sys: improve detection of the "isnan" function in
  5. uClibc
  6. Since commit beceb14b450ded6560ed743634a5e80604a8edf3, MATH_LIBS is set
  7. to "-lm" when the isnan function is detected. In uClibc, however, isnan
  8. is a macro that calls __isnan, __isnanf, or __isnanl, depending on the
  9. size of the argument (double, float or long double).
  10. Fixes:
  11. http://autobuild.buildroot.net/results/2c2/2c29a78ed81ca844a87dcd076ab3e14ea080296d/
  12. http://autobuild.buildroot.net/results/404/404b10f359b2ae8a7216729fa1bab37fed2d3d4c/
  13. Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
  14. ---
  15. configure.ac | 3 ++-
  16. 1 file changed, 2 insertions(+), 1 deletion(-)
  17. diff --git a/configure.ac b/configure.ac
  18. index cc0563b..d03469c 100644
  19. --- a/configure.ac
  20. +++ b/configure.ac
  21. @@ -428,7 +428,8 @@ AC_CHECK_FUNCS([reboot], [have_reboot=yes],[have_reboot=no])
  22. AM_CONDITIONAL([HAVE_OPENAT], [test "x$have_openat" = xyes])
  23. AC_CHECK_FUNCS([isnan], [],
  24. - [AC_CHECK_LIB([m], [isnan], [MATH_LIBS="-lm"])]
  25. + [AC_CHECK_LIB([m], [isnan], [MATH_LIBS="-lm"])]
  26. + [AC_CHECK_LIB([m], [__isnan], [MATH_LIBS="-lm"])]
  27. )
  28. AC_SUBST([MATH_LIBS])
  29. --
  30. 2.7.4