Subject: re: Optimizer bug in NetBSD/SPARC64 1.5?
To: None <port-sparc@netbsd.org>
From: matthew green <mrg@eterna.com.au>
List: port-sparc
Date: 02/16/2001 19:31:08
   
   The NMH "scan" program just reads the headers of each mail message in an NMH
   folder.  So all the first column numbers should have been consecutively
   numbered file names.  But instead of "1", etc. it was coming up with "?4128"
   which to me shows some kind of massive overflow problem with "-O2" in that
   particular instance.

hmm.  "scan" works for me.  dunno what is up here.
   
   How did an entire OS and kernel get built successfully if it's in this kind of
   state?  'Cos other than some random programs (like "xntpd") that crash, most
   everything else seems to work OK so far ... (I'm glad for that!  hehe)

the kernel actually exercises not a whole lot of the compiler.  the OS builds
because we've hacked around the lossages that have been noticed so far.  we
expect more :-)
   
   Arggh.  Well, I wouldn't mind so much, if I could find workarounds.  I got
   "perl5-base" to compile, finally, by changing "-g -msoft-quad-float -O2 ... "
   in "patch-ag" to simply "-O -msoft-quad-float ...", for example.  (Not sure
   that it *works*, mind you, but at least it builds, which is a start.  (-: )

hmm. martin commited some stuff to the perl5 package that should make it
work (some -DBIG_SPARC64_HACK thing will be present if you've got it)..
see pkgsrc-current.
   
   But I'm starting to run into thornier stuff.  For example, "sudo" needs
   autoconf-2.31 and m4-1.4.  When it runs "autoconf" to create "configure",
   these huge bogus line numbers get generated into "configure", and it barfs
   on itself when it runs.  I traced this back to "awk" (I think), and here's
   a simple demonstration:


"awk" is known broken with -O2.  the fix for this was unfortunately left out
of the 1.5 tree (i forgot to sent a pull up)... i think there is a patch
(binary) available on the ftp server, even, for this.  rebuild it with
-msoft-quad-float and it works for me.  the problem occurs because awk appears
to use `double' internally for all numbers...


.mrg.