From owner-freebsd-current Thu Jul 5 1:16: 0 2001 Delivered-To: freebsd-current@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id 13B5137B405 for ; Thu, 5 Jul 2001 01:15:50 -0700 (PDT) (envelope-from julian@elischer.org) Received: from elischer.org (InterJet.elischer.org [192.168.1.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id CAA26418; Thu, 5 Jul 2001 02:53:30 -0700 (PDT) Message-ID: <3B441FFC.8292F1F9@elischer.org> Date: Thu, 05 Jul 2001 01:06:20 -0700 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: Warner Losh Cc: current@FreeBSD.ORG Subject: Re: kernel getting files from out of kernel tree. References: <3B43F707.768085D5@elischer.org> <3B43EE2E.5BB03624@elischer.org> <3B43E764.3333C898@elischer.org> <200107050428.f654S0J44503@harmony.village.org> <200107050502.f6552VJ44682@harmony.village.org> <200107050525.f655P3J44858@harmony.village.org> Content-Type: multipart/mixed; boundary="------------7395A31B0E78540DF3FFEEEF" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is a multi-part message in MIME format. --------------7395A31B0E78540DF3FFEEEF Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit Warner Losh wrote: > > : > You must have includes installed. > : > : no, the kernel compiles fine without /usr/src/includes installed > : but if it IS installed, it finds them first. > > No it does not. > Try extreme version skew, like building -current on a > 3.2-STABLE system without /usr/src/includes. Even using current build > toolks, it dies a horrible death (at least it did last time I tried > it). It happens to work with /usr/includes. If you look at the > makefile, you'll see this is explicit there: ok I understand you now, and what I'm saying is that we should do a little work on avoiding this. Most of the external includes are simply doing so to get to some value that is defined in the kernel anyhow when the external include then includes a kernel include file. take for example db_command.c it includes which gets satisfied by the line you show below.. but it is only calling that for the prototype of setjmp. If you put the prototype in a file /sys/sys/setjmp.h then it works. (along with an include of "machine/setjmp.h") alternatively adding it to systm.h works for me.. Actually the fact that userland and kernel setjmps are identical is something that I don't think we should be depending on.... The kernel SHOULD have it's own definition somewhere, in which case db_command.c could just include machine/setjmp.h without needing the user one.... Another example: changing quad.h in the kernel to include and instead of removes the dependency of all the quad instructions on user space. > > # This hack is to allow kernel compiles to succeed on machines w/out srcdist > .if exists($S/../include) > INCLUDES+= -I$S/../include > .else > INCLUDES+= -I/usr/include > .endif I include a diff that removes a whole bunch of /usr/include inclusions in the kernel. I'm sure BDE could remove many more in a few minutes. (or make these cleaner) -- +------------------------------------+ ______ _ __ | __--_|\ Julian Elischer | \ U \/ / hard at work in | / \ julian@elischer.org +------>x USA \ a very strange | ( OZ ) \___ ___ | country ! +- X_.---._/ presently in San Francisco \_/ \\ v --------------7395A31B0E78540DF3FFEEEF Content-Type: text/plain; charset=iso-8859-2; name="thediff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="thediff" Index: alpha/alpha/alpha-gdbstub.c =================================================================== RCS file: /unused/cvs/freebsd/src/sys/alpha/alpha/alpha-gdbstub.c,v retrieving revision 1.11 diff -u -r1.11 alpha-gdbstub.c --- alpha/alpha/alpha-gdbstub.c 2001/03/28 01:54:05 1.11 +++ alpha/alpha/alpha-gdbstub.c 2001/07/05 06:58:24 @@ -104,7 +104,7 @@ #include -#include +#include #include "opt_ddb.h" Index: alpha/alpha/db_interface.c =================================================================== RCS file: /unused/cvs/freebsd/src/sys/alpha/alpha/db_interface.c,v retrieving revision 1.20 diff -u -r1.20 db_interface.c --- alpha/alpha/db_interface.c 2001/05/10 17:45:44 1.20 +++ alpha/alpha/db_interface.c 2001/07/05 06:58:39 @@ -76,7 +76,7 @@ #include #include #include -#include +#include static jmp_buf *db_nofault = 0; extern jmp_buf db_jmpbuf; Index: ddb/db_command.c =================================================================== RCS file: /unused/cvs/freebsd/src/sys/ddb/db_command.c,v retrieving revision 1.35 diff -u -r1.35 db_command.c --- ddb/db_command.c 2001/06/13 10:58:29 1.35 +++ ddb/db_command.c 2001/07/05 06:59:26 @@ -45,7 +45,7 @@ #include #include -#include +#include /* * Exported global variables Index: ddb/db_trap.c =================================================================== RCS file: /unused/cvs/freebsd/src/sys/ddb/db_trap.c,v retrieving revision 1.14 diff -u -r1.14 db_trap.c --- ddb/db_trap.c 1999/08/28 00:41:11 1.14 +++ ddb/db_trap.c 2001/07/05 07:00:12 @@ -35,11 +35,12 @@ * Trap entry point to kernel debugger. */ #include +#include #include #include -#include +#include extern jmp_buf db_jmpbuf; Index: i386/i386/db_interface.c =================================================================== RCS file: /unused/cvs/freebsd/src/sys/i386/i386/db_interface.c,v retrieving revision 1.59 diff -u -r1.59 db_interface.c --- i386/i386/db_interface.c 2001/05/10 17:45:46 1.59 +++ i386/i386/db_interface.c 2001/07/05 07:00:27 @@ -53,7 +53,7 @@ #include #include -#include +#include static jmp_buf *db_nofault = 0; extern jmp_buf db_jmpbuf; Index: i386/i386/i386-gdbstub.c =================================================================== RCS file: /unused/cvs/freebsd/src/sys/i386/i386/i386-gdbstub.c,v retrieving revision 1.17 diff -u -r1.17 i386-gdbstub.c --- i386/i386/i386-gdbstub.c 2001/01/31 10:54:36 1.17 +++ i386/i386/i386-gdbstub.c 2001/07/05 07:00:35 @@ -100,7 +100,7 @@ #include -#include +#include #include "opt_ddb.h" Index: ia64/ia64/db_interface.c =================================================================== RCS file: /unused/cvs/freebsd/src/sys/ia64/ia64/db_interface.c,v retrieving revision 1.6 diff -u -r1.6 db_interface.c --- ia64/ia64/db_interface.c 2001/04/27 19:28:22 1.6 +++ ia64/ia64/db_interface.c 2001/07/05 07:00:52 @@ -60,7 +60,7 @@ #include #include #include -#include +#include static jmp_buf *db_nofault = 0; extern jmp_buf db_jmpbuf; Index: ia64/ia64/ia64-gdbstub.c =================================================================== RCS file: /unused/cvs/freebsd/src/sys/ia64/ia64/ia64-gdbstub.c,v retrieving revision 1.2 diff -u -r1.2 ia64-gdbstub.c --- ia64/ia64/ia64-gdbstub.c 2001/01/31 10:54:41 1.2 +++ ia64/ia64/ia64-gdbstub.c 2001/07/05 07:01:00 @@ -103,7 +103,7 @@ #include -#include +#include #include "opt_ddb.h" Index: libkern/bsearch.c =================================================================== RCS file: /unused/cvs/freebsd/src/sys/libkern/bsearch.c,v retrieving revision 1.1 diff -u -r1.1 bsearch.c --- libkern/bsearch.c 2001/03/27 05:45:32 1.1 +++ libkern/bsearch.c 2001/07/05 07:49:05 @@ -37,8 +37,9 @@ static char sccsid[] = "@(#)bsearch.c 8.1 (Berkeley) 6/4/93"; #endif /* LIBC_SCCS and not lint */ -#include -#include +#include +#include +#include /* * Perform a binary search. Index: libkern/quad.h =================================================================== RCS file: /unused/cvs/freebsd/src/sys/libkern/quad.h,v retrieving revision 1.10 diff -u -r1.10 quad.h --- libkern/quad.h 2000/12/07 22:28:20 1.10 +++ libkern/quad.h 2001/07/05 06:47:22 @@ -56,7 +56,8 @@ #include #include -#include +#include +#include /* * Depending on the desired operation, we view a `long long' (aka quad_t) in Index: modules/Makefile =================================================================== RCS file: /unused/cvs/freebsd/src/sys/modules/Makefile,v retrieving revision 1.189 diff -u -r1.189 Makefile --- modules/Makefile 2001/07/02 21:01:51 1.189 +++ modules/Makefile 2001/07/05 02:48:07 @@ -10,7 +10,7 @@ cam ccd cd9660 coda cue dc de digi ed fdescfs fdc fs fxp \ if_disc if_ef if_gif if_ppp if_sl if_stf if_tap if_tun \ ip6fw ipfilter ipfw ispfw joy kue lge \ - libmchain linux lnc md mii mlx msdosfs ncp netgraph nfs nge ntfs \ + libmchain linux lnc md mii mlx msdosfs ncp netgraph nfs nge nmdm ntfs \ nullfs nwfs pcn portalfs procfs ${_random} \ rl rp sf sis sk sn snp sound sppp ste sym syscons sysvipc ti tl twe \ tx udbp ugen uhid ukbd ulpt umapfs umass umodem ums unionfs urio usb \ Index: sys/systm.h =================================================================== RCS file: /unused/cvs/freebsd/src/sys/sys/systm.h,v retrieving revision 1.142 diff -u -r1.142 systm.h --- sys/systm.h 2001/07/04 00:32:50 1.142 +++ sys/systm.h 2001/07/05 07:09:53 @@ -89,7 +89,10 @@ struct tty; struct ucred; struct uio; +struct _jmp_buf; +int setjmp __P((struct _jmp_buf *)); +void longjmp __P((struct _jmp_buf *, int)) __dead2; void Debugger __P((const char *msg)); int dumpstatus __P((vm_offset_t addr, long count)); int nullop __P((void)); --------------7395A31B0E78540DF3FFEEEF-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message