0001-realtime-Fix-exp10-check.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From 03bf456cb5b65ff7cfabfab3758ca8f3c6816556 Mon Sep 17 00:00:00 2001
  2. From: Cyril Hrubis <chrubis@suse.cz>
  3. Date: Thu, 4 Sep 2014 11:28:55 +0200
  4. Subject: [PATCH] realtime: Fix exp10 check.
  5. The parameter to exp10() function was constant and because of that it
  6. was substituted by a constant at the compile time.
  7. This patch passes volatile float as the parameter and also adds -lm to
  8. the LIBS which is needed to link the test.
  9. Reported-by: Waldemar Brodkorb <wbx@openadk.org>
  10. Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
  11. ---
  12. testcases/realtime/m4/ltp-exp10.m4 | 6 +++++-
  13. 1 file changed, 5 insertions(+), 1 deletion(-)
  14. diff --git a/testcases/realtime/m4/ltp-exp10.m4 b/testcases/realtime/m4/ltp-exp10.m4
  15. index 4fe7091..84a3d9b 100644
  16. --- a/testcases/realtime/m4/ltp-exp10.m4
  17. +++ b/testcases/realtime/m4/ltp-exp10.m4
  18. @@ -24,10 +24,14 @@ AC_DEFUN([LTP_CHECK_EXP10],[
  19. AH_TEMPLATE(HAVE_EXP10,
  20. [Define to 1 if you have 'exp10' function.])
  21. AC_MSG_CHECKING([for exp10])
  22. +backup_ldlibs="$LIBS"
  23. +LIBS+=" -lm"
  24. AC_TRY_LINK([#define _GNU_SOURCE
  25. #include <math.h>],
  26. [
  27. - exp10(0.00);
  28. + volatile float val;
  29. + exp10(val);
  30. ],
  31. AC_DEFINE(HAVE_EXP10) AC_MSG_RESULT(yes), AC_MSG_RESULT(no))
  32. +LIBS="$backup_ldlibs"
  33. ])
  34. --
  35. 1.8.5.5