From nobody Sat May 14 19:58:01 2022 X-Original-To: dev-commits-src-main@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 8A5C91ADDB2A for ; Sat, 14 May 2022 19:58:14 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-ua1-x92b.google.com (mail-ua1-x92b.google.com [IPv6:2607:f8b0:4864:20::92b]) (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 4L0xC95hvYz4VKl for ; Sat, 14 May 2022 19:58:13 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-ua1-x92b.google.com with SMTP id s1so4422683uac.6 for ; Sat, 14 May 2022 12:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Wom3cLVSVXaUUy3zpsAnolqUrJtQ98RuuD9JN1QIGjU=; b=OqC07VK0ITt9467ij00HmR7z5CA7SjgoTcl/7J/jtAqwY0XLilZiyAGDanJuIeMWK6 xjim/15fWUYlj1oli8NuBF3M87Y98dTyXqGALqixqyOi6vbyRG7q0w2jg+BdKcS3PqN0 RZOQHFEV8ZAG/7sJzodyaYCaNRAn/VbcR9/GXLa+tU8tnar+3Xm19CTSynPqIhfwY9tr yTzEjFJetQm2AysVOaEY+siWBLvChZty52PurZ81HD5Th/iOOzzJz41NpP8JkcUCipDE gxJnBhQ841fJUv9C4JzLKCq3ernZklMkT2FASuOuJAtLLjiDJyHaB93kdV2ndRprKXJK 9bcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Wom3cLVSVXaUUy3zpsAnolqUrJtQ98RuuD9JN1QIGjU=; b=MDgpUQ0AJuQ2M3hRdo4e/zZhDbgRoI6hDYTDXaYSZTXPkZmUWn+E9MW+Z458iWt9Mw KFV4MnZbJGYGsYM6MRcN0aoNSKD90j7W+yh7w9mxhFInA5uKT6xtkgVoIScDkmfGZ4h9 cyk22nEg9HdlSQNPYB4VObpfjkm+8Xvfn0htPExLLj8MXtVhodHL74FhodZeB6VCz4kQ JzdZHdTy+3QELK+KLq5APwly1zFNZwCNQ7vKY520cm6atVFyFtYFur3XIcjyxPy6ucZX ngfDt52ojhYAjDmeYFAs7flUqm4lkDezliyFCPJbPMdgPTx9S38oZ/2p6r6FAobls8Dk BKkg== X-Gm-Message-State: AOAM533eYHqw3cwNXrfcPs7hihEFEV5vsCJZ73MiIpkShOReqgvWXjK8 zhHQFZPnfPChque4rMQhM7LlS3FxCS2WiPmf+OzxlaYFE1w= X-Google-Smtp-Source: ABdhPJwwS7UO/mKR5jkDN+ALo/cVz/sHQXe+FIJh6mPcnI9NstEvsazx61Zbizf4gpPRMEpgfXRppPb3cIIsYCvtrWg= X-Received: by 2002:ab0:651a:0:b0:362:9d9a:8a9d with SMTP id w26-20020ab0651a000000b003629d9a8a9dmr4223955uam.66.1652558293020; Sat, 14 May 2022 12:58:13 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 References: <202205141150.24EBoNnp024476@gitrepo.freebsd.org> <4ADA9C8C-FE58-439A-B8B4-C04F6E207FE5@FreeBSD.org> In-Reply-To: From: Warner Losh Date: Sat, 14 May 2022 13:58:01 -0600 Message-ID: Subject: Re: git: 3a9a9c0ca44e - main - Merge llvm-project release/14.x llvmorg-14.0.3-0-g1f9140064dfb To: Dimitry Andric Cc: "Bjoern A. Zeeb" , src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000006c99905defe3638" X-Rspamd-Queue-Id: 4L0xC95hvYz4VKl X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20210112.gappssmtp.com header.s=20210112 header.b=OqC07VK0; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::92b) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.97 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.980]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20210112.gappssmtp.com:s=20210112]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20210112.gappssmtp.com:+]; NEURAL_HAM_SHORT(-0.99)[-0.992]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::92b:from]; MLMMJ_DEST(0.00)[dev-commits-src-main]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; R_SPF_NA(0.00)[no SPF record]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N --00000000000006c99905defe3638 Content-Type: text/plain; charset="UTF-8" On Sat, May 14, 2022, 1:40 PM Dimitry Andric wrote: > On 14 May 2022, at 21:07, Warner Losh wrote: > > > > On Sat, May 14, 2022, 12:00 PM Dimitry Andric wrote: > > On 14 May 2022, at 19:11, Bjoern A. Zeeb wrote: > > ... > > > I haven't checked where they come from yet (given make -s). Possibly > ..? > > > > > > sys/conf/kmod.mk:LDFLAGS+= -d -warn-common > > > > Ah yes, thanks for spotting that. I think I'll just put in a linker > > version check, and avoid the option for lld >= 14. > > > > > > Two items : do we need it at all? > > It's a bit of an obscure option, introduced way back in 2002: > > > https://cgit.freebsd.org/src/commit/?id=0b3178a45cd08a2387bff09a2844deacc97ae1e7 > > where the original comment had "Disallow common variables, and if we end > up with commons from somewhere unexpected, allocate storage for them in > the module itself." > > BFD ld's docs > ( > https://sourceware.org/binutils/docs/ld/Options.html#index-common-allocation > ) > say: > > "assign space to common symbols even if a relocatable output file is > specified (with '-r'). The script command FORCE_COMMON_ALLOCATION has > the same effect." > > Since lld implements it as a no-op, and everything appears to work just > fine, I'd only keep it in for now for people that want to use gcc in > combination with BFD ld for building their modules. > > > > Won't this make build stable/13 noisy in same cases? We can just > document it since it wouldn't be the mainline build, but it will come up... > > It shouldn't, as I'm putting in a check for the lld version. If >= 14, > it will just not add the option at all. > 13.1 won't have that check... Warner > -Dimitry > > --00000000000006c99905defe3638 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sat, May 14, 2022, 1:40 PM Dimitry Andric <dim@freebsd.org> wrote:
On 14 May 2022, at 21:07, Warner Losh <imp@bsdimp.= com> wrote:
>
> On Sat, May 14, 2022, 12:00 PM Dimitry Andric <dim@freebsd.org>= wrote:
> On 14 May 2022, at 19:11, Bjoern A. Zeeb <bz@FreeBSD.org> wrote:=
> ...
> > I haven't checked where they come from yet (given make -s). P= ossibly ..?
> >
> > sys/conf/kmod.mk:LDFLAGS+=3D -d -warn-common
>
> Ah yes, thanks for spotting that. I think I'll just put in a linke= r
> version check, and avoid the option for lld >=3D 14.
>
>
> Two items : do we need it at all?

It's a bit of an obscure option, introduced way back in 2002:

https:/= /cgit.freebsd.org/src/commit/?id=3D0b3178a45cd08a2387bff09a2844deacc97ae1e7=

where the original comment had "Disallow common variables, and if we e= nd
up with commons from somewhere unexpected, allocate storage for them in
the module itself."

BFD ld's docs
(https://sour= ceware.org/binutils/docs/ld/Options.html#index-common-allocation)
say:

"assign space to common symbols even if a relocatable output file is specified (with '-r'). The script command FORCE_COMMON_ALLOCATION h= as
the same effect."

Since lld implements it as a no-op, and everything appears to work just
fine, I'd only keep it in for now for people that want to use gcc in combination with BFD ld for building their modules.


> Won't this make build stable/13 noisy in same cases? We can just d= ocument it since it wouldn't be the mainline build, but it will come up= ...

It shouldn't, as I'm putting in a check for the lld version. If >= ;=3D 14,
it will just not add the option at all.

13.1 won't have that check...

Warner=C2=A0
-Dimitry

--00000000000006c99905defe3638--