Re: git: 7ecd99fa424d - main - Build compiler-rt against libunwind, not libcxxrt

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Fri, 11 Mar 2022 17:17:54 UTC
On 3/9/22 2:50 PM, Dimitry Andric wrote:
> On 9 Mar 2022, at 22:45, John Baldwin <jhb@FreeBSD.org> wrote:
>>
>> 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=7ecd99fa424df001028c5cddc52d25b29232f1af
>>> 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.
>>
>> Do we even need the explicit -I at all now that we install unwind.h into /usr/include?
> 
> 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?

I think that can't happen now that we install the header as buildincludes and
installincludes should run first before we build any of the libraries?

> 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?

Yes, I think the problem before is that the installed unwind.h was only in the C++
include path and not in the C include path.  I think moving unwind.h to
/usr/include is what permits removing the explicit -I.

-- 
John Baldwin