Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Aug 2026 18:04:55 +0000
From:      Jessica Clarke <jrtc27@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 2705320b7c82 - stable/14 - libllvmminimal: Fix building with LLVM < 21 on riscv64
Message-ID:  <6a74ccc7.32624.66167602@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/14 has been updated by jrtc27:

URL: https://cgit.FreeBSD.org/src/commit/?id=2705320b7c820f77ca1f6afabadbb5d3ef9a1e90

commit 2705320b7c820f77ca1f6afabadbb5d3ef9a1e90
Author:     Jessica Clarke <jrtc27@FreeBSD.org>
AuthorDate: 2026-07-06 16:25:48 +0000
Commit:     Jessica Clarke <jrtc27@FreeBSD.org>
CommitDate: 2026-08-06 18:03:48 +0000

    libllvmminimal: Fix building with LLVM < 21 on riscv64
    
    On most architectures we end up not needing ABIBreak.cpp as, although
    some of the sources here do reference EnableABIBreakingChecks (or, if
    assertions are disabled, DisableABIBreakingChecks) at a source level, we
    compile with -ffunction-sections and -fdata-sections, and link with
    --gc-sections, and it happens to be the case that all references can be
    GC'ed. However, prior to LLVM 21, the RISC-V backend did not apply
    -fdata-sections to .sdata, where references to these symbols end up, and
    for some files we're building with such references we end up not being
    able to GC .sdata due to the other unrelated data in it, meaning that we
    do in fact need to build ABIBreak.cpp.
    
    Whilst we could make this conditional on the architecture, it's a tiny
    file, and it's a bit fragile to rely on GC behaviour, so just include it
    unconditionally.
    
    Reviewed by:    dim, emaste
    Fixes:          770cf0a5f02d ("Fixups after llvm-project main llvmorg-21-init-19288-gface93e724f4 merge")
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D58044
    
    (cherry picked from commit 7a0b9e30a5ba07066caffba51fa82ca3782a5da1)
---
 lib/clang/libllvmminimal/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/clang/libllvmminimal/Makefile b/lib/clang/libllvmminimal/Makefile
index 878435a3f985..c3263a289f8d 100644
--- a/lib/clang/libllvmminimal/Makefile
+++ b/lib/clang/libllvmminimal/Makefile
@@ -7,7 +7,7 @@ INTERNALLIB=
 
 SRCDIR=		llvm/lib
 SRCS+=		Demangle/ItaniumDemangle.cpp
-#SRCS+=		Support/ABIBreak.cpp
+SRCS+=		Support/ABIBreak.cpp
 SRCS+=		Support/APFloat.cpp
 SRCS+=		Support/APInt.cpp
 #SRCS+=		Support/Atomic.cpp


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a74ccc7.32624.66167602>