This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem trying to build eglibc for m68k Coldfire MCF54418


Finally solved by adding a lot of #ifdef. ^^

According to http://www.gnu.org/software/libc/manual/html_node/Status-bit-operations.html
:
Each constant is defined if and only if the FPU you are compiling for
supports that exception, so you can test for FPU support with
'#ifdef'.

That's what I did. I found an old patch here which make me think it
was the good solution :
http://repository.timesys.com/buildsources/g/glibc/glibc-2.15/glibc-2.15-coldfire-non-fenv.patch

So here is the patch if you want to integrate it.
All builds fine now. :)

Thanks,
Gilles

 ==================================
diff -aburN glibc-2.19-svnr25243/libc/math/e_scalb.c
glibc-2.19-svnr25243-patched/libc/math/e_scalb.c
--- glibc-2.19-svnr25243/libc/math/e_scalb.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/e_scalb.c 2014-03-23
16:59:10.753686907 +0100
@@ -27,7 +27,9 @@
 {
   if (__rint (fn) != fn)
     {
+# ifdef FE_INVALID
       feraiseexcept (FE_INVALID);
+# endif
       return __nan ("");
     }
   else if (fn > 65000.0)
diff -aburN glibc-2.19-svnr25243/libc/math/e_scalbf.c
glibc-2.19-svnr25243-patched/libc/math/e_scalbf.c
--- glibc-2.19-svnr25243/libc/math/e_scalbf.c 2014-01-03
18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/e_scalbf.c 2014-03-23
16:59:10.753686907 +0100
@@ -27,7 +27,9 @@
 {
   if (__rintf (fn) != fn)
     {
+# ifdef FE_INVALID
       feraiseexcept (FE_INVALID);
+# endif
       return __nan ("");
     }
   else if (fn > 65000.0f)
diff -aburN glibc-2.19-svnr25243/libc/math/e_scalbl.c
glibc-2.19-svnr25243-patched/libc/math/e_scalbl.c
--- glibc-2.19-svnr25243/libc/math/e_scalbl.c 2014-01-03
18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/e_scalbl.c 2014-03-23
16:59:10.753686907 +0100
@@ -27,7 +27,9 @@
 {
   if (__rintl (fn) != fn)
     {
+# ifdef FE_INVALID
       feraiseexcept (FE_INVALID);
+# endif
       return __nan ("");
     }
   else if (fn > 65000.0L)
diff -aburN glibc-2.19-svnr25243/libc/math/s_ccosh.c
glibc-2.19-svnr25243-patched/libc/math/s_ccosh.c
--- glibc-2.19-svnr25243/libc/math/s_ccosh.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/s_ccosh.c 2014-03-23
16:59:10.693686909 +0100
@@ -101,8 +101,10 @@
   __imag__ retval = __real__ x == 0.0 ? 0.0 : __nan ("");
   __real__ retval = __nan ("") + __nan ("");

+#ifdef FE_INVALID
   if (icls == FP_INFINITE)
     feraiseexcept (FE_INVALID);
+#endif
  }
     }
   else if (rcls == FP_INFINITE)
@@ -139,8 +141,10 @@
   __real__ retval = HUGE_VAL;
   __imag__ retval = __nan ("") + __nan ("");

+#ifdef FE_INVALID
   if (icls == FP_INFINITE)
     feraiseexcept (FE_INVALID);
+#endif
  }
     }
   else
diff -aburN glibc-2.19-svnr25243/libc/math/s_ccoshf.c
glibc-2.19-svnr25243-patched/libc/math/s_ccoshf.c
--- glibc-2.19-svnr25243/libc/math/s_ccoshf.c 2014-01-03
18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/s_ccoshf.c 2014-03-23
16:59:10.749686907 +0100
@@ -101,8 +101,10 @@
   __imag__ retval = __real__ x == 0.0 ? 0.0 : __nanf ("");
   __real__ retval = __nanf ("");

+#ifdef FE_INVALID
   if (icls == FP_INFINITE)
     feraiseexcept (FE_INVALID);
+#endif
  }
     }
   else if (__builtin_expect (rcls == FP_INFINITE, 1))
diff -aburN glibc-2.19-svnr25243/libc/math/s_cexp.c
glibc-2.19-svnr25243-patched/libc/math/s_cexp.c
--- glibc-2.19-svnr25243/libc/math/s_cexp.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/s_cexp.c 2014-03-23
16:59:10.697686909 +0100
@@ -94,7 +94,9 @@
   __real__ retval = __nan ("");
   __imag__ retval = __nan ("");

+#ifdef FE_INVALID
   feraiseexcept (FE_INVALID);
+#endif
  }
     }
   else if (__builtin_expect (rcls == FP_INFINITE, 1))
@@ -134,8 +136,10 @@
   __real__ retval = HUGE_VAL;
   __imag__ retval = __nan ("");

+#ifdef FE_INVALID
   if (icls == FP_INFINITE)
     feraiseexcept (FE_INVALID);
+#endif
  }
       else
  {
@@ -154,8 +158,10 @@
  {
   __imag__ retval = __nan ("");

+#ifdef FE_INVALID
   if (rcls != FP_NAN || icls != FP_NAN)
     feraiseexcept (FE_INVALID);
+#endif
  }
     }

diff -aburN glibc-2.19-svnr25243/libc/math/s_cexpf.c
glibc-2.19-svnr25243-patched/libc/math/s_cexpf.c
--- glibc-2.19-svnr25243/libc/math/s_cexpf.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/s_cexpf.c 2014-03-23
16:59:10.757686907 +0100
@@ -94,7 +94,9 @@
   __real__ retval = __nanf ("");
   __imag__ retval = __nanf ("");

+#ifdef FE_INVALID
   feraiseexcept (FE_INVALID);
