Subject: Compilation error in NetBSD 4 EV64260 build
To: None <tech-kern@NetBSD.org>
From: Gerald Lee <glee@force10networks.com>
List: tech-kern
Date: 10/16/2007 11:24:10
Get the following error compiling NetBSD 4 (EV64260 kernel target)

#   compile  EV64260/gtmpsc.o
/work/sw/glee/NetBSD_4/cross-tools/bin/powerpc--netbsd-gcc
-mno-strict-align -msoft-float -Wa,-maltivec -ffreestanding
-fno-zero-initialized-in-bss -g -O2 -Wreturn-type -Werror -Wall
-Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes
-Wstrict-prototypes -Wswitch -Wshadow -Wcast-qual -Wwrite-strings
-Wno-sign-compare -Wno-pointer-sign -Wno-attributes -fno-strict-aliasing
-D__ev64260__ -Devbppc=3Devbppc -I.
-I/sites/sjc/work/sw/glee/NetBSD_4/src/sys/../common/include
-I/sites/sjc/work/sw/glee/NetBSD_4/src/sys/arch
-I/sites/sjc/work/sw/glee/NetBSD_4/src/sys -nostdinc
-DPPC_INTR_IMPL=3D<arch/powerpc/marvell/marvell_intr.h>
-DPPC_PCI_MACHDEP_IMPL=3D<arch/powerpc/marvell/pci_machdep.h> =
-DDIAGNOSTIC
-DMAXUSERS=3D32 -D_KERNEL -D_KERNEL_OPT
-I/sites/sjc/work/sw/glee/NetBSD_4/src/sys/lib/libkern/../../../common/l
ib/libc/quad
-I/sites/sjc/work/sw/glee/NetBSD_4/src/sys/lib/libkern/../../../common/l
ib/libc/string
-I/sites/sjc/work/sw/glee/NetBSD_4/src/sys/lib/libkern/../../../common/l
ib/libc/arch/powerpc/string -c
/sites/sjc/work/sw/glee/NetBSD_4/src/sys/dev/marvell/gtmpsc.c
cc1: warnings being treated as errors
/sites/sjc/work/sw/glee/NetBSD_4/src/sys/dev/marvell/gtmpsc.c: In
function 'gtmpscattach':
/sites/sjc/work/sw/glee/NetBSD_4/src/sys/dev/marvell/gtmpsc.c:517:
warning: implicit declaration of function 'softint_establish'
/sites/sjc/work/sw/glee/NetBSD_4/src/sys/dev/marvell/gtmpsc.c:517:
error: 'SOFTINT_SERIAL' undeclared (first use in this function)
/sites/sjc/work/sw/glee/NetBSD_4/src/sys/dev/marvell/gtmpsc.c:517:
error: (Each undeclared identifier is reported only once
/sites/sjc/work/sw/glee/NetBSD_4/src/sys/dev/marvell/gtmpsc.c:517:
error: for each function it appears in.)
/sites/sjc/work/sw/glee/NetBSD_4/src/sys/dev/marvell/gtmpsc.c:517:
warning: assignment makes pointer from integer without a cast
/sites/sjc/work/sw/glee/NetBSD_4/src/sys/dev/marvell/gtmpsc.c: In
function 'gtmpsc_intr':
/sites/sjc/work/sw/glee/NetBSD_4/src/sys/dev/marvell/gtmpsc.c:991:
warning: implicit declaration of function 'softint_schedule'

The following change fixes the compilation error.  Not certain just what
caused the problem, worked the first of October, but failed on the
eleventh.

Index: gtmpsc.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/src/sys/dev/marvell/gtmpsc.c,v
retrieving revision 1.24
diff -r1.24 gtmpsc.c
60a61
> #include <sys/intr.h>