Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 May 2022 21:40:42 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Warner Losh <imp@bsdimp.com>
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:  <E105E013-CA1C-4D53-BBC3-8945CE40031F@FreeBSD.org>
In-Reply-To: <CANCZdfqix7VKCX08_tyO7XLDBpNNB7Nxvw3AqQPjL73dPaNxPA@mail.gmail.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_F4BA942F-87D7-4100-8DBB-F41BBAB651FE
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

On 14 May 2022, at 21:07, Warner Losh <imp@bsdimp.com> wrote:
>=20
> 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+=3D -d -warn-common
>=20
> Ah yes, thanks for spotting that. I think I'll just put in a linker
> version check, and avoid the option for lld >=3D 14.
>=20
>=20
> 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=3D0b3178a45cd08a2387bff09a2844deac=
c97ae1e7

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-allocat=
ion)
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 >=3D 14,
it will just not add the option at all.

-Dimitry


--Apple-Mail=_F4BA942F-87D7-4100-8DBB-F41BBAB651FE
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.2

iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCYoAFugAKCRCwXqMKLiCW
o9MyAKCexx/jGZLJMAs9c3QTMMWkEHWF8gCfQAWHW7VZ6fIMGFUgNes/FNZdr2M=
=74jv
-----END PGP SIGNATURE-----

--Apple-Mail=_F4BA942F-87D7-4100-8DBB-F41BBAB651FE--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E105E013-CA1C-4D53-BBC3-8945CE40031F>