+#endif
  }
     }
   else if (__builtin_expect (rcls == FP_INFINITE, 1))
@@ -134,8 +136,10 @@
   __real__ retval = HUGE_VALF;
   __imag__ retval = __nanf ("");

+#ifdef FE_INVALID
   if (icls == FP_INFINITE)
     feraiseexcept (FE_INVALID);
+#endif
  }
       else
  {
@@ -154,8 +158,10 @@
  {
   __imag__ retval = __nanf ("");

+#ifdef FE_INVALID
   if (rcls != FP_NAN || icls != FP_NAN)
     feraiseexcept (FE_INVALID);
+#endif
  }
     }

diff -aburN glibc-2.19-svnr25243/libc/math/s_cexpl.c
glibc-2.19-svnr25243-patched/libc/math/s_cexpl.c
--- glibc-2.19-svnr25243/libc/math/s_cexpl.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/s_cexpl.c 2014-03-23
16:59:10.757686907 +0100
@@ -94,7 +94,9 @@
   __real__ retval = __nanl ("");
   __imag__ retval = __nanl ("");

+#ifdef FE_INVALID
   feraiseexcept (FE_INVALID);
+#endif
  }
     }
   else if (__builtin_expect (rcls == FP_INFINITE, 1))
@@ -134,8 +136,10 @@
   __real__ retval = HUGE_VALL;
   __imag__ retval = __nanl ("");

+#ifdef FE_INVALID
   if (icls == FP_INFINITE)
     feraiseexcept (FE_INVALID);
+#endif
  }
       else
  {
@@ -154,8 +158,10 @@
  {
   __imag__ retval = __nanl ("");

+#ifdef FE_INVALID
   if (rcls != FP_NAN || icls != FP_NAN)
     feraiseexcept (FE_INVALID);
+#endif
  }
     }

diff -aburN glibc-2.19-svnr25243/libc/math/s_csin.c
glibc-2.19-svnr25243-patched/libc/math/s_csin.c
--- glibc-2.19-svnr25243/libc/math/s_csin.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/s_csin.c 2014-03-23
16:59:10.753686907 +0100
@@ -110,15 +110,19 @@
       __real__ retval = __nan ("");
       __imag__ retval = __imag__ x;

+#ifdef FE_INVALID
       if (rcls == FP_INFINITE)
  feraiseexcept (FE_INVALID);
+#endif
     }
   else
     {
       __real__ retval = __nan ("");
       __imag__ retval = __nan ("");

+#ifdef FE_INVALID
       feraiseexcept (FE_INVALID);
+#endif
     }
  }
     }
@@ -160,8 +164,10 @@
   __real__ retval = __nan ("");
   __imag__ retval = HUGE_VAL;

+#ifdef FE_INVALID
   if (rcls == FP_INFINITE)
     feraiseexcept (FE_INVALID);
+#endif
  }
     }
   else
diff -aburN glibc-2.19-svnr25243/libc/math/s_csinf.c
glibc-2.19-svnr25243-patched/libc/math/s_csinf.c
--- glibc-2.19-svnr25243/libc/math/s_csinf.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/s_csinf.c 2014-03-23
16:59:10.693686909 +0100
@@ -110,15 +110,19 @@
       __real__ retval = __nanf ("");
       __imag__ retval = __imag__ x;

+#ifdef FE_INVALID
       if (rcls == FP_INFINITE)
  feraiseexcept (FE_INVALID);
+#endif
     }
   else
     {
       __real__ retval = __nanf ("");
       __imag__ retval = __nanf ("");

+#ifdef FE_INVALID
       feraiseexcept (FE_INVALID);
+#endif
     }
  }
     }
@@ -160,8 +164,10 @@
   __real__ retval = __nanf ("");
   __imag__ retval = HUGE_VALF;

+#ifdef FE_INVALID
   if (rcls == FP_INFINITE)
     feraiseexcept (FE_INVALID);
+#endif
  }
     }
   else
diff -aburN glibc-2.19-svnr25243/libc/math/s_csinh.c
glibc-2.19-svnr25243-patched/libc/math/s_csinh.c
--- glibc-2.19-svnr25243/libc/math/s_csinh.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/s_csinh.c 2014-03-23
16:59:10.753686907 +0100
@@ -110,15 +110,19 @@
       __real__ retval = __copysign (0.0, negate ? -1.0 : 1.0);
       __imag__ retval = __nan ("") + __nan ("");

+#ifdef FE_INVALID
       if (icls == FP_INFINITE)
  feraiseexcept (FE_INVALID);
+#endif
     }
   else
     {
       __real__ retval = __nan ("");
       __imag__ retval = __nan ("");

+#ifdef FE_INVALID
       feraiseexcept (FE_INVALID);
+#endif
     }
  }
     }
@@ -158,8 +162,10 @@
   __real__ retval = HUGE_VAL;
   __imag__ retval = __nan ("") + __nan ("");

+#ifdef FE_INVALID
   if (icls == FP_INFINITE)
     feraiseexcept (FE_INVALID);
+#endif
  }
     }
   else
diff -aburN glibc-2.19-svnr25243/libc/math/s_csinhf.c
glibc-2.19-svnr25243-patched/libc/math/s_csinhf.c
--- glibc-2.19-svnr25243/libc/math/s_csinhf.c 2014-01-03
18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/s_csinhf.c 2014-03-23
16:59:10.749686907 +0100
@@ -110,15 +110,19 @@
       __real__ retval = __copysignf (0.0, negate ? -1.0 : 1.0);
       __imag__ retval = __nanf ("") + __nanf ("");

+#ifdef FE_INVALID
       if (icls == FP_INFINITE)
  feraiseexcept (FE_INVALID);
