Subject: Kernel build failure on -current
To: port-pmax <port-pmax@netbsd.org>
From: Ken Wellsch <kwellsch@tampabay.rr.com>
List: port-pmax
Date: 08/23/2001 17:50:22
I thought I would build -current on a 5k/133 (i.e. MIPS1) but got this:

cc  -O2 -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes  -Wpointer-arith
-Wno-uninitialized -Wno-main -G 0  -mno-abicalls -mno-half-pic -EL -I.
-I../../../../arch -I../../../.. -nostdinc -DMIPS1 -DNMBCLUSTERS="0x800"
-DHZ=256 -DMAXUSERS=64 -D_KERNEL -D_KERNEL_OPT -Dpmax  -c
../../../../arch/pmax/pmax/cpu.c
../../../../arch/pmax/pmax/cpu.c: In function `cpuattach':
../../../../arch/pmax/pmax/cpu.c:120: `mips_L2CacheSize' undeclared (first use
in this function)
../../../../arch/pmax/pmax/cpu.c:120: (Each undeclared identifier is reported
only once
../../../../arch/pmax/pmax/cpu.c:120: for each function it appears in.)
../../../../arch/pmax/pmax/cpu.c:121: `mips_L2CacheMixed' undeclared (first use
in this function)
../../../../arch/pmax/pmax/cpu.c:122: `mips_L2CacheIsSnooping' undeclared
(first use in this function)
*** Error code 1

Stop.

Which I think happens because <mips/cpu.h> has this:

#ifdef MIPS3
extern u_int    mips_L2CacheSize;
extern int      mips_L2CacheIsSnooping; /* L2 cache snoops uncached writes ? */
extern int      mips_L2CacheMixed;
#endif /* MIPS3 */

while pmax/cpu.c has this:
                
                if (!mips_L2CachePresent)
                        printf("no L2 cache\n");
                else
                        printf("L2 cache: %dKB/%dB %s, %s\n",
                            mips_L2CacheSize/1024, mips_L2CacheLSize,
                            mips_L2CacheMixed ? "mixed" : "separated",
                            mips_L2CacheIsSnooping? "snooping" : "no
snooping");