From owner-svn-src-head@freebsd.org Tue Jul 3 18:21:21 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F24D103A87C; Tue, 3 Jul 2018 18:21:21 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C4482902E2; Tue, 3 Jul 2018 18:21:20 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: from mail-it0-f47.google.com (mail-it0-f47.google.com [209.85.214.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) (Authenticated sender: mmacy) by smtp.freebsd.org (Postfix) with ESMTPSA id 8C28E162DF; Tue, 3 Jul 2018 18:21:20 +0000 (UTC) (envelope-from mmacy@freebsd.org) Received: by mail-it0-f47.google.com with SMTP id j185-v6so4215857ite.1; Tue, 03 Jul 2018 11:21:20 -0700 (PDT) X-Gm-Message-State: APt69E3VF0NOGEoiK/VADCoiWsqLCbugeVYZ8DNOD2TyK76YoIKIzorD URAY2NFYrwKAJVqg2PnPP+RSn4yGMq09i216AMw= X-Google-Smtp-Source: AAOMgpeXW/IKulJ3RKBlnd4oSQXCgo6I7ha7jDO7w6WSQBOfDrsh476ZSnmpMeHCZCsxd8GS54nAT0/pCG528A0ewl0= X-Received: by 2002:a24:6c8a:: with SMTP id w132-v6mr13829495itb.4.1530642080109; Tue, 03 Jul 2018 11:21:20 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:8d2:0:0:0:0:0 with HTTP; Tue, 3 Jul 2018 11:21:19 -0700 (PDT) In-Reply-To: References: <201807030250.w632o7Oa035010@repo.freebsd.org> From: Matthew Macy Date: Tue, 3 Jul 2018 11:21:19 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r335880 - in head/sys: conf kern To: Bryan Drewery Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2018 18:21:21 -0000 What is the "correct" way to make sure that offset.inc is visible to modules? On Tue, Jul 3, 2018 at 10:39 AM, Bryan Drewery wrote: > On 7/2/2018 7:50 PM, Matt Macy wrote: >> Author: mmacy >> Date: Tue Jul 3 02:50:07 2018 >> New Revision: 335880 >> URL: https://svnweb.freebsd.org/changeset/base/335880 >> >> Log: >> expose thread_lite definition to tied modules >> >> Modified: >> head/sys/conf/kmod.mk >> head/sys/kern/genoffset.sh >> >> Modified: head/sys/conf/kmod.mk >> ============================================================================== >> --- head/sys/conf/kmod.mk Tue Jul 3 01:55:09 2018 (r335879) >> +++ head/sys/conf/kmod.mk Tue Jul 3 02:50:07 2018 (r335880) >> @@ -463,9 +463,10 @@ acpi_quirks.h: ${SYSDIR}/tools/acpi_quirks2h.awk ${SYS >> .endif >> >> .if !empty(SRCS:Massym.inc) || !empty(DPSRCS:Massym.inc) >> -CLEANFILES+= assym.inc genassym.o >> -DEPENDOBJS+= genassym.o >> +CLEANFILES+= assym.inc genassym.o genoffset.o >> +DEPENDOBJS+= genassym.o genoffset.o >> assym.inc: genassym.o >> +offset.inc: genoffset.o >> .if defined(KERNBUILDDIR) >> genassym.o: opt_global.h >> .endif >> @@ -475,6 +476,12 @@ genassym.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c >> genassym.o: ${SRCS:Mopt_*.h} >> ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ >> ${SYSDIR}/${MACHINE}/${MACHINE}/genassym.c >> +offset.inc: ${SYSDIR}/kern/genoffset.sh genoffset.o >> + sh ${SYSDIR}/kern/genoffset.sh genoffset.o > ${.TARGET} >> +genoffset.o: ${SYSDIR}/${MACHINE}/${MACHINE}/genoffset.c >> +genoffset.o: ${SRCS:Mopt_*.h} >> + ${CC} -c ${CFLAGS:N-flto:N-fno-common} \ >> + ${SYSDIR}/${MACHINE}/${MACHINE}/genoffset.c > > Why is this using machine-specific genoffset.c but kern.post.mk uses the > global genoffset.c? > > And what even generates the machine-specific genoffset.c file? I see no > rule for it anywhere. > >> .endif >> >> .if defined(KERNBUILDDIR) >> >> Modified: head/sys/kern/genoffset.sh >> ============================================================================== >> --- head/sys/kern/genoffset.sh Tue Jul 3 01:55:09 2018 (r335879) >> +++ head/sys/kern/genoffset.sh Tue Jul 3 02:50:07 2018 (r335880) >> @@ -39,7 +39,7 @@ work() >> { >> echo "#ifndef _OFFSET_INC_" >> echo "#define _OFFSET_INC_" >> - echo "#if !defined(GENOFFSET) && !defined(KLD_MODULE)" >> + echo "#if !defined(GENOFFSET) && (!defined(KLD_MODULE) || defined(KLD_TIED))" >> ${NM:='nm'} ${NMFLAGS} "$1" | ${AWK:='awk'} ' >> / C .*_datatype_*/ { >> type = substr($3, match($3, "_datatype_") + length("_datatype_")) >> > > > -- > Regards, > Bryan Drewery >