Page MenuHomeFreeBSD

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

Authored by dim on Jan 22 2022, 8:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Nov 25, 7:20 PM
Unknown Object (File)
Nov 20 2024, 9:43 AM
Unknown Object (File)
Nov 18 2024, 9:49 AM
Unknown Object (File)
Nov 14 2024, 2:44 AM
Unknown Object (File)
Nov 3 2024, 9:01 PM
Unknown Object (File)
Oct 18 2024, 4:09 PM
Unknown Object (File)
Oct 1 2024, 1:37 PM
Unknown Object (File)
Sep 9 2024, 12:01 AM
Subscribers

Details

Summary

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
libgcc_s.so, it seems to make sense to also use its own headers.

Test Plan

Universe runs, full exp-run, etc.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Errors
SeverityLocationCodeMessage
Errorlib/libc++/Makefile:NAME1Bad Filename
Unit
No Test Coverage
Build Status
Buildable 44053
Build 40941: 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 universe14b.freebsd.org. 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.

https://github.com/freebsd/freebsd-src/compare/master...bsdjhb:unwind_h 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.