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)
Fri, Mar 22, 9:09 PM
Unknown Object (File)
Jan 12 2024, 3:58 AM
Unknown Object (File)
Jan 8 2024, 4:40 AM
Unknown Object (File)
Jan 4 2024, 10:19 AM
Unknown Object (File)
Nov 14 2023, 11:34 AM
Unknown Object (File)
Nov 11 2023, 2:57 AM
Unknown Object (File)
Nov 10 2023, 6:03 AM
Unknown Object (File)
Nov 8 2023, 6:08 PM
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 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 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.