From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 12 20:36:07 2012 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B541B106566B for ; Thu, 12 Jul 2012 20:36:07 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 0333B8FC18 for ; Thu, 12 Jul 2012 20:36:06 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA26879; Thu, 12 Jul 2012 23:36:04 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1SpQ7I-00079I-8S; Thu, 12 Jul 2012 23:36:04 +0300 Message-ID: <4FFF3533.3030006@FreeBSD.org> Date: Thu, 12 Jul 2012 23:36:03 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:13.0) Gecko/20120620 Thunderbird/13.0.1 MIME-Version: 1.0 To: Fabian Keil References: <1341863341.6064.11.camel@powernoodle.corp.yahoo.com> <4FFB4770.7050209@FreeBSD.org> <20120710154128.192eb8d6@fabiankeil.de> <1341939155.2573.8.camel@powernoodle.corp.yahoo.com> <20120710205702.5e57168b@fabiankeil.de> <4FFC8479.9080608@FreeBSD.org> <20120711122935.1382e76d@fabiankeil.de> <20120712201741.34573af4@fabiankeil.de> <4FFF2171.1030800@FreeBSD.org> <20120712213615.39640d1f@fabiankeil.de> <4FFF27F0.4000106@FreeBSD.org> <20120712214430.02451df7@fabiankeil.de> In-Reply-To: <20120712214430.02451df7@fabiankeil.de> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org, Sean Bruno Subject: Re: dtraceall.ko with old nfsclient X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jul 2012 20:36:07 -0000 on 12/07/2012 22:44 Fabian Keil said the following: > Andriy Gapon wrote: > >> on 12/07/2012 22:36 Fabian Keil said the following: >>> Andriy Gapon wrote: >>> >>>> on 12/07/2012 21:17 Fabian Keil said the following: >>>>> Benjamin Kaduk wrote: >>>>> >>>>>> On Wed, 11 Jul 2012, Fabian Keil wrote: >>>>>> >>>>>>> I'm using the following modification of Sean's patch: >>>>> >>>>> This way it seems to work as expected: >>>>> >>>>> diff --git a/sys/modules/dtrace/dtraceall/Makefile >>>>> b/sys/modules/dtrace/dtraceall/Makefile index 456efd1..628583b >>>>> 100644 --- a/sys/modules/dtrace/dtraceall/Makefile +++ >>>>> b/sys/modules/dtrace/dtraceall/Makefile @@ -1,7 +1,7 @@ # $FreeBSD: >>>>> src/sys/modules/dtrace/dtraceall/Makefile,v 1.3 2011/04/09 >>>>> 09:07:31 uqs Exp $ >>>>> >>>>> KMOD= dtraceall -SRCS= dtraceall.c opt_compat.h >>>>> +SRCS= dtraceall.c opt_compat.h opt_nfs.h >>>>> >>>>> CFLAGS+= -I${.CURDIR}/../../.. >>>>> >>>> >>>> If you do cd sys/modules/dtrace/dtraceall && make [obj depend] all, >>>> does it compile OK with the above change? >>> >>> Depends on your expectations I guess. As neither NFS-related option >>> gets defined, no dependency on either NFS module is registered. The >>> compiler has no complaints, though. >> >> Interesting. Could you repeat after sufficient cleaning up? I am not >> sure where from opt_nfs.h file could come. > > The Makefile seems to create an empty one: > > fk@r500 /usr/src/sys/modules/dtrace/dtraceall $make clean rm -f export_syms > dtraceall.ko dtraceall.kld dtraceall.o dtraceall.ko.debug > dtraceall.ko.symbols opt_compat.h opt_nfs.h fk@r500 > /usr/src/sys/modules/dtrace/dtraceall $make echo "#define COMPAT_FREEBSD32 > 1" >> opt_compat.h :> opt_nfs.h cc -O2 -pipe [...] -c > /usr/src/sys/modules/dtrace/dtraceall/dtraceall.c ld -d -warn-common -r -d > -o dtraceall.ko.debug dtraceall.o :> export_syms awk -f > /usr/src/sys/modules/dtrace/dtraceall/../../../conf/kmod_syms.awk > dtraceall.ko.debug export_syms | xargs -J% objcopy % dtraceall.ko.debug > objcopy --only-keep-debug dtraceall.ko.debug dtraceall.ko.symbols objcopy > --strip-debug --add-gnu-debuglink=dtraceall.ko.symbols dtraceall.ko.debug > dtraceall.ko Ah, correct. I now even see the relevant snippet in kmod.mk: .for _src in ${SRCS:Mopt_*.h} CLEANFILES+= ${_src} .if !target(${_src}) ${_src}: :> ${.TARGET} .endif .endfor It's only when we want those file to be not empty (have some options) that we define any targets for them (like COMPAT_FREEBSD32 in the dtraceall Makefile). Sorry for the noise. -- Andriy Gapon