From nobody Thu Dec 07 06:16:24 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sm3vC2kDvz53h5F for ; Thu, 7 Dec 2023 06:16:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Sm3vC0yJLz3ZcB for ; Thu, 7 Dec 2023 06:16:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-a1b75f59a12so60851766b.3 for ; Wed, 06 Dec 2023 22:16:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1701929796; x=1702534596; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=T5sL+go+dGUKMTcM40caYKAD13BJJcft3wrFe2BU11Y=; b=UJb847H/MxwtWh1q544/mfXzurt+teWR7em2fLjHmQR4zrjUoEwGD1LX/ZKEOGj9m0 E2Z+tO3N6AilinUZ7ScHvCxswlh2Mk9CMwrF1QpdPlh2gvTOcjOzd49ImiB14tJDEphV aYxQQGgd4ekQm+O6t2YUiDGo2YpgzcwnAMlPMq9EPkz5stAbxds+fGZMyLmnoxIjkOS3 E3Cfp2oDDvdfkCjBx74Xze0rmDUINBis/QKF5jCXL0RtkV8KeXwcW/gSyWtdeUvR9c1V GtccFYY0Cdjl3GCIEk8TRT2EfMZXr8xLGNJtoqOzgw4Q+MjlonIJjOONcD29Hbcv5co8 GCHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701929796; x=1702534596; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=T5sL+go+dGUKMTcM40caYKAD13BJJcft3wrFe2BU11Y=; b=sRsGOLwtvQcQDj8E0JB3FUpew/7nVZmmAoEmPx0vm44rFHq5FKjwfnz4S4H+HCWmo0 kSpUv8SzbX2XhkTunjOeWdWtbSESLnM1n9cAc+p7QSG2/mwjPr0Iexfokff6muWbKp2p 1AHr6HBFHesirSwU7EKdz8MCl/JTVGSjbYyTr03HOD/XG5DKlvOuKeHxMSTOf9JBLh+K 7RhWsCcp0EY1/FKJ+IrFpl/YBqNruw+qEYgACscpf6tRqlHifU2wHcWyE4fvqiWT6Rpl llr7hdiBaLmjPImgEgxfN5nfpQV1DoQfwITPK1lRsB/zAXezNCEQF+5h+0RRruaez2bQ HwcA== X-Gm-Message-State: AOJu0Yyoz2yX9eTwasHKJbLXojSJn9hvAl0r+BFvYXCTq42VDM+P5Jqh l8WzX2WbOsP4IGz5KQXTsdAnSydqGp/bTkFN96S3CA== X-Google-Smtp-Source: AGHT+IFUgLCjBEGCW3HAv/v3BUBBT9wgbfQZuOYoNbLJP9Li44sXh3b5bemKfrrIggwWsEazO4UVFUB7m6v2PAAl/i8= X-Received: by 2002:a17:906:1311:b0:a1d:157d:efce with SMTP id w17-20020a170906131100b00a1d157defcemr539472ejb.106.1701929796111; Wed, 06 Dec 2023 22:16:36 -0800 (PST) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 References: <202312070235.3B72ZoZp043061@gitrepo.freebsd.org> <71239.1701921562@kaos.jnpr.net> <58331.1701924865@kaos.jnpr.net> In-Reply-To: <58331.1701924865@kaos.jnpr.net> From: Warner Losh Date: Wed, 6 Dec 2023 23:16:24 -0700 Message-ID: Subject: Re: git: 83d0b8c089d8 - main - bsdinstall generate opt_osname.h in include To: "Simon J. Gerraty" Cc: Jessica Clarke , src-committers , "" , "" Content-Type: multipart/alternative; boundary="000000000000ee225b060be56852" X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4Sm3vC0yJLz3ZcB --000000000000ee225b060be56852 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Dec 6, 2023, 9:55 PM Simon J. Gerraty wrote: > Jessica Clarke wrote: > > > Warner Losh wrote: > > >> Silly question: why not just add it to CFLAGS with > > >> -DOSNAME=3D\"${OSNAME}\" rather than generating this file? > > > > > > Actually it is an excellent question - I've no idea why opt_osname.h = is > > > needed. > > > > To quote the motivation from brd@=E2=80=99s original review: > > > > > The reason I did it using a file is so that make(1) would detect a > > > change a rebuild if you change the value and do another build. > > A fair point. Of course moot if using META_MODE. > The other benefit of the header is only the files that include it will > be rebuilt when the value changes whereas (with META_MODE) everything > will be rebuilt if value is in CFLAGS. > > That can be mitigated by using per object CFLAGS, but all in all the > header is a simpler solution. > This name never changes on practice. We shouldn't optimize for a rare case that causes build races. Who would ever change it in the same tree? Warner --sjg > --000000000000ee225b060be56852 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed, Dec 6, 2023, 9:55 PM Simon J. Gerraty <sjg@juniper.net> wrote:
Jessica Clarke <jrtc27@freebsd.org> wr= ote:
> > Warner Losh <imp@bsdimp.com> wrote:
> >> Silly question: why not just add it to CFLAGS with
> >> -DOSNAME=3D\"${OSNAME}\" rather than generating thi= s file?
> >
> > Actually it is an excellent question - I've no idea why opt_o= sname.h is
> > needed.
>
> To quote the motivation from brd@=E2=80=99s original review:
>
> > The reason I did it using a file is so that make(1) would detect = a
> > change a rebuild if you change the value and do another build.
A fair point.=C2=A0 Of course moot if using META_MODE.
The other benefit of the header is only the files that include it will
be rebuilt when the value changes whereas (with META_MODE) everything
will be rebuilt if value is in CFLAGS.

That can be mitigated by using per object CFLAGS, but all in all the
header is a simpler solution.

This name never changes on practice.=C2=A0 We = shouldn't optimize for a rare case that causes build races. Who would e= ver change it in the same tree?

Warner=C2=A0

<= div class=3D"gmail_quote">
--sjg
--000000000000ee225b060be56852--