Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Feb 2026 16:28:14 +0000
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: ee73475119ff - main - llvm: Link private LLVM libraries against compiler_rt for aarch64
Message-ID:  <698a0b1e.1d294.40e36519@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by jhb:

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

commit ee73475119ff7aa98bd11828625d524f6ab87f06
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2026-02-09 16:26:52 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2026-02-09 16:26:52 +0000

    llvm: Link private LLVM libraries against compiler_rt for aarch64
    
    This is required for GCC which uses libcalls for outlined atomics.
    
    Reviewed by:    dim
    Differential Revision:  https://reviews.freebsd.org/D55157
---
 lib/clang/libclang/Makefile | 4 ++++
 lib/clang/liblldb/Makefile  | 4 ++++
 lib/clang/libllvm/Makefile  | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/lib/clang/libclang/Makefile b/lib/clang/libclang/Makefile
index 56f6fd374fe5..1b24d5cbf4cf 100644
--- a/lib/clang/libclang/Makefile
+++ b/lib/clang/libclang/Makefile
@@ -14,6 +14,10 @@ PRIVATELIB=
 # Work around "relocation R_PPC_GOT16 out of range" errors
 PICFLAG=        -fPIC
 .endif
+.if ${MACHINE_CPUARCH} == "aarch64"
+# Only required for GCC
+LIBADD+=	compiler_rt
+.endif
 .endif
 
 SHARED_CXXFLAGS+=	-UPIC # To avoid compile errors
diff --git a/lib/clang/liblldb/Makefile b/lib/clang/liblldb/Makefile
index aa9e90b2f6f2..b2da21c2990e 100644
--- a/lib/clang/liblldb/Makefile
+++ b/lib/clang/liblldb/Makefile
@@ -10,6 +10,10 @@ PACKAGE=	lldb
 SHLIB_CXX=	lldb
 SHLIB_MAJOR=	19
 PRIVATELIB=
+.if ${MACHINE_CPUARCH} == "aarch64"
+# Only required for GCC
+LIBADD+=	compiler_rt
+.endif
 .endif
 
 SHARED_CXXFLAGS+=	-UPIC # To avoid compile errors
diff --git a/lib/clang/libllvm/Makefile b/lib/clang/libllvm/Makefile
index 05128550827a..9b2a272d2c67 100644
--- a/lib/clang/libllvm/Makefile
+++ b/lib/clang/libllvm/Makefile
@@ -14,6 +14,10 @@ PRIVATELIB=
 # Work around "relocation R_PPC_GOT16 out of range" errors
 PICFLAG=        -fPIC
 .endif
+.if ${MACHINE_CPUARCH} == "aarch64"
+# Only required for GCC
+LIBADD+=	compiler_rt
+.endif
 CFLAGS+=	-DLLVM_BUILD_LLVM_DYLIB
 .endif
 


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?698a0b1e.1d294.40e36519>