Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Jul 2012 23:36:03 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        Fabian Keil <freebsd-listen@fabiankeil.de>
Cc:        freebsd-hackers@FreeBSD.org, Sean Bruno <seanbru@yahoo-inc.com>
Subject:   Re: dtraceall.ko with old nfsclient
Message-ID:  <4FFF3533.3030006@FreeBSD.org>
In-Reply-To: <20120712214430.02451df7@fabiankeil.de>
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> <alpine.GSO.1.10.1207112007240.18441@multics.mit.edu> <20120712201741.34573af4@fabiankeil.de> <4FFF2171.1030800@FreeBSD.org> <20120712213615.39640d1f@fabiankeil.de> <4FFF27F0.4000106@FreeBSD.org> <20120712214430.02451df7@fabiankeil.de>

next in thread | previous in thread | raw e-mail | index | archive | help
on 12/07/2012 22:44 Fabian Keil said the following:
> Andriy Gapon <avg@FreeBSD.org> wrote:
> 
>> on 12/07/2012 22:36 Fabian Keil said the following:
>>> Andriy Gapon <avg@FreeBSD.org> wrote:
>>> 
>>>> on 12/07/2012 21:17 Fabian Keil said the following:
>>>>> Benjamin Kaduk <kaduk@MIT.EDU> 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





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