Subject: port-pmax/9453: compiler/assembler fails
To: None <gnats-bugs@gnats.netbsd.org>
From: None <mcmahill@mtl.mit.edu>
List: netbsd-bugs
Date: 02/20/2000 08:42:35
>Number:         9453
>Category:       port-pmax
>Synopsis:       compiler/assembler fails
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    port-pmax-maintainer (NetBSD/pmax Portmaster)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 20 08:42:00 2000
>Last-Modified:
>Originator:     mcmahill@mtl.mit.edu
>Organization:
none

>Release:        1.4.1<NetBSD-current source date>
>Environment:
	
System: NetBSD sy-borg 1.4.1 NetBSD 1.4.1 (SY-BORG) #1: Sun Oct 3 00:23:28 EDT 1999 dan@sy-borg:/amd/dinah-moe/export/src/sys/arch/pmax/compile/SY-BORG pmax


>Description:
certain c++ programs don't assemble when compiled with -O2.  The symptom is
the assembler just goes and goes and goes.  A program which compiles in
3 minutes on my Mac IIci (NetBSD-1.4.1) was still running the assembler 
after more than an hour on my DECstation 5000/200 (NetBSD-1.4.1) (note that
the pmax has 96 MB of RAM and 160 MB of swap compared to 32 MB RAM and
128 MB of swap on the Mac and both systems were relatively idle so its
not just a swap/ram difference).

When the assembler is churning away, its generating a CPU load of about 95%
so its doing something....

currently, top shows:
  PID USERNAME PRI NICE   SIZE   RES STATE   TIME   WCPU    CPU COMMAND
  12043 root      64    0  2396K 2888K run    80:10 96.39% 96.39% as

	
>How-To-Repeat:
download the pkgsrc/math/yacas package sources.  Should be rev 1.1.1.1 of
Makefile patches/patch-{aa,ab,ac,ad}.  Then
cd /usr/pkgsrc/math/yacas
rm patches/patch-ac
make makepatchsum
make

note that patch-ac removes the -O2 flag for the problem file which lets it
finish.

Another pkg on which pmax loses with the -O2 flag is pkgsrc/cad/verilog.
Makefile r1.2
patches/patch-{ad,ae} r1.2
files/{md5,patch-sum} r1.2

patch-ad removes the -O2 flag for 1 particular file.  So again
rm patches/patch-ad
make makepatchsum
make

and you'll see the assembly lose.

	
>Fix:

the current workaround is patch-ac which is already included in the package.
For other programs I'd expect omitting the -O2 flag would also work.  However,
thats just a workaround, not a fix.

	
>Audit-Trail:
>Unformatted: