Subject: kernel compile prob
To: RiscBSD <port-arm32@NetBSD.ORG>
From: Patrick Welche <prlw1@cam.ac.uk>
List: port-arm32
Date: 05/01/1998 12:57:12
As gcc can compile hellow.c on an ARM 6, I supped yesterday and got
the following while building a kernel:
cc -O2 -Werror -Wall -I. -I../../../../arch -I../../../.. -nostdinc
-DMACHINE_NONCONTIG -DCPU_ARM6 -DIOMD -DRISCPC -DARMFPE -DFIFO -DINET
-DPFIL_HOOKS -DCOMPAT_43 -DCOMPAT_13 -DCOMPAT_12 -DSYSVMSG -DSYSVSEM
-DSYSVSHM -DSHMMAXPGS="0x400" -DKTRACE -DIRQSTATS -DMOUSE_IOC_ACK
-DDIAGNOSTIC -DPOSTMORTEM -DDDB -DIPFILTER -DIPFILTER_LOG
-DMAXUSERS=32 -D_KERNEL -Darm32 -Wcomment -c
../../../../arch/arm32/arm32/process_machdep.c
In file included from
../../../../arch/arm32/arm32/process_machdep.c:77:
machine/cpus.h:148: field `sc_device' has incomplete type
*** Error code 1
Note that machine/cpus.h is only included if ARMFPE is defined (as is
the case for me). Same error occured before and after a make includes.
# ls -l /usr/include/machine/cpus.h
-r--r--r-- 1 root wheel 4754 Oct 14 1997 /usr/include/machine/cpus.h
machine/cpus.h:
#ifndef _LOCORE
#include <sys/param.h> <-- doesn't include a definition of struct device
#endif
struct cpu_softc {
struct device sc_device;
int sc_open;
};
sys/param.h:
#ifndef _LOCORE
#include <sys/types.h>
#endif
#include <sys/syslimits.h>
#ifdef _KERNEL
#include <sys/cdefs.h>
#include <sys/errno.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/ucred.h>
#include <sys/uio.h>
#endif
#include <sys/signal.h>
#include <machine/param.h>
#include <machine/limits.h>
etc. and none of them include sys/device.h, so should
#include <sys/device.h> be added to machine/cpus.h ?
Cheers,
Patrick