+#endif
     }
   else
     {
       __real__ retval = __nanf ("");
       __imag__ retval = __nanf ("");

+#ifdef FE_INVALID
       feraiseexcept (FE_INVALID);
+#endif
     }
  }
     }
diff -aburN glibc-2.19-svnr25243/libc/math/s_csinhl.c
glibc-2.19-svnr25243-patched/libc/math/s_csinhl.c
--- glibc-2.19-svnr25243/libc/math/s_csinhl.c 2014-01-03
18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/s_csinhl.c 2014-03-23
16:59:10.697686909 +0100
@@ -110,15 +110,19 @@
       __real__ retval = __copysignl (0.0, negate ? -1.0 : 1.0);
       __imag__ retval = __nanl ("") + __nanl ("");

+#ifdef FE_INVALID
       if (icls == FP_INFINITE)
  feraiseexcept (FE_INVALID);
+#endif
     }
   else
     {
       __real__ retval = __nanl ("");
       __imag__ retval = __nanl ("");

+#ifdef FE_INVALID
       feraiseexcept (FE_INVALID);
+#endif
     }
  }
     }
diff -aburN glibc-2.19-svnr25243/libc/math/s_csinl.c
glibc-2.19-svnr25243-patched/libc/math/s_csinl.c
--- glibc-2.19-svnr25243/libc/math/s_csinl.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/s_csinl.c 2014-03-23
16:59:10.697686909 +0100
@@ -110,15 +110,19 @@
       __real__ retval = __nanl ("");
       __imag__ retval = __imag__ x;

+#ifdef FE_INVALID
       if (rcls == FP_INFINITE)
  feraiseexcept (FE_INVALID);
+#endif
     }
   else
     {
       __real__ retval = __nanl ("");
       __imag__ retval = __nanl ("");

+#ifdef FE_INVALID
       feraiseexcept (FE_INVALID);
+#endif
     }
  }
     }
diff -aburN glibc-2.19-svnr25243/libc/math/s_ctan.c
glibc-2.19-svnr25243-patched/libc/math/s_ctan.c
--- glibc-2.19-svnr25243/libc/math/s_ctan.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/s_ctan.c 2014-03-23
16:59:10.757686907 +0100
@@ -44,8 +44,10 @@
   __real__ res = __nan ("");
   __imag__ res = __nan ("");

+#ifdef FE_INVALID
   if (__isinf_ns (__real__ x))
     feraiseexcept (FE_INVALID);
+#endif
  }
     }
   else
diff -aburN glibc-2.19-svnr25243/libc/math/s_ctanf.c
glibc-2.19-svnr25243-patched/libc/math/s_ctanf.c
--- glibc-2.19-svnr25243/libc/math/s_ctanf.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/s_ctanf.c 2014-03-23
16:59:10.689686910 +0100
@@ -44,8 +44,10 @@
   __real__ res = __nanf ("");
   __imag__ res = __nanf ("");

+#ifdef FE_INVALID
   if (__isinf_nsf (__real__ x))
     feraiseexcept (FE_INVALID);
+#endif
  }
     }
   else
diff -aburN glibc-2.19-svnr25243/libc/math/s_ctanh.c
glibc-2.19-svnr25243-patched/libc/math/s_ctanh.c
--- glibc-2.19-svnr25243/libc/math/s_ctanh.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/s_ctanh.c 2014-03-23
16:59:10.689686910 +0100
@@ -44,8 +44,10 @@
   __real__ res = __nan ("");
   __imag__ res = __nan ("");

+#ifdef FE_INVALID
   if (__isinf_ns (__imag__ x))
     feraiseexcept (FE_INVALID);
+#endif
  }
     }
   else
diff -aburN glibc-2.19-svnr25243/libc/math/s_ctanhf.c
glibc-2.19-svnr25243-patched/libc/math/s_ctanhf.c
--- glibc-2.19-svnr25243/libc/math/s_ctanhf.c 2014-01-03
18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/s_ctanhf.c 2014-03-23
16:59:10.689686910 +0100
@@ -44,8 +44,10 @@
   __real__ res = __nanf ("");
   __imag__ res = __nanf ("");

+#ifdef FE_INVALID
   if (__isinf_nsf (__imag__ x))
     feraiseexcept (FE_INVALID);
+#endif
  }
     }
   else
diff -aburN glibc-2.19-svnr25243/libc/math/s_ctanhl.c
glibc-2.19-svnr25243-patched/libc/math/s_ctanhl.c
--- glibc-2.19-svnr25243/libc/math/s_ctanhl.c 2014-01-03
18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/s_ctanhl.c 2014-03-23
16:59:10.697686909 +0100
@@ -44,8 +44,10 @@
   __real__ res = __nanl ("");
   __imag__ res = __nanl ("");

+#ifdef FE_INVALID
   if (__isinf_nsl (__imag__ x))
     feraiseexcept (FE_INVALID);
+#endif
  }
     }
   else
diff -aburN glibc-2.19-svnr25243/libc/math/s_ctanl.c
glibc-2.19-svnr25243-patched/libc/math/s_ctanl.c
--- glibc-2.19-svnr25243/libc/math/s_ctanl.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/s_ctanl.c 2014-03-23
16:59:10.693686909 +0100
@@ -44,8 +44,10 @@
   __real__ res = __nanl ("");
   __imag__ res = __nanl ("");

+#ifdef FE_INVALID
   if (__isinf_nsl (__real__ x))
     feraiseexcept (FE_INVALID);
+#endif
  }
     }
   else
diff -aburN glibc-2.19-svnr25243/libc/math/w_acos.c
glibc-2.19-svnr25243-patched/libc/math/w_acos.c
--- glibc-2.19-svnr25243/libc/math/w_acos.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_acos.c 2014-03-23
16:59:10.689686910 +0100
@@ -29,7 +29,9 @@
       && _LIB_VERSION != _IEEE_)
     {
       /* acos(|x|>1) */
+#ifdef FE_INVALID
       feraiseexcept (FE_INVALID);
+#endif
       return __kernel_standard (x, x, 1);
     }

