Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Mar 2022 23:55:05 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org>
Subject:   Re: git: 7ecd99fa424d - main - Build compiler-rt against libunwind, not libcxxrt
Message-ID:  <4CAF0FAE-3D29-42CD-97F9-057C3A3FEA8A@FreeBSD.org>
In-Reply-To: <1129443B-EFC8-4F02-B87E-37CA04A0AD64@FreeBSD.org>
References:  <202203092130.229LUKFS011484@gitrepo.freebsd.org> <1eb62898-4f0a-504f-26a8-ee01c46093a6@FreeBSD.org> <1129443B-EFC8-4F02-B87E-37CA04A0AD64@FreeBSD.org>

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

--Apple-Mail=_82E6CE75-5504-418D-840E-F6896A321539
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

On 9 Mar 2022, at 23:50, Dimitry Andric <dim@FreeBSD.org> wrote:
>=20
> On 9 Mar 2022, at 22:45, John Baldwin <jhb@FreeBSD.org> wrote:
>>=20
>> On 3/9/22 1:30 PM, Dimitry Andric wrote:
>>> The branch main has been updated by dim:
>>> URL: =
https://cgit.FreeBSD.org/src/commit/?id=3D7ecd99fa424df001028c5cddc52d25b2=
9232f1af
>>> commit 7ecd99fa424df001028c5cddc52d25b29232f1af
>>> Author:     Dimitry Andric <dim@FreeBSD.org>
>>> AuthorDate: 2022-03-09 21:23:35 +0000
>>> Commit:     Dimitry Andric <dim@FreeBSD.org>
>>> CommitDate: 2022-03-09 21:23:35 +0000
>>>    Build compiler-rt against libunwind, not libcxxrt
>>>         Parts of compiler-rt are also built for libgcc_eh and =
libgcc_s, and
>>>    these were already pointing to the libunwind unwind.h. For the =
sake of
>>>    consistency, also build compiler-rt itself against the libunwind
>>>    unwind.h, not the libcxxrt one.
>>=20
>> Do we even need the explicit -I at all now that we install unwind.h =
into /usr/include?
>=20
> That depends on the build order; if libcompiler_rt is built before =
libunwind's headers are installed into ${WORLDTMP}, it might look at the =
wrong file?
>=20
> I guess this is just a 'better safe than sorry' approach. That said, =
for libcxxrt we used to have the unwind headers only in the C++ include =
path, so maybe this was a way to get that to work?

Btw, I was triggered by Conrad's comment in =
contrib/llvm-project/compiler-rt/lib/builtins/gcc_personality_v0.c =
(added in https://cgit.freebsd.org/src/commit/?id=3Dc8b5e3de39bcf):

/*
 * XXX On FreeBSD, this file is compiled into three libraries:
 *   - libcompiler_rt
 *   - libgcc_eh
 *   - libgcc_s
 *
 * In the former, the include path points to the =
contrib/libcxxrt/unwind-arm.h
 * copy of unwind.h.  In the latter, the include path points to the
 * contrib/libunwind/include/unwind.h header (LLVM libunwind).
 *
 * Neither (seemingly redundant) variant of unwind.h needs the =
redefinitions
 * provided in the "helpful" header below, and libcxxrt's unwind-arm.h =
provides
 * *no* useful distinguishing macros, so just forcibly disable the =
helper
 * header on FreeBSD.
 */

So at least there is no more inconsistency now! Whether commit =
c8b5e3de39bcf can be reverted is another matter, though.

-Dimitry


--Apple-Mail=_82E6CE75-5504-418D-840E-F6896A321539
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

iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCYikwSQAKCRCwXqMKLiCW
ozCsAKDcWnF8uiZlGa34aZURx+Ay5wMmrQCdGSlchOQxOP4TgmZUte7HG3P02Ro=
=LHes
-----END PGP SIGNATURE-----

--Apple-Mail=_82E6CE75-5504-418D-840E-F6896A321539--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CAF0FAE-3D29-42CD-97F9-057C3A3FEA8A>