John Klos | 24 Mar 19:45 2010

Darned VAX NaNs...

devel/m4 on NetBSD-5/VAX:

...
  CC  isnanf.o
In file included from isnanf.c:20:
isnan.c: In function 'rpl_isnanf':
isnan.c:120: error: initializer element is not constant
isnan.c:120: error: (near initialization for 'nan.value')
isnan.c:121: error: initializer element is not constant
isnan.c:122: error: initializer element is not constant
*** Error code 1
...

It seems that the code is trying to define these things the nonportable 
way:

   static memory_double nan = { L_(0.0) / L_(0.0) };
   static DOUBLE plus_inf = L_(1.0) / L_(0.0);
   static DOUBLE minus_inf = -L_(1.0) / L_(0.0);

How do we fix this?

John

Martin Husemann | 24 Mar 20:10 2010
Picon

Re: Darned VAX NaNs...

On Wed, Mar 24, 2010 at 06:45:16PM +0000, John Klos wrote:
> It seems that the code is trying to define these things the nonportable 
> way:

In case it isn't clear: NAN and +/- infinity only make sense if you are
using IEEE754 floating point format - which vax just does not do.

Ifdef out all code referencing those statics, the code paths will never
be used on vax. See src/gnu/dist/gcc4/gcc/libgcc2.c for examples
(especially the define for INFINITY and ifdefs using it).

Martin

John Klos | 24 Mar 20:31 2010

Re: Darned VAX NaNs...

> Ifdef out all code referencing those statics, the code paths will never
> be used on vax. See src/gnu/dist/gcc4/gcc/libgcc2.c for examples
> (especially the define for INFINITY and ifdefs using it).

The assignments above the broken ones should work then:

   static DOUBLE zero = L_(0.0);
   memory_double nan;
   DOUBLE plus_inf = L_(1.0) / L_(0.0);
   DOUBLE minus_inf = -L_(1.0) / L_(0.0);
   nan.value = zero / zero;

Any problems with just making the package compile happily by using these?

John

John Klos | 26 Mar 08:04 2010

Binary packages on their way

Hi, all,

If you're running NetBSD-5 (or newer) and would like to use binary 
packages, my bulk build machine has FINALLY gotten through the beginning 
stages of a bulk package build and is building packages in earnest. New 
packages are uploaded daily (or nightly depending on where you are). 
Granted, there are only 46 so far, but it's a start.

You'll see the packages grow here:

ftp://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/vax/5.0/

Enjoy!

John


Gmane