On Tue, Dec 16, 2008 at 01:57:35PM +0100, Dr. Werner Fink wrote:
> On Tue, Dec 16, 2008 at 01:36:56PM +0100, Roland Mainz wrote:
> > "Dr. Werner Fink" wrote:
> > > On Tue, Dec 16, 2008 at 11:22:49AM +0100, I. Szczesniak wrote:
> > > > On 12/16/08, Dr. Werner Fink <[email protected]> wrote:
> > [snip]
> > > > > test io.sh failed at 2008-12-15+10:37:40 with exit code 1 [ 70
> > > > > tests 1 signal ]
> > > > >
> > > > > On IA64:
> > > > >
> > > > > test arith.sh begins at 2008-12-15+10:42:55
> > > > > arith.sh[452]: printf '%g\n' $((-Nan)) failed -- expected
> > > > > -nan, got nan
> > > > > arith.sh[454]: printf '%g\n' -Nan failed -- expected -nan,
> > > > > got nan
> > > > > arith.sh[456]: print -- $((-Nan)) failed -- expected -nan,
> > > > > got nan
> > > > > test arith.sh failed at 2008-12-15+10:42:55 with exit code 3 [ 127
> > > > > tests 3 errors ]
> > > >
> > > > Did you disable IEEE754 math support? Negative nan is defined in
> > > > IEEE754-1985 and mandatory required in IEEE 754-2008.
> > >
> > > I use the same spec file for all architectures. I'm not aware on
> > > any switch which would enable or disable any math support. it is
> > > simply the defaults of the gcc and the defaults of the build for
> > > the distribution which includes specific architecture switches
> > > but nothing influence math support.
> >
> > Please use gcc in C99 mode, e.g.
> > $ CC="gcc -std=gnu99 -fPIC" ./bin/package make CC="gcc -std=gnu99 -fPIC"
> > #. Note this must be set in the CC variable and _not_ in CCFLAGS.
> >
> > This is the same what we do for the official ksh93 in Solaris (e.g.
> > force the compiler to operate in C99-conformant mode), otherwise ksh93
> > misses some C99 math functions... ;-(
>
> Does not make any difference ;(
The attached patch makes a difference ... it seems to be a problem
of the glibc in collaboration with the gcc. That is that at least
the inlined function __signbitl() from /usr/include/bits/mathinline.h
and used in the macro signbit() of /usr/include/math.h does not
work on ia64 ... whereas the gcc builtin for signbitl does.
Werner
--
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward Burr
--- src/lib/libast/sfio/sfcvt.c
+++ src/lib/libast/sfio/sfcvt.c 2008-12-17 11:56:17.000000000 +0000
@@ -56,6 +56,14 @@ static char *Zero = "0";
#define _lib_signbit 1
#endif
+#if defined(__ia64__) && defined(signbit)
+# if defined __GNUC__ && __GNUC__ >= 4
+# define __signbitl(f) __builtin_signbitl(f)
+# elif _lib_copysignl
+# define __signbitl(f) (int)(copysignl(1.0,(f))<0.0)
+# endif
+#endif
+
#if ! _lib_signbit
#if ! _ast_fltmax_double
static int neg0ld(Sfdouble_t f)
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers