Subject: mipsco build problem
To: None <port-mips@NetBSD.org>
From: Havard Eidnes <he@NetBSD.org>
List: port-mips
Date: 08/04/2006 01:08:56
Hi,
some of you may have noticed that the mipsco port no longer
builds, and that the build error is:
compile GENERIC/cache.o
In file included from machine/vmparam.h:3,
from /u/build/HEAD/src/sys/uvm/uvm_param.h:74,
from /u/build/HEAD/src/sys/uvm/uvm_extern.h:482,
from /u/build/HEAD/src/sys/arch/mips/mips/cache.c:78:
mips/vmparam.h:177: error: field `pvh_slock' has incomplete type
An attempt to follow up this error by adding includes of
<sys/types.h> and <sys/lock.h> before <uvm/uvm_extern.h> leads to
modifications of
sys/arch/mips/mips/cache.c
sys/arch/mips/mips/db_disasm.c
sys/arch/mips/mips/db_lex.c
sys/ddb/db_output.c
sys/kern/subr_kern.c
At that point I decided that this was probably not the right way
to fix this problem, and rather came up with the patch below
which makes the tree build again.
Does this fix look reasonable?
I've not really looked in detail at what is so particular about
this particular mips port which makes it fail, while e.g. sgimips
builds just fine.
Regards,
- H=E5vard
------------------------------
Index: sys/uvm/uvm_extern.h
=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: /u/nb/src/sys/uvm/uvm_extern.h,v
retrieving revision 1.115
diff -u -r1.115 uvm_extern.h
--- sys/uvm/uvm_extern.h 5 Jul 2006 14:26:42 -0000 1.115
+++ sys/uvm/uvm_extern.h 31 Jul 2006 22:38:35 -0000
@@ -479,8 +479,8 @@
*/
#include <sys/vmmeter.h>
#include <sys/queue.h>
-#include <uvm/uvm_param.h>
#include <sys/lock.h>
+#include <uvm/uvm_param.h>
#include <uvm/uvm_prot.h>
#include <uvm/uvm_page.h>
#include <uvm/uvm_pmap.h>
Index: sys/uvm/uvm_param.h
=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: /u/nb/src/sys/uvm/uvm_param.h,v
retrieving revision 1.20
diff -u -r1.20 uvm_param.h
--- sys/uvm/uvm_param.h 11 Dec 2005 12:25:29 -0000 1.20
+++ sys/uvm/uvm_param.h 31 Jul 2006 22:41:52 -0000
@@ -71,6 +71,8 @@
#include "opt_uvm.h"
#endif
#ifdef _KERNEL
+#include <sys/types.h>
+#include <sys/lock.h>
#include <machine/vmparam.h>
#include <sys/resourcevar.h>
#endif