Date: Sat, 14 May 2022 13:58:01 -0600 From: Warner Losh <imp@bsdimp.com> To: Dimitry Andric <dim@freebsd.org> Cc: "Bjoern A. Zeeb" <bz@freebsd.org>, src-committers <src-committers@freebsd.org>, "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>, dev-commits-src-main@freebsd.org Subject: Re: git: 3a9a9c0ca44e - main - Merge llvm-project release/14.x llvmorg-14.0.3-0-g1f9140064dfb Message-ID: <CANCZdfr24f=dW1anWSM__iUrGvTaqS2rycyy2nhroM9PQf%2B%2B7Q@mail.gmail.com> In-Reply-To: <E105E013-CA1C-4D53-BBC3-8945CE40031F@FreeBSD.org> References: <202205141150.24EBoNnp024476@gitrepo.freebsd.org> <alpine.BSF.2.00.2205141708150.68830@ai.fobar.qr> <4ADA9C8C-FE58-439A-B8B4-C04F6E207FE5@FreeBSD.org> <CANCZdfqix7VKCX08_tyO7XLDBpNNB7Nxvw3AqQPjL73dPaNxPA@mail.gmail.com> <E105E013-CA1C-4D53-BBC3-8945CE40031F@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] 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). 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 > > [-- Attachment #2 --] <div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, May 14, 2022, 1:40 PM Dimitry Andric <<a href="mailto:dim@freebsd.org">dim@freebsd.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 14 May 2022, at 21:07, Warner Losh <<a href="mailto:imp@bsdimp.com" target="_blank" rel="noreferrer">imp@bsdimp.com</a>> wrote:<br> > <br> > On Sat, May 14, 2022, 12:00 PM Dimitry Andric <<a href="mailto:dim@freebsd.org" target="_blank" rel="noreferrer">dim@freebsd.org</a>> wrote:<br> > On 14 May 2022, at 19:11, Bjoern A. Zeeb <bz@FreeBSD.org> wrote:<br> > ...<br> > > I haven't checked where they come from yet (given make -s). Possibly ..?<br> > ><br> > > sys/conf/kmod.mk:LDFLAGS+= -d -warn-common<br> > <br> > Ah yes, thanks for spotting that. I think I'll just put in a linker<br> > version check, and avoid the option for lld >= 14.<br> > <br> > <br> > Two items : do we need it at all?<br> <br> It's a bit of an obscure option, introduced way back in 2002:<br> <br> <a href="https://cgit.freebsd.org/src/commit/?id=0b3178a45cd08a2387bff09a2844deacc97ae1e7" rel="noreferrer noreferrer" target="_blank">https://cgit.freebsd.org/src/commit/?id=0b3178a45cd08a2387bff09a2844deacc97ae1e7</a><br> <br> where the original comment had "Disallow common variables, and if we end<br> up with commons from somewhere unexpected, allocate storage for them in<br> the module itself."<br> <br> BFD ld's docs<br> (<a href="https://sourceware.org/binutils/docs/ld/Options.html#index-common-allocation" rel="noreferrer noreferrer" target="_blank">https://sourceware.org/binutils/docs/ld/Options.html#index-common-allocation</a>)<br> say:<br> <br> "assign space to common symbols even if a relocatable output file is<br> specified (with '-r'). The script command FORCE_COMMON_ALLOCATION has<br> the same effect."<br> <br> Since lld implements it as a no-op, and everything appears to work just<br> fine, I'd only keep it in for now for people that want to use gcc in<br> combination with BFD ld for building their modules.<br> <br> <br> > 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...<br> <br> It shouldn't, as I'm putting in a check for the lld version. If >= 14,<br> it will just not add the option at all.<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">13.1 won't have that check...</div><div dir="auto"><br></div><div dir="auto">Warner </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> -Dimitry<br> <br> </blockquote></div></div></div>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfr24f=dW1anWSM__iUrGvTaqS2rycyy2nhroM9PQf%2B%2B7Q>
