Subject: Re: Fixes for acorn32 build after GCC4 upgrade
To: None <current-users@NetBSD.org>
From: Mike Pumford <mpumford@black-star.demon.co.uk>
List: current-users
Date: 06/25/2006 22:25:08
This is a multi-part message in MIME format.
--------------060509030207070109000208
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Mike Pumford wrote:

> Attached is a patch that fixes all the build failures for current acorn32.
> 
> None of these have been run yet but it at least makes everything build. 
> I'll report back once I've actually updated the system on how things work.
>
Looks like there are some additional patches needed to cope with the 
more agressive optimiser in GCC4. Attached is the patch to actually make 
the kernel run (without several devices failing to probe).

Mike

--------------060509030207070109000208
Content-Type: text/plain;
 name="iomd_clock.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="iomd_clock.patch"

Index: sys/arch/arm/iomd/iomd_clock.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/iomd/iomd_clock.c,v
retrieving revision 1.17
diff -u -r1.17 iomd_clock.c
--- sys/arch/arm/iomd/iomd_clock.c	11 Dec 2005 12:16:47 -0000	1.17
+++ sys/arch/arm/iomd/iomd_clock.c	25 Jun 2006 21:23:16 -0000
@@ -349,10 +349,12 @@
 delay(n)
 	u_int n;
 {
-	u_int i;
+	volatile u_int n2;
+	volatile u_int i;
 
 	if (n == 0) return;
-	while (n-- > 0) {
+	n2 = n;
+	while (n2-- > 0) {
 		if (cputype == CPU_ID_SA110)	/* XXX - Seriously gross hack */
 			for (i = delaycount; --i;);
 		else

--------------060509030207070109000208--