Page MenuHomeFreeBSD

Install llvm-libunwind's unwind headers in /usr/include

Authored by dim on Jan 22 2022, 8:55 PM.



Install llvm-libunwind's unwind headers in /usr/include, and remove
libcxxrt's unwind headers from /usr/include/c++/v1.

This is an initial attempt, and I will request and exp-run first to look
for the inevitable fallout.

Mostly, this is about putting unwind headers in /usr/include, where they
really belong, instead of /usr/include/c++/v1, making them available
only for C++ programs.

But since we build llvm-libunwind's object files for libgcc_eh.a and, it seems to make sense to also use its own headers.

Test Plan

Universe runs, full exp-run, etc.

Diff Detail

rS FreeBSD src repository - subversion
Lint Errors
Errorlib/libc++/Makefile:NAME1Bad Filename
No Unit Test Coverage
Build Status
Buildable 44056
Build 40944: arc lint + arc unit

Event Timeline

dim requested review of this revision.Jan 22 2022, 8:55 PM

Oops, unwind_arm_ehabi.h and unwind_itanium.h have been split off after
llvm 14 branched.

We still need libcxxrt's cxxabi.h file in /usr/include/c++/v1.

FWIW this survived a full make universe on I'll submit an exp-run request.

Seems fine. I think this will (eventually) let me remove some hacks from LLVM ports.

Seems fine. I think this will (eventually) let me remove some hacks from LLVM ports.

I think you'll be using a similar hack to make the ports find unwind.h, like adding -I/usr/include/c++/v1 ?

Right now I've got:

# An unwind.h is require to build.  I think an in-tree one should be used
# but this seems to work as a workaround...
COMPILER_RT_BUILD_DEPENDS=      libunwind>0:devel/libunwind
# Allow unwind.h to be found reliably
COMPILER_RT_USES=       localbase

I suppose we can also remove include/unwind.h
include/unwind.h ≈ contrib/libcxxrt/unwind-itanium.h include/unwind.h

Agree with @brooks I think this is fine. Let's see what the exp-run reports.

I don't think I can test it, all my FreeBSD installations run 13.0-RELEASE.

I had to fix things in libthr when I tried doing this I thought?

So removing include/unwind.h is when you run into the libthr fun. is the branch where I tried this before. At the time we still had some arches not using LLVM libunwind which is what I ran into.