Subject: Building a snapshot and awk
To: None <tech-toolchain@netbsd.org, port-sparc64@netbsd.org>
From: James Chacon <jchacon@genuity.net>
List: tech-toolchain
Date: 12/01/2001 22:17:09
Seems even after the liberal sprinkling of -msoft-quad-float one will still
have issues getting a working awk on sparc64.

The problem is awk does a lot of double -> int conversion internally and
those pass through libgcc routines to do the actual conversions. Some of
these promote to quad math first at which point we'll lose.

So I committed changes to libgcc's Makefile which also forces soft quad float
for sparc64 and added the following to UPDATING:

20011201:
        In order for a sparc64 build to work you must have a working awk. If
        you've built and installed a system with the new toolchain up to this
        point you do not have a working awk as it's abililty to do floating
        point is broken. 

        To build:

        remake and install gnu/lib/libgcc
        remake and install gnu/usr.bin/gawk into /usr/bin (make sure it links
        against the new libgcc.a)


The reason, is that build.sh does presume you've got a working native userland
and anyone building on sparc64 since the new toolchain conversion doesn't
(at least for anything doing double->int conversions like awk).

In any case this still really smells like bad emulation code somewhere for the
actual quad operations as the output'd assembly for these ops otherwise looks
fine. 

James