From owner-freebsd-arch@FreeBSD.ORG Fri Mar 6 10:48:37 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 43E42106566B; Fri, 6 Mar 2009 10:48:37 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.25]) by mx1.freebsd.org (Postfix) with ESMTP id 960988FC14; Fri, 6 Mar 2009 10:48:36 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ey-out-2122.google.com with SMTP id d26so35182eyd.7 for ; Fri, 06 Mar 2009 02:48:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-pgp-agent:x-mailer; bh=Tbm8LnYU9w1Y94R/m1Z/EchdiyxaaZjH/vuvjoxP430=; b=IurrtF7ODycL5Lfo1EtRu5FHKLbWx5CvtVzgIzYqc+nPHLDJpL0z9hOGlABQPmSF+y Ie+oN81EZ3dZun45uUZfa1z8OeMACepRSinmGrg0PtOtJ3qXkC0NC1JuTX6RhQ4NAjDP 2K6uD+3N0Z4sLTeVkIeWrIZ893Wp7IMd2yx/Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-pgp-agent:x-mailer; b=f9aqxo9Lnv8I+8YNHGt3U3SAcbIk7zHSz+W+a5VSlnYXP+j37+ODJMRcV8g5vPfX4A 3kxzGhM2piMwFxjeSz/ZU4NzyXG3fw7SDtgKqbL07DJK3RyeIVT92KVd+fYCsaGS9du7 CcnoGOgJfU+tYwSHLBbWVau/2/icto5M9F6+M= Received: by 10.216.0.206 with SMTP id 56mr1180502web.102.1236336515643; Fri, 06 Mar 2009 02:48:35 -0800 (PST) Received: from epsilon.lan (bl6-147-236.dsl.telepac.pt [82.155.147.236]) by mx.google.com with ESMTPS id h6sm2075304nfh.15.2009.03.06.02.48.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 06 Mar 2009 02:48:35 -0800 (PST) Message-Id: <7B12E246-F284-4436-BDAD-5263769E339E@gmail.com> From: Rui Paulo To: John Baldwin In-Reply-To: <200903051041.10678.jhb@freebsd.org> Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-3-331275001" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Fri, 6 Mar 2009 10:48:32 +0000 References: <200903051041.10678.jhb@freebsd.org> X-Pgp-Agent: GPGMail 1.2.0 (v56) X-Mailer: Apple Mail (2.930.3) Cc: arch@freebsd.org Subject: Re: [PATCH] Set SYSDIR for modules built with kernel X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2009 10:48:37 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --Apple-Mail-3-331275001 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On 5 Mar 2009, at 15:41, John Baldwin wrote: > One of the things each kernel module build has to do is figure out > where the > source tree it belongs to lives. /usr/share/mk/bsd.kmod.mk uses a > heuristic > where it walks up N levels of the tree looking for a kernel source > directory. > If that fails it falls back to /sys or /usr/src/sys. One side > effect of this > (besides lots of directory lookups during a build as each kernel > module build > stage has to do this) is that if CURRENT adds an even deeper level > of nesting > (such as with the recent ata chipset modules) then you can't build a > kernel > with those modules until /usr/share/mk/bsd.kmod.mk on your build > machine has > been updated. This means you can't build an 8.0 kernel on 7.0 > simply because > ata chipset modules don't find the right headers. > > However, the SYSDIR is already known during a kernel build (we > depend on this > to make modules built in ports DTRT when they are rebuilt via > buildkernel). > I just changed the kernel build Makefile to always set SYSDIR. With > this > change, I was able to build an 8.0 kernel + modules on a 7.1-ish > machine with > an unpatched /usr/share/mk/bsd.kmod.mk. This should also have the > side > effect of reducing the number of pathname lookup operations done > during a > kernel build with modules. > > Thoughts? I think this should go in. Thanks. -- Rui Paulo --Apple-Mail-3-331275001 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) iEYEARECAAYFAkmw/4AACgkQfD8M/ASTygJXbgCdEBz+J9Vh18DoTYsVCMX/jHkm 97sAnjD0A9+eJSxEc/UltRdqHwHCxZ2A =HWcQ -----END PGP SIGNATURE----- --Apple-Mail-3-331275001--