diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2026-02-09 16:26:52 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2026-02-09 16:26:52 +0000 |
| commit | ee73475119ff7aa98bd11828625d524f6ab87f06 (patch) | |
| tree | 7aab848a03b0ae412cdf693fb0afa93bd20e402c | |
| parent | 244f498074b5574d18d4518583863580498b8d3b (diff) | |
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
| -rw-r--r-- | lib/clang/libclang/Makefile | 4 | ||||
| -rw-r--r-- | lib/clang/liblldb/Makefile | 4 | ||||
| -rw-r--r-- | lib/clang/libllvm/Makefile | 4 |
3 files changed, 12 insertions, 0 deletions
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 |
