Date: Mon, 9 Feb 2026 16:40:03 +0000 From: Jessica Clarke <jrtc27@freebsd.org> To: John Baldwin <jhb@FreeBSD.org> Cc: "src-committers@freebsd.org" <src-committers@FreeBSD.org>, "dev-commits-src-all@freebsd.org" <dev-commits-src-all@FreeBSD.org>, "dev-commits-src-main@freebsd.org" <dev-commits-src-main@FreeBSD.org> Subject: Re: git: ee73475119ff - main - llvm: Link private LLVM libraries against compiler_rt for aarch64 Message-ID: <E1734CF0-E6FC-40B8-BAD0-DE2269756E2E@freebsd.org> In-Reply-To: <698a0b1e.1d294.40e36519@gitrepo.freebsd.org>
index | next in thread | previous in thread | raw e-mail
On 9 Feb 2026, at 16:28, John Baldwin <jhb@FreeBSD.org> wrote: > > 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. This doesn’t seem right, they’re provided by libgcc.a, so why aren’t they being pulled in? libcompiler_rt.a doesn’t even have the symbols. Jessica > 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?E1734CF0-E6FC-40B8-BAD0-DE2269756E2E>
