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
--00000000000006c99905defe3638 Content-Type: text/plain; charset="UTF-8" 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 > > --00000000000006c99905defe3638 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto"><div><br><br><div class=3D"gmail_quote"><div dir=3D"ltr" = class=3D"gmail_attr">On Sat, May 14, 2022, 1:40 PM Dimitry Andric <<a hr= ef=3D"mailto:dim@freebsd.org">dim@freebsd.org</a>> wrote:<br></div><bloc= kquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #cc= c solid;padding-left:1ex">On 14 May 2022, at 21:07, Warner Losh <<a href= =3D"mailto:imp@bsdimp.com" target=3D"_blank" rel=3D"noreferrer">imp@bsdimp.= com</a>> wrote:<br> > <br> > On Sat, May 14, 2022, 12:00 PM Dimitry Andric <<a href=3D"mailto:di= m@freebsd.org" target=3D"_blank" rel=3D"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). P= ossibly ..?<br> > ><br> > > sys/conf/kmod.mk:LDFLAGS+=3D -d -warn-common<br> > <br> > Ah yes, thanks for spotting that. I think I'll just put in a linke= r<br> > version check, and avoid the option for lld >=3D 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=3D"https://cgit.freebsd.org/src/commit/?id=3D0b3178a45cd08a2387bff0= 9a2844deacc97ae1e7" rel=3D"noreferrer noreferrer" target=3D"_blank">https:/= /cgit.freebsd.org/src/commit/?id=3D0b3178a45cd08a2387bff09a2844deacc97ae1e7= </a><br> <br> where the original comment had "Disallow common variables, and if we e= nd<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=3D"https://sourceware.org/binutils/docs/ld/Options.html#index-comm= on-allocation" rel=3D"noreferrer noreferrer" target=3D"_blank">https://sour= ceware.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<b= r> specified (with '-r'). The script command FORCE_COMMON_ALLOCATION h= as<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 d= ocument 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 >= ;=3D 14,<br> it will just not add the option at all.<br></blockquote></div></div><div di= r=3D"auto"><br></div><div dir=3D"auto">13.1 won't have that check...</d= iv><div dir=3D"auto"><br></div><div dir=3D"auto">Warner=C2=A0</div><div dir= =3D"auto"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" styl= e=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> -Dimitry<br> <br> </blockquote></div></div></div> --00000000000006c99905defe3638--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfr24f=dW1anWSM__iUrGvTaqS2rycyy2nhroM9PQf%2B%2B7Q>