diff -aburN glibc-2.19-svnr25243/libc/math/w_acosf.c
glibc-2.19-svnr25243-patched/libc/math/w_acosf.c
--- glibc-2.19-svnr25243/libc/math/w_acosf.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_acosf.c 2014-03-23
16:59:10.689686910 +0100
@@ -29,7 +29,9 @@
       && _LIB_VERSION != _IEEE_)
     {
       /* acos(|x|>1) */
+#ifdef FE_INVALID
       feraiseexcept (FE_INVALID);
+#endif
       return __kernel_standard_f (x, x, 101);
     }

diff -aburN glibc-2.19-svnr25243/libc/math/w_asin.c
glibc-2.19-svnr25243-patched/libc/math/w_asin.c
--- glibc-2.19-svnr25243/libc/math/w_asin.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_asin.c 2014-03-23
16:59:10.753686907 +0100
@@ -29,7 +29,9 @@
       && _LIB_VERSION != _IEEE_)
     {
       /* asin(|x|>1) */
+#ifdef FE_INVALID
       feraiseexcept (FE_INVALID);
+#endif
       return __kernel_standard (x, x, 2);
     }

diff -aburN glibc-2.19-svnr25243/libc/math/w_asinf.c
glibc-2.19-svnr25243-patched/libc/math/w_asinf.c
--- glibc-2.19-svnr25243/libc/math/w_asinf.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_asinf.c 2014-03-23
16:59:10.701686909 +0100
@@ -29,7 +29,9 @@
       && _LIB_VERSION != _IEEE_)
     {
       /* asin(|x|>1) */
+#ifdef FE_INVALID
       feraiseexcept (FE_INVALID);
+#endif
       return __kernel_standard_f (x, x, 102);
     }

diff -aburN glibc-2.19-svnr25243/libc/math/w_ilogb.c
glibc-2.19-svnr25243-patched/libc/math/w_ilogb.c
--- glibc-2.19-svnr25243/libc/math/w_ilogb.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_ilogb.c 2014-03-23
16:59:10.757686907 +0100
@@ -31,7 +31,9 @@
       || __builtin_expect (r == INT_MAX, 0))
     {
       __set_errno (EDOM);
+#ifdef FE_INVALID
       feraiseexcept (FE_INVALID);
+#endif
     }
   return r;
 }
diff -aburN glibc-2.19-svnr25243/libc/math/w_ilogbf.c
glibc-2.19-svnr25243-patched/libc/math/w_ilogbf.c
--- glibc-2.19-svnr25243/libc/math/w_ilogbf.c 2014-01-03
18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_ilogbf.c 2014-03-23
16:59:10.693686909 +0100
@@ -31,7 +31,9 @@
       || __builtin_expect (r == INT_MAX, 0))
     {
       __set_errno (EDOM);
+#ifdef FE_INVALID
       feraiseexcept (FE_INVALID);
+#endif
     }
   return r;
 }
diff -aburN glibc-2.19-svnr25243/libc/math/w_j0.c
glibc-2.19-svnr25243-patched/libc/math/w_j0.c
--- glibc-2.19-svnr25243/libc/math/w_j0.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_j0.c 2014-03-23
16:59:10.693686909 +0100
@@ -47,13 +47,17 @@
       if (x < 0.0)
  {
   /* d = zero/(x-x) */
+#ifdef FE_INVALID
   feraiseexcept (FE_INVALID);
+#endif
   return __kernel_standard (x, x, 9);
  }
       else if (x == 0.0)
  {
   /* d = -one/(x-x) */
+#ifdef FE_DIVBYZERO
   feraiseexcept (FE_DIVBYZERO);
+#endif
   return __kernel_standard (x, x, 8);
  }
       else if (_LIB_VERSION != _POSIX_)
diff -aburN glibc-2.19-svnr25243/libc/math/w_j0f.c
glibc-2.19-svnr25243-patched/libc/math/w_j0f.c
--- glibc-2.19-svnr25243/libc/math/w_j0f.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_j0f.c 2014-03-23
16:59:10.689686910 +0100
@@ -45,13 +45,17 @@
       if (x < 0.0f)
  {
   /* d = zero/(x-x) */
+#ifdef FE_INVALID
   feraiseexcept (FE_INVALID);
+#endif
   return __kernel_standard_f (x, x, 109);
  }
       else if (x == 0.0f)
  {
   /* d = -one/(x-x) */
+#ifdef FE_DIVBYZERO
   feraiseexcept (FE_DIVBYZERO);
+#endif
   return __kernel_standard_f (x, x, 108);
  }
       else if (_LIB_VERSION != _POSIX_)
diff -aburN glibc-2.19-svnr25243/libc/math/w_j0l.c
glibc-2.19-svnr25243-patched/libc/math/w_j0l.c
--- glibc-2.19-svnr25243/libc/math/w_j0l.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_j0l.c 2014-03-23
16:59:10.757686907 +0100
@@ -45,7 +45,9 @@
       if (x < 0.0L)
  {
   /* d = zero/(x-x) */
+#ifdef FE_INVALID
   feraiseexcept (FE_INVALID);
+#endif
   return __kernel_standard_l (x, x, 209);
  }
       else if (x == 0.0L)
diff -aburN glibc-2.19-svnr25243/libc/math/w_j1.c
glibc-2.19-svnr25243-patched/libc/math/w_j1.c
--- glibc-2.19-svnr25243/libc/math/w_j1.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_j1.c 2014-03-23
16:59:10.753686907 +0100
@@ -47,13 +47,17 @@
       if (x < 0.0)
  {
   /* d = zero/(x-x) */
+#ifdef FE_INVALID
   feraiseexcept (FE_INVALID);
+#endif
   return __kernel_standard (x, x, 11);
  }
       else if (x == 0.0)
  {
   /* d = -one/(x-x) */
+#ifdef FE_DIVBYZERO
   feraiseexcept (FE_DIVBYZERO);
+#endif
   return __kernel_standard (x, x, 10);
  }
       else if (_LIB_VERSION != _POSIX_)
diff -aburN glibc-2.19-svnr25243/libc/math/w_j1f.c
glibc-2.19-svnr25243-patched/libc/math/w_j1f.c
--- glibc-2.19-svnr25243/libc/math/w_j1f.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_j1f.c 2014-03-23
16:59:10.689686910 +0100
@@ -45,13 +45,17 @@
       if (x < 0.0f)
  {
   /* d = zero/(x-x) */
+#ifdef FE_INVALID
   feraiseexcept (FE_INVALID);
+#endif
   return __kernel_standard_f (x, x, 111);
  }
       else if (x == 0.0f)
  {
   /* d = -one/(x-x) */
+#ifdef FE_DIVBYZERO
   feraiseexcept (FE_DIVBYZERO);
+#endif
   return __kernel_standard_f (x, x, 110);
  }
       else if (_LIB_VERSION != _POSIX_)
diff -aburN glibc-2.19-svnr25243/libc/math/w_j1l.c
glibc-2.19-svnr25243-patched/libc/math/w_j1l.c
--- glibc-2.19-svnr25243/libc/math/w_j1l.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_j1l.c 2014-03-23
16:59:10.697686909 +0100
@@ -45,7 +45,9 @@
       if (x < 0.0L)
  {
   /* d = zero/(x-x) */
+#ifdef FE_INVALID
   feraiseexcept (FE_INVALID);
+#endif
   return __kernel_standard_l (x, x, 211);
  }
       else if (x == 0.0L)
diff -aburN glibc-2.19-svnr25243/libc/math/w_jn.c
glibc-2.19-svnr25243-patched/libc/math/w_jn.c
--- glibc-2.19-svnr25243/libc/math/w_jn.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_jn.c 2014-03-23
16:59:10.697686909 +0100
@@ -47,13 +47,17 @@
       if (x < 0.0)
  {
   /* d = zero/(x-x) */
+#ifdef FE_INVALID
   feraiseexcept (FE_INVALID);
+#endif
   return __kernel_standard (n, x, 13);
  }
       else if (x == 0.0)
  {
   /* d = -one/(x-x) */
+#ifdef FE_DIVBYZERO
   feraiseexcept (FE_DIVBYZERO);
+#endif
   return __kernel_standard (n, x, 12);
  }
       else if (_LIB_VERSION != _POSIX_)
diff -aburN glibc-2.19-svnr25243/libc/math/w_jnf.c
glibc-2.19-svnr25243-patched/libc/math/w_jnf.c
--- glibc-2.19-svnr25243/libc/math/w_jnf.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_jnf.c 2014-03-23
16:59:10.757686907 +0100
@@ -45,13 +45,17 @@
       if (x < 0.0f)
  {
   /* d = zero/(x-x) */
+#ifdef FE_INVALID
   feraiseexcept (FE_INVALID);
+#endif
   return __kernel_standard_f (n, x, 113);
  }
       else if (x == 0.0)
  {
   /* d = -one/(x-x) */
+#ifdef FE_DIVBYZERO
   feraiseexcept (FE_DIVBYZERO);
+#endif
   return __kernel_standard_f (n, x, 112);
  }
       else if (_LIB_VERSION != _POSIX_)
diff -aburN glibc-2.19-svnr25243/libc/math/w_log10.c
glibc-2.19-svnr25243-patched/libc/math/w_log10.c
--- glibc-2.19-svnr25243/libc/math/w_log10.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_log10.c 2014-03-23
16:59:10.689686910 +0100
@@ -29,12 +29,16 @@
     {
       if (x == 0.0)
  {
+#ifdef FE_DIVBYZERO
   feraiseexcept (FE_DIVBYZERO);
+#endif
   return __kernel_standard (x, x, 18); /* log10(0) */
  }
       else
  {
+#ifdef FE_INVALID
   feraiseexcept (FE_INVALID);
+#endif
   return __kernel_standard (x, x, 19); /* log10(x<0) */
  }
     }
diff -aburN glibc-2.19-svnr25243/libc/math/w_log10f.c
glibc-2.19-svnr25243-patched/libc/math/w_log10f.c
--- glibc-2.19-svnr25243/libc/math/w_log10f.c 2014-01-03
18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_log10f.c 2014-03-23
16:59:10.689686910 +0100
@@ -29,12 +29,16 @@
     {
       if (x == 0.0f)
  {
+#ifdef FE_DIVBYZERO
   feraiseexcept (FE_DIVBYZERO);
+#endif
   return __kernel_standard_f (x, x, 118); /* log10(0) */
  }
       else
  {
+#ifdef FE_INVALID
   feraiseexcept (FE_INVALID);
+#endif
   return __kernel_standard_f (x, x, 119); /* log10(x<0) */
  }
     }
diff -aburN glibc-2.19-svnr25243/libc/math/w_log10l.c
glibc-2.19-svnr25243-patched/libc/math/w_log10l.c
--- glibc-2.19-svnr25243/libc/math/w_log10l.c 2014-01-03
18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_log10l.c 2014-03-23
16:59:10.697686909 +0100
@@ -29,12 +29,16 @@
     {
       if (x == 0.0L)
  {
+#ifdef FE_DIVBYZERO
   feraiseexcept (FE_DIVBYZERO);
+#endif
   return __kernel_standard_l (x, x, 218); /* log10(0) */
  }
       else
  {
+#ifdef FE_INVALID
   feraiseexcept (FE_INVALID);
+#endif
   return __kernel_standard_l (x, x, 219); /* log10(x<0) */
  }
     }
