Subject: current kernel GENERIC build failure, with optimization specified
To: NetBSD Current Users <current-users@netbsd.org>
From: Barry Bouwsma <freebsd-misuser@remove-NOSPAM-to-reply.NOSPAM.dyndns.dk>
List: current-users
Date: 12/25/2004 11:41:53
Hi,

Latest NetBSD-current downloaded a couple days ago.  I've seen this
type of failure before when I've specified an optimization, crossbuilding
i386 under FreeBSD.  For some reason, I'm doing this again, specifying
-O1...

#   compile  GENERIC/icp.o
/stand/NetBSD-src/src/obj.i386/tooldir.FreeBSD-4.10-STABLE-i386/bin/i386--netbsd
elf-gcc -ffreestanding -pipe -O1 -Werror -Wall -Wno-main -Wno-format-zero-length
                       ^^^^^^^^^
 -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wno-sign-compare -fno
-zero-initialized-in-bss -Di386 -I. -I/stand/NetBSD-src/src/sys/arch -I/stand/Ne
tBSD-src/src/sys -nostdinc -DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -I/stand/
NetBSD-src/src/sys/dist/ipf -c /stand/NetBSD-src/src/sys/dev/ic/icp.c
/stand/NetBSD-src/src/sys/dev/ic/icp.c: In function `icp_init':
/stand/NetBSD-src/src/sys/dev/ic/icp.c:143: warning: `i' might be used uninitial
ized in this function


I suspect this is a problem because in icp.c lines 174 and following,
one can goto bail_out, while `i' is first used in line 204.  The second
line of bail_out: at line 430 compares against `i'.

Note that this is not what was backed out in rev 1.12 of this file.


(Strange, now I *really* wonder how I was building without forcing -O1
to get successful builds recently...)


I believe a couple other files suffer this problem too when building
GENERIC, as I've reported (with patches) in the past.  I'll try again,
but my build machine is horribly slow.


thanks
barry bouwsma