Subject: Re: borken state of quad/soft float on sparc64
To: James Chacon <>
From: Frederick Bruckman <>
List: tech-toolchain
Date: 02/04/2002 11:12:54
On Mon, 4 Feb 2002, James Chacon wrote:

> I can provide you stub routines for the _Qp* stuff today. Just anything which
> tries to call them with the current compiler will break (which is what I'm
> still working on).

> >cc -c  -DDEBUGGING -fno-strict-aliasing -I/usr/pkg/include -DDLOPEN_WONT_DO_RELA              TIVE_PATHS -O -pipe -g -msoft-quad-float -O2    -DVERSION=\"1.04\"  -DXS_VERSION              =\"1.04\"  -I../.. -DPERL_CORE -DLIBC="/usr/lib/" DynaLoader.c
> >rm -rf ../../lib/auto/DynaLoader/DynaLoader.a
> >/usr/bin/ar cr ../../lib/auto/DynaLoader/DynaLoader.a DynaLoader.o && : ../../li              b/auto/DynaLoader/DynaLoader.a
> >chmod 755 ../../lib/auto/DynaLoader/DynaLoader.a
> >LD_LIBRARY_PATH=/usr/pkgsrc/lang/perl5/work.sparc64/perl-5.6.1 cc -o perl -Wl,-R              /usr/pkg/lib  -L/usr/pkg/lib -Wl,-whole-archive -lgcc -Wl,-no-whole-archive                                   -Wl,-E -Wl,-R/usr/pkg/lib  -Wl,-R/usr/pkg/lib/perl5/5.6.1/sparc6              4-netbsd/CORE perlmain.o lib/auto/DynaLoader/DynaLoader.a  -L. -lperl `cat ext.l              ibs` -lm -lcrypt
> >/usr/lib/libgcc.a(_fixtfdi.o): In function `__fixtfdi':
> >_fixtfdi.o(.text+0x14): undefined reference to `_Qp_flt'
> >/usr/lib/libgcc.a(_fixunstfdi.o): In function `__fixunstfdi':
> >_fixunstfdi.o(.text+0x14): undefined reference to `_Qp_flt'

mac68k-new-toolchain has a similiar problem building "lint1", except
that the missing symbols are for extended double precision conversions,
rather than quad conversions (__fixunsxfdi, __floatdixf, __fixxfdi).
This breaks the tools build. Curiously enough, a 1.5.1/i386 hosted
build only calls on __fixunsxfdi, which it finds it in it's own libc
fine (though I sure don't see where it's coming from).

There's code already in libc/softfloat/softfloat.c for the last two
conversions, int64_to_floatx80() and
floatx80_to_int64_round_to_zero(), they're just not respected by