diff -aburN glibc-2.19-svnr25243/libc/math/w_log2.c
glibc-2.19-svnr25243-patched/libc/math/w_log2.c
--- glibc-2.19-svnr25243/libc/math/w_log2.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_log2.c 2014-03-23
16:59:10.757686907 +0100
@@ -29,12 +29,16 @@
     {
       if (x == 0.0)
  {
+#ifdef FE_DIVBYZERO
   feraiseexcept (FE_DIVBYZERO);
+#endif
   return __kernel_standard (x, x, 48); /* log2(0) */
  }
       else
  {
+#ifdef FE_INVALID
   feraiseexcept (FE_INVALID);
+#endif
   return __kernel_standard (x, x, 49); /* log2(x<0) */
  }
     }
diff -aburN glibc-2.19-svnr25243/libc/math/w_log2f.c
glibc-2.19-svnr25243-patched/libc/math/w_log2f.c
--- glibc-2.19-svnr25243/libc/math/w_log2f.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_log2f.c 2014-03-23
16:59:10.749686907 +0100
@@ -29,12 +29,16 @@
     {
       if (x == 0.0)
  {
+#ifdef FE_DIVBYZERO
   feraiseexcept (FE_DIVBYZERO);
+#endif
   return __kernel_standard_f (x, x, 148); /* log2(0) */
  }
       else
  {
+#ifdef FE_INVALID
   feraiseexcept (FE_INVALID);
+#endif
   return __kernel_standard_f (x, x, 149); /* log2(x<0) */
  }
     }
diff -aburN glibc-2.19-svnr25243/libc/math/w_log2l.c
glibc-2.19-svnr25243-patched/libc/math/w_log2l.c
--- glibc-2.19-svnr25243/libc/math/w_log2l.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_log2l.c 2014-03-23
16:59:10.693686909 +0100
@@ -29,12 +29,16 @@
     {
       if (x == 0.0L)
  {
+#ifdef FE_DIVBYZERO
   feraiseexcept (FE_DIVBYZERO);
+#endif
   return __kernel_standard_l (x, x, 248); /* log2(0) */
  }
       else
  {
+#ifdef FE_INVALID
   feraiseexcept (FE_INVALID);
+#endif
   return __kernel_standard_l (x, x, 249); /* log2(x<0) */
  }
     }
diff -aburN glibc-2.19-svnr25243/libc/math/w_log.c
glibc-2.19-svnr25243-patched/libc/math/w_log.c
--- glibc-2.19-svnr25243/libc/math/w_log.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_log.c 2014-03-23
16:59:10.693686909 +0100
@@ -29,12 +29,16 @@
     {
       if (x == 0.0)
  {
+#ifdef FE_DIVBYZERO
   feraiseexcept (FE_DIVBYZERO);
+#endif
   return __kernel_standard (x, x, 16); /* log(0) */
  }
       else
  {
+#ifdef FE_INVALID
   feraiseexcept (FE_INVALID);
+#endif
   return __kernel_standard (x, x, 17); /* log(x<0) */
  }
     }
diff -aburN glibc-2.19-svnr25243/libc/math/w_logf.c
glibc-2.19-svnr25243-patched/libc/math/w_logf.c
--- glibc-2.19-svnr25243/libc/math/w_logf.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_logf.c 2014-03-23
16:59:10.757686907 +0100
@@ -29,12 +29,16 @@
     {
       if (x == 0.0f)
  {
+#ifdef FE_DIVBYZERO
   feraiseexcept (FE_DIVBYZERO);
+#endif
   return __kernel_standard_f (x, x, 116); /* log(0) */
  }
       else
  {
+#ifdef FE_INVALID
   feraiseexcept (FE_INVALID);
+#endif
   return __kernel_standard_f (x, x, 117); /* log(x<0) */
  }
     }
diff -aburN glibc-2.19-svnr25243/libc/math/w_logl.c
glibc-2.19-svnr25243-patched/libc/math/w_logl.c
--- glibc-2.19-svnr25243/libc/math/w_logl.c 2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/math/w_logl.c 2014-03-23
16:59:10.697686909 +0100
@@ -29,12 +29,16 @@
     {
       if (x == 0.0L)
  {
+#ifdef FE_DIVBYZERO
   feraiseexcept (FE_DIVBYZERO);
+#endif
   return __kernel_standard_l (x, x, 216); /* log(0) */
  }
       else
  {
+#ifdef FE_INVALID
   feraiseexcept (FE_INVALID);
+#endif
   return __kernel_standard_l (x, x, 217); /* log(x<0) */
  }
     }
diff -aburN glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/e_exp2.c
glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/e_exp2.c
--- glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/e_exp2.c
2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/e_exp2.c
2014-03-23 16:59:09.893686943 +0100
@@ -62,7 +62,9 @@
       union ieee754_double ex2_u, scale_u;

       {
+#ifdef FE_TONEAREST
  SET_RESTORE_ROUND_NOEX (FE_TONEAREST);
+#endif

  /* 1. Argument reduction.
    Choose integers ex, -256 <= t < 256, and some real
diff -aburN glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/e_exp.c
glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/e_exp.c
--- glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/e_exp.c
2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/e_exp.c
2014-03-23 16:59:09.893686943 +0100
@@ -58,7 +58,9 @@
   int4 i, j, m, n, ex;
   double retval;

+#ifdef FE_TONEAREST
   SET_RESTORE_ROUND (FE_TONEAREST);
+#endif

   junk1.x = x;
   m = junk1.i[HIGH_HALF];
diff -aburN glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/e_pow.c
glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/e_pow.c
--- glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/e_pow.c
2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/e_pow.c
2014-03-23 16:59:09.889686943 +0100
@@ -91,7 +91,9 @@
     { /* if y<-1 or y>1   */
       double retval;

+#ifdef FE_TONEAREST
       SET_RESTORE_ROUND (FE_TONEAREST);
+#endif

       /* Avoid internal underflow for tiny y.  The exact value of y does
          not matter if |y| <= 2**-64.  */
diff -aburN glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/e_remainder.c
glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/e_remainder.c
--- glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/e_remainder.c
2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/e_remainder.c
2014-03-23 16:59:09.893686943 +0100
@@ -53,7 +53,9 @@
   /*------ |x| < 2^1023  and   2^-970 < |y| < 2^1024 ------------------*/
   if (kx < 0x7fe00000 && ky < 0x7ff00000 && ky >= 0x03500000)
     {
+#ifdef FE_TONEAREST
       SET_RESTORE_ROUND_NOEX (FE_TONEAREST);
+#endif
       if (kx + 0x00100000 < ky)
  return x;
       if ((kx - 0x01500000) < ky)
diff -aburN glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/e_sqrt.c
glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/e_sqrt.c
--- glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/e_sqrt.c
2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/e_sqrt.c
2014-03-23 16:59:09.885686943 +0100
@@ -68,7 +68,9 @@
     {
       int rm = fegetround ();
       fenv_t env;
+#ifdef FE_TONEAREST
       libc_feholdexcept_setround (&env, FE_TONEAREST);
+#endif
       double ret;
       y = 1.0 - t * (t * s);
       t = t * (rt0 + y * (rt1 + y * (rt2 + y * rt3)));
diff -aburN glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/gamma_product.c
glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/gamma_product.c
--- glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/gamma_product.c
2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/gamma_product.c
2014-03-23 16:59:09.885686943 +0100
@@ -61,7 +61,9 @@
 double
 __gamma_product (double x, double x_eps, int n, double *eps)
 {
+#ifdef FE_TONEAREST
   SET_RESTORE_ROUND (FE_TONEAREST);
+#endif
   double ret = x;
   *eps = x_eps / x;
   for (int i = 1; i < n; i++)
diff -aburN glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/s_fma.c
glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/s_fma.c
--- glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/s_fma.c
2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/s_fma.c
2014-03-23 16:59:09.885686943 +0100
@@ -178,7 +178,9 @@
     return x * y + z;

   fenv_t env;
+#ifdef FE_TONEAREST
   libc_feholdexcept_setround (&env, FE_TONEAREST);
+#endif

   /* Multiplication m1 + m2 = x * y using Dekker's algorithm.  */
 #define C ((1 << (DBL_MANT_DIG + 1) / 2) + 1)
@@ -198,7 +200,9 @@
   t1 = m1 - t1;
   t2 = z - t2;
   double a2 = t1 + t2;
+#ifdef FE_INEXACT
   feclearexcept (FE_INEXACT);
+#endif

   /* If the result is an exact zero, ensure it has the correct
      sign.  */
@@ -211,22 +215,29 @@
       return z + m1;
     }

+#ifdef FE_TOWARDZERO
   libc_fesetround (FE_TOWARDZERO);
+#endif

   /* Perform m2 + a2 addition with round to odd.  */
   u.d = a2 + m2;

   if (__builtin_expect (adjust < 0, 0))
     {
+#ifdef FE_INEXACT
       if ((u.ieee.mantissa1 & 1) == 0)
  u.ieee.mantissa1 |= libc_fetestexcept (FE_INEXACT) != 0;
+#endif
       v.d = a1 + u.d;
       /* Ensure the addition is not scheduled after fetestexcept call.  */
       math_force_eval (v.d);
     }

   /* Reset rounding mode and test for inexact simultaneously.  */
-  int j = libc_feupdateenv_test (&env, FE_INEXACT) != 0;
+  int j = 0;
+#ifdef FE_INEXACT
+  j = libc_feupdateenv_test (&env, FE_INEXACT) != 0;
+#endif

   if (__builtin_expect (adjust == 0, 1))
     {
diff -aburN glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/s_fmaf.c
glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/s_fmaf.c
--- glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/s_fmaf.c
2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/s_fmaf.c
2014-03-23 16:59:09.893686943 +0100
@@ -43,7 +43,9 @@

   union ieee754_double u;

+#ifdef FE_TOWARDZERO
   libc_feholdexcept_setround (&env, FE_TOWARDZERO);
+#endif

   /* Perform addition with round to odd.  */
   u.d = temp + (double) z;
@@ -51,7 +53,10 @@
   math_force_eval (u.d);

   /* Reset rounding mode and test for inexact simultaneously.  */
-  int j = libc_feupdateenv_test (&env, FE_INEXACT) != 0;
+  int j = 0;
+#ifdef FE_INEXACT
+  j = libc_feupdateenv_test (&env, FE_INEXACT) != 0;
+#endif

   if ((u.ieee.mantissa1 & 1) == 0 && u.ieee.exponent != 0x7ff)
     u.ieee.mantissa1 |= j;
diff -aburN glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/s_sin.c
glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/s_sin.c
--- glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/s_sin.c
2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/s_sin.c
2014-03-23 16:59:09.885686943 +0100
@@ -288,7 +288,9 @@
   int4 k, m, n;
   double retval = 0;

+#ifdef FE_TONEAREST
   SET_RESTORE_ROUND_53BIT (FE_TONEAREST);
+#endif

   u.x = x;
   m = u.i[HIGH_HALF];
@@ -516,7 +518,9 @@

   double retval = 0;

+#ifdef FE_TONEAREST
   SET_RESTORE_ROUND_53BIT (FE_TONEAREST);
+#endif

   u.x = x;
   m = u.i[HIGH_HALF];
diff -aburN glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/s_tan.c
glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/s_tan.c
--- glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/s_tan.c
2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/s_tan.c
2014-03-23 16:59:09.893686943 +0100
@@ -73,7 +73,9 @@
   int __branred (double, double *, double *);
   int __mpranred (double, mp_no *, int);

+#ifdef FE_TONEAREST
   SET_RESTORE_ROUND_53BIT (FE_TONEAREST);
+#endif

   /* x=+-INF, x=NaN */
   num.d = x;
diff -aburN glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/x2y2m1.c
glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/x2y2m1.c
--- glibc-2.19-svnr25243/libc/sysdeps/ieee754/dbl-64/x2y2m1.c
2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/dbl-64/x2y2m1.c
2014-03-23 16:59:09.885686943 +0100
@@ -87,7 +87,9 @@
 __x2y2m1 (double x, double y)
 {
   double vals[4];
+#ifdef FE_TONEAREST
   SET_RESTORE_ROUND (FE_TONEAREST);
+#endif
   mul_split (&vals[1], &vals[0], x, x);
   mul_split (&vals[3], &vals[2], y, y);
   if (x >= 0.75)
diff -aburN glibc-2.19-svnr25243/libc/sysdeps/ieee754/flt-32/e_exp2f.c
glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/flt-32/e_exp2f.c
--- glibc-2.19-svnr25243/libc/sysdeps/ieee754/flt-32/e_exp2f.c
2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/flt-32/e_exp2f.c
2014-03-23 16:59:09.901686943 +0100
@@ -55,7 +55,9 @@
       union ieee754_float ex2_u, scale_u;

       {
+#ifdef FE_TONEAREST
  SET_RESTORE_ROUND_NOEXF (FE_TONEAREST);
+#endif

  /* 1. Argument reduction.
    Choose integers ex, -128 <= t < 128, and some real
diff -aburN glibc-2.19-svnr25243/libc/sysdeps/ieee754/flt-32/e_expf.c
glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/flt-32/e_expf.c
--- glibc-2.19-svnr25243/libc/sysdeps/ieee754/flt-32/e_expf.c
2014-01-03 18:51:28.000000000 +0100
+++ glibc-2.19-svnr25243-patched/libc/sysdeps/ieee754/flt-32/e_expf.c
2014-03-23 16:59:09.905686942 +0100
@@ -82,7 +82,9 @@
       union ieee754_double ex2_u;

       {
+#ifdef FE_TONEAREST
  SET_RESTORE_ROUND_NOEXF (FE_TONEAREST);
+#endif

  /* Calculate n.  */
  n = x * M_1_LN2 + THREEp22;
 ==================================

2014-03-23 9:56 GMT+01:00 Gilles DOFFE <gdoffe+linux@gmail.com>:
> Hello,
>
> I'm trying to build eglibc 2.19-svnr25243 for a Coldfire MCF54418 (has
> no fpu and but has a MMU) with buildroot.
>
> The configuration is this one : (extract from config.log) :
> =================
> /home/user/buildroot/output/build/glibc-2.19-svnr25243/libc/configure
> ac_cv_path_BASH_SHELL=/bin/bash libc_cv_forced_unwind=yes
> --target=m68k-buildroot-linux-gnu --host=m68k-buildroot-linux-gnu
> --build=x86_64-unknown-linux-gnu --prefix=/usr --enable-shared
> --without-fp --with-pkgversion=Buildroot --without-cvs
> --disable-profile --without-gd --enable-obsolete-rpc
> --with-headers=/home/user/buildroot/output/host/usr/m68k-buildroot-linux-gnu/sysroot/usr/include
> =================
>
> But I always get this kind of errors :
> =================
> In file included from ../sysdeps/ieee754/flt-32/math_private.h:3:0,
>                  from ../sysdeps/ieee754/dbl-64/e_exp.c:40:
> ../sysdeps/ieee754/dbl-64/e_exp.c: In function '__ieee754_exp':
> ../sysdeps/ieee754/dbl-64/e_exp.c:61:22: error: 'FE_TONEAREST'
> undeclared (first use in this function)
>    SET_RESTORE_ROUND (FE_TONEAREST);
>                       ^
> ../sysdeps/generic/math_private.h:584:32: note: in definition of macro
> 'SET_RESTORE_ROUND_GENERIC'
>    ROUNDFUNC (&__libc_save_rm, (RM))
>                                 ^
> ../sysdeps/ieee754/dbl-64/e_exp.c:61:3: note: in expansion of macro
> 'SET_RESTORE_ROUND'
>    SET_RESTORE_ROUND (FE_TONEAREST);
>    ^
> ../sysdeps/ieee754/dbl-64/e_exp.c:61:22: note: each undeclared
> identifier is reported only once for each function it appears in
>    SET_RESTORE_ROUND (FE_TONEAREST);
>                       ^
> ../sysdeps/generic/math_private.h:584:32: note: in definition of macro
> 'SET_RESTORE_ROUND_GENERIC'
>    ROUNDFUNC (&__libc_save_rm, (RM))
>                                 ^
> ../sysdeps/ieee754/dbl-64/e_exp.c:61:3: note: in expansion of macro
> 'SET_RESTORE_ROUND'
>    SET_RESTORE_ROUND (FE_TONEAREST);
> =================
>
> I always get this errors even if I use -msoft-float in CFLAGS and CXXFLAGS.
> Did I miss an option somewhere ?
>
> Since I specified --without-fp in my configure options, should FE_*
> macros not be disabled with some #ifdef ?
>
> Thanks in advance for your help,
> Gilles


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]