From owner-freebsd-current@FreeBSD.ORG Thu Aug 14 03:04:00 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 328A337B401; Thu, 14 Aug 2003 03:04:00 -0700 (PDT) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0EB5B43F75; Thu, 14 Aug 2003 03:03:51 -0700 (PDT) (envelope-from ru@sunbay.com) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) h7EA2mfr004905 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 14 Aug 2003 13:02:48 +0300 (EEST) (envelope-from ru@sunbay.com) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.9/8.12.8/Submit) id h7EA2mO3004900; Thu, 14 Aug 2003 13:02:48 +0300 (EEST) (envelope-from ru) Date: Thu, 14 Aug 2003 13:02:48 +0300 From: Ruslan Ermilov To: Scott Long , Luoqi Chen Message-ID: <20030814100248.GB88037@sunbay.com> References: <3F3B43EB.8040900@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yEPQxsgoJgBvi8ip" Content-Disposition: inline In-Reply-To: <3F3B43EB.8040900@freebsd.org> User-Agent: Mutt/1.5.4i cc: current@freebsd.org Subject: Change to kernel+modules build approach X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2003 10:04:00 -0000 --yEPQxsgoJgBvi8ip Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 14, 2003 at 02:10:19AM -0600, Scott Long wrote: > Luoqi Chen wrote: [...] > >On the other hand, all modules should create all the opt_*.h files > >it needs when built individually. Add opt_ddb.h to nullfs's Makefile > >should fix the breakage. > > > Our kernel build system isn't set up to handle passing config options > to modules. Various solutions to this have been proposed, but nothing > has appeared yet. In 5.x, we document that modules will not work with > PAE. >=20 How does the below look? This is basically a more generic implementation of Luoqi's idea, but for -CURRENT: %%% Index: kern.pre.mk =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: /home/ncvs/src/sys/conf/kern.pre.mk,v retrieving revision 1.33 diff -u -r1.33 kern.pre.mk --- kern.pre.mk 30 Jul 2003 22:11:36 -0000 1.33 +++ kern.pre.mk 14 Aug 2003 09:39:30 -0000 @@ -91,6 +91,7 @@ # them. =20 MKMODULESENV=3D MAKEOBJDIRPREFIX=3D${.OBJDIR}/modules KMODDIR=3D${KODIR} +MKMODULESENV+=3D KERNOBJDIR=3D${.OBJDIR} .if (${KERN_IDENT} =3D=3D LINT) MKMODULESENV+=3D ALL_MODULES=3DLINT .endif Index: kmod.mk =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: /home/ncvs/src/sys/conf/kmod.mk,v retrieving revision 1.139 diff -u -r1.139 kmod.mk --- kmod.mk 26 Jul 2003 02:27:50 -0000 1.139 +++ kmod.mk 14 Aug 2003 09:42:52 -0000 @@ -241,6 +241,10 @@ ${KMODUNLOAD} -v ${KMOD} .endif =20 +.if defined(KERNOBJDIR) && !empty(KERNOBJDIR) && exists(${KERNOBJDIR}) +.PATH: ${KERNOBJDIR} +CFLAGS+=3D -I${KERNOBJDIR} +.else .for _src in ${SRCS:Mopt_*.h} CLEANFILES+=3D ${_src} .if !target(${_src}) @@ -248,6 +252,7 @@ touch ${.TARGET} .endif .endfor +.endif =20 MFILES?=3D kern/bus_if.m kern/device_if.m dev/iicbus/iicbb_if.m \ dev/iicbus/iicbus_if.m isa/isa_if.m \ %%% Cheers, --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software Ltd, ru@FreeBSD.org FreeBSD committer --yEPQxsgoJgBvi8ip Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE/O15IUkv4P6juNwoRAs8/AJ9u5HQTBuC/dap/p//YnhXaoMhB7ACgg6p7 4uimBzsGKmU9kkhFd0WKyOM= =IX+B -----END PGP SIGNATURE----- --yEPQxsgoJgBvi8ip--