Subject: port-sparc/28302: uncommenting wdc on pcmcia has problems
To: None <port-sparc-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: None <michael@nosflow.com>
List: netbsd-bugs
Date: 11/14/2004 00:50:01
>Number:         28302
>Category:       port-sparc
>Synopsis:       uncommenting wdc on pcmcia has problems
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    port-sparc-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 14 00:50:01 +0000 2004
>Originator:     Michael Wolfson
>Release:        2.0_BETA on sparc64 to build -current on sparc (32-bit)
>Organization:
>Environment:
NetBSD ultra 2.0_BETA NetBSD 2.0_BETA (GENERIC) #0: Thu May 20 18:40:11 UTC 2004  autobuild@tgm.netbsd.org:/autobuild/netbsd-2-0/sparc64/OBJ/autobuild/netbsd-2-0/src/sys/arch/sparc64/compile/GENERIC sparc64
>Description:
Trying to cross-compile a kernel from sparc64 for my sparc (32-bit) Voyager with all the PCMCIA goodies available.


/sparc--netbsdelf-gcc -mno-fpu -ffreestanding -O2 -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wno-sign-compare -fno-zero-initialized-in-bss -I. -I/usr/src/src/sys/arch -I/usr/src/src/sys -nostdinc -DRASTERCONSOLE -DDIAGNOSTIC -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -c /usr/src/src/sys/dev/pcmcia/wdc_pcmcia.c

/usr/src/src/sys/dev/pcmcia/wdc_pcmcia.c: In function `wdc_pcmcia_datain_memory':
/usr/src/src/sys/dev/pcmcia/wdc_pcmcia.c:361: warning: implicit declaration of function `bus_space_read_region_stream_4'
/usr/src/src/sys/dev/pcmcia/wdc_pcmcia.c:364: warning: implicit declaration of function `bus_space_read_region_stream_2'
/usr/src/src/sys/dev/pcmcia/wdc_pcmcia.c: In function `wdc_pcmcia_dataout_memory':
/usr/src/src/sys/dev/pcmcia/wdc_pcmcia.c:382: warning: implicit declaration of function `bus_space_write_region_stream_4'
/usr/src/src/sys/dev/pcmcia/wdc_pcmcia.c:385: warning: implicit declaration of function `bus_space_write_region_stream_2'

>How-To-Repeat:
./build.sh -O /usr/src/obj/sparc -T /usr/src/cross/sparc -m sparc -u kernel=VGER

where the primary difference between VGER and GENERIC is the uncommenting of:
wdc*    at pcmcia?
atabus* at ata?
wd*     at atabus? drive ? flags 0x0000

>Fix:
Well, I tried compiling the problematic file without -Werror, but it gave up when trying to link the kernel at the end:
#      link  VGER/netbsd
/usr/src/cross/sparc/bin/sparc--netbsdelf-ld -n -T /usr/src/src/sys/arch/sparc/c
onf/kern.ldscript -Ttext F0004000 -e start -X -S -o netbsd ${SYSTEM_OBJ} ${EXTRA
_OBJ} vers.o
wdc_pcmcia.o(.text+0x498): In function `wdc_pcmcia_datain_memory':
: undefined reference to `bus_space_read_region_stream_2'
wdc_pcmcia.o(.text+0x4c0): In function `wdc_pcmcia_datain_memory':
: undefined reference to `bus_space_read_region_stream_4'
wdc_pcmcia.o(.text+0x530): In function `wdc_pcmcia_dataout_memory':
: undefined reference to `bus_space_write_region_stream_2'
wdc_pcmcia.o(.text+0x558): In function `wdc_pcmcia_dataout_memory':
: undefined reference to `bus_space_write_region_stream_4'

*** Failed target:  netbsd