HomeFreeBSD

libllvmminimal: Add missing Support/ABIBreak.cpp

Description

libllvmminimal: Add missing Support/ABIBreak.cpp

When building natively on RISC-V, linking the bootstrap clang-tblgen
fails with:

ld: error: undefined symbol: llvm::EnableABIBreakingChecks
>>> referenced by PrettyStackTrace.cpp
>>>               PrettyStackTrace.o:(.sdata+0x0) in archive
/usr/obj/usr/src/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang/libllvmminimal/libllvmminimal.a
>>> referenced by Signals.cpp
>>>               Signals.o:(.sdata+0x8) in archive
/usr/obj/usr/src/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang/libllvmminimal/libllvmminimal.a
>>> referenced by Timer.cpp
>>>               Timer.o:(.sdata+0x28) in archive
/usr/obj/usr/src/freebsd-src/riscv.riscv64/tmp/obj-tools/lib/clang/libllvmminimal/libllvmminimal.a

This is likely due to Error.h's inclusion of abi-breaking.h. It's
unclear why this only affects RISC-V, but perhaps relates to its more
eager use of .sdata due to the ABI's support for linker relaxations.
Regardless, this is theoretically an issue for all architectures.

Reported by: Dennis Clarke <dclarke@blastwave.org>
Reviewed by: dim
Tested by: mhorne
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D28367

(cherry picked from commit 48397f6c7d2d693602105d8ec24c5741202e264d)

Details

Provenance
jrtc27Authored on Jan 27 2021, 7:19 PM
dimCommitted on Dec 25 2021, 11:50 AM
Reviewer
dim
Differential Revision
D28367: libllvmminimal: Add missing Support/ABIBreak.cpp
Parents
rGaefe88f9e300: Fix clang assertion when compiling the devel/onetbb port
Branches
Unknown
Tags
Unknown