Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jan 2011 15:56:36 +0200
From:      Gleb Kurtsou <gleb.kurtsou@gmail.com>
To:        Lev Serebryakov <lev@FreeBSD.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Building "third-party" modules for kernel with debug options?
Message-ID:  <20110107133555.GA12490@tops.skynet.lt>
In-Reply-To: <1241746160.20110107151559@serebryakov.spb.ru>
References:  <1241746160.20110107151559@serebryakov.spb.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
On (07/01/2011 15:15), Lev Serebryakov wrote:
> Hello, Freebsd-hackers.
> 
> 
>   I've found, that "struct bio" is depend on state of "DIAGNOSTIC"
> flag ("options DIAGNOSTIC" in kernel config). But when I build
> third-party GEOM (or any other) module with using of <bsd.kmod.mk>,
> there is no access to these options. So, module, built from ports, can
> fail on user's kernel, even if it built with proper kernel sources in
> "/usr/src/sys". Is here any solution for this problem?
Set KERNBUILDDIR before building module for options to be picked up,
e.g.:

export KERNBUILDDIR=`make -C /sys -V .OBJDIR`/`uname -i`

cd /module/path; make

> 
> P.S. NB: GEOM module is only example, question is about modules &
> kernel options in general, so I put this message on Hackers list.
> 
> -- 
> // Black Lion AKA Lev Serebryakov <lev@FreeBSD.org>
> 
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110107133555.GA12490>