Subject: Known compiler bugs (was: Re: dhcp )
To: Patrick Welche <prlw1@cam.ac.uk>
From: Chris G. Demetriou <cgd@pa.dec.com>
List: port-arm32
Date: 02/19/1998 15:45:11
[ problems compiling dhcp and sa with -O ]

As far as I'm concerned, the problems with sa and dhcp are "known,
real bugs."  I've pointed them out to Mark et al., but they're not
particularly high priority.  In the source tree we use here, i've
added the patches below as temporary workarounds.  They just disable
optimization in the problematic directories.

If somebody wants to go to the trouble of filing a PR on it, that'd
probably be in order.  I've not yet felt the need to (since I worked
around the problem and it's not been causing me grief 8-).


cgd
===================================================================
Index: usr.sbin/dhcp/server/Makefile
===================================================================
RCS file: /src/kona.cvs/netbsd/usr.sbin/dhcp/server/Makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -r1.1.1.1 -r1.2
*** 1.1.1.1	1997/12/03 00:17:17
--- 1.2	1997/12/23 23:08:34
***************
*** 34,37 ****
--- 34,41 ----
  PROG   = dhcpd
  MAN    = dhcpd.8 dhcpd.conf.5 dhcpd.leases.5
  
+ .if (${MACHINE_ARCH} == "arm32")
+ CFLAGS+= -O0		# XXX arm32 gcc loses when optimization turned on
+ .endif
+ 
  .include <bsd.prog.mk>
Index: usr.sbin/sa/Makefile
===================================================================
RCS file: /src/kona.cvs/netbsd/usr.sbin/sa/Makefile,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -c -r1.1.1.2 -r1.2
*** 1.1.1.2	1997/12/22 22:35:01
--- 1.2	1997/12/23 23:08:37
***************
*** 4,7 ****
--- 4,11 ----
  MAN=	sa.8
  SRCS=	main.c pdb.c usrdb.c
  
+ .if (${MACHINE_ARCH} == "arm32")
+ CFLAGS+= -O0		# XXX arm32 gcc loses when optimization turned on
+ .endif
+ 
  .include <bsd.prog.mk>