NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-sparc/39942: kernel crossbuild fails with "unused variable 'ch0_is_cons'"
>Number: 39942
>Category: port-sparc
>Synopsis: kernel crossbuild fails with "unused variable 'ch0_is_cons'"
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-sparc-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 17 18:15:00 +0000 2008
>Originator: John D. Baker
>Release: NetBSD4.0_STABLE, NetBSD 5.0_BETA
>Organization:
>Environment:
Host:
NetBSD drmemory.bozonet.ntc 4.0_STABLE NetBSD 4.0_STABLE (DRMEMORY) #3: Wed Sep
17 06:34:25 CDT 2008
sysop%drmemory.bozonet.ntc@localhost:/d0/nbsd/netbsd-4/obj/i386/sys/arch/i386/compile/DRMEMORY
i386
Target:
NetBSD artychoke.bozonet.ntc 4.0_STABLE NetBSD 4.0_STABLE (ARTYCHOKE) #9: Fri
Oct 10 09:22:29 CDT 2008
sysop%drmemory.bozonet.ntc@localhost:/d0/nbsd/netbsd-4/obj/sparc/sys/arch/sparc/compile/ARTYCHOKE
sparc
>Description:
Cross-building NetBSD-5.0_BETA/sparc on NetBSD-4.0_STABLE/i386.
Target machine will be serial-console only SUN4M, so unused driver and
attachment points are commented out as follows (this works fine with
NetBSD-4.0_STABLE/sparc):
[...]
#### Serial port configuration
## Zilog 8530 serial chips. Each has two-channels.
## zs0 is ttya and ttyb. zs1 is the keyboard and mouse.
#zs0 at mainbus0 # sun4c
zs0 at obio0 # sun4m
#zs0 at obio0 addr 0xf1000000 level 12 # sun4/200 and sun4/300
#zs0 at obio0 addr 0x01000000 level 12 # sun4/100
#zs0 at bootbus0 # sun4d
zstty0 at zs0 channel 0 # ttya
zstty1 at zs0 channel 1 # ttyb
#zs1 at mainbus0 # sun4c
#zs1 at obio0 # sun4m
#zs1 at obio0 addr 0xf0000000 level 12 # sun4/200 and sun4/300
#zs1 at obio0 addr 0x00000000 level 12 # sun4/100
#zs1 at bootbus0 # sun4d
#kbd0 at zs1 channel 0 # keyboard
#ms0 at zs1 channel 1 # mouse
#zs2 at obio0 addr 0xe0000000 level 12 # sun4/300
#zstty2 at zs2 channel 0 # ttyc
#zstty3 at zs2 channel 1 # ttyd
#zs* at bootbus? # sun4d
#zstty* at zs?
[...]
Which results in the following error:
[...]
# compile ARTYCHOKE/zs.o
/d0/nbsd/netbsd-5/src/../tools/i386/bin/sparc--netbsdelf-gcc -mno-fpu
-ffreestanding -fno-zero-initialized-in-bss -O2 -std=gnu99 -fno-strict-aliasing
-Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith
-Wmissing-prototypes -Wstrict-prototypes -Wswitch -Wshadow -Wcast-qual
-Wwrite-strings -Wno-unreachable-code -Wno-sign-compare -Wno-pointer-sign
-Wno-attributes -Werror -mcpu=v8 -I.
-I/d0/nbsd/netbsd-5/src/sys/../common/include -I/d0/nbsd/netbsd-5/src/sys/arch
-I/d0/nbsd/netbsd-5/src/sys -nostdinc -DMAXUSERS=8 -D_KERNEL -D_KERNEL_OPT
-I/d0/nbsd/netbsd-5/src/sys/lib/libkern/../../../common/lib/libc/quad
-I/d0/nbsd/netbsd-5/src/sys/lib/libkern/../../../common/lib/libc/string
-I/d0/nbsd/netbsd-5/src/sys/lib/libkern/../../../common/lib/libc/arch/sparc/string
-I/d0/nbsd/netbsd-5/src/sys/dist/pf -c
/d0/nbsd/netbsd-5/src/sys/arch/sparc/dev/zs.c
cc1: warnings being treated as errors
/d0/nbsd/netbsd-5/src/sys/arch/sparc/dev/zs.c: In function 'zs_attach':
/d0/nbsd/netbsd-5/src/sys/arch/sparc/dev/zs.c:400: warning: unused variable
'ch0_is_cons'
*** Failed target: zs.o
*** Failed command: echo '# ' "compile ARTYCHOKE/zs.o"; echo
/d0/nbsd/netbsd-5/src/../tools/i386/bin/sparc--netbsdelf-gcc -mno-fpu
-ffreestanding -fno-zero-initialized-in-bss -O2 -std=gnu99 -fno-strict-aliasing
-Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith
-Wmissing-prototypes -Wstrict-prototypes -Wswitch -Wshadow -Wcast-qual
-Wwrite-strings -Wno-unreachable-code -Wno-sign-compare -Wno-pointer-sign
-Wno-attributes -Werror -mcpu=v8 -I.
-I/d0/nbsd/netbsd-5/src/sys/../common/include -I/d0/nbsd/netbsd-5/src/sys/arch
-I/d0/nbsd/netbsd-5/src/sys -nostdinc -DMAXUSERS=8 -D_KERNEL -D_KERNEL_OPT
-I/d0/nbsd/netbsd-5/src/sys/lib/libkern/../../../common/lib/libc/quad
-I/d0/nbsd/netbsd-5/src/sys/lib/libkern/../../../common/lib/libc/string
-I/d0/nbsd/netbsd-5/src/sys/lib/libkern/../../../common/lib/libc/arch/sparc/string
-I/d0/nbsd/netbsd-5/src/sys/dist/pf -c
/d0/nbsd/netbsd-5/src/sys/arch/sparc/dev/zs.c;
/d0/nbsd/netbsd-5/src/../tools/i386/bin/sparc--netbsdelf-gcc -mno-fp
u -ffreestanding -fno-zero-initialized-in-bss -O2 -std=gnu99
-fno-strict-aliasing -Werror -Wall -Wno-main -Wno-format-zero-length
-Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wswitch -Wshadow
-Wcast-qual -Wwrite-strings -Wno-unreachable-code -Wno-sign-compare
-Wno-pointer-sign -Wno-attributes -Werror -mcpu=v8 -I.
-I/d0/nbsd/netbsd-5/src/sys/../common/include -I/d0/nbsd/netbsd-5/src/sys/arch
-I/d0/nbsd/netbsd-5/src/sys -nostdinc -DMAXUSERS=8 -D_KERNEL -D_KERNEL_OPT
-I/d0/nbsd/netbsd-5/src/sys/lib/libkern/../../../common/lib/libc/quad
-I/d0/nbsd/netbsd-5/src/sys/lib/libkern/../../../common/lib/libc/string
-I/d0/nbsd/netbsd-5/src/sys/lib/libkern/../../../common/lib/libc/arch/sparc/string
-I/d0/nbsd/netbsd-5/src/sys/dist/pf -c
/d0/nbsd/netbsd-5/src/sys/arch/sparc/dev/zs.c
*** Error code 1
Stop.
nbmake: stopped in /d0/nbsd/netbsd-5/obj/sparc/sys/arch/sparc/compile/ARTYCHOKE
ERROR: Failed to make all in
/d0/nbsd/netbsd-5/src/../obj/sparc/sys/arch/sparc/compile/ARTYCHOKE
*** BUILD ABORTED ***
>How-To-Repeat:
Configure serial drivers as shown above. Specifically, enable:
zs1 at obio # or any attachment point
and disable:
kbd0 at zs1 channel 0
and attempt to build kernel.
>Fix:
Workaround: enable zs1 and kbd0 devices.
Possibly this patch, to match the use case:
Index: sys/arch/sparc/dev/zs.c
===================================================================
RCS file: /cvsroot/src/sys/arch/sparc/dev/zs.c,v
retrieving revision 1.111
diff -u -r1.111 zs.c
--- sys/arch/sparc/dev/zs.c 13 Jun 2008 13:10:18 -0000 1.111
+++ sys/arch/sparc/dev/zs.c 17 Nov 2008 18:10:39 -0000
@@ -397,7 +397,10 @@
struct zs_chanstate *cs;
int s, channel;
static int didintr, prevpri;
+#if NWSKBD == 0
+#else
int ch0_is_cons = 0;
+#endif
if (zsd == NULL) {
aprint_error(": configuration incomplete\n");
Home |
Main Index |
Thread Index |
Old Index