summary refs log tree commit diff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2023-12-09 18:41:18 +0200
committerEfraim Flashner <efraim@flashner.co.il>2023-12-10 08:15:43 +0200
commit556aa310505276c11dee54822e0f8eb1017e69de (patch)
tree61b29aa44b974c23686c1e716fd38da18db56662
parent2e11caff39d502775d7c652972a441f5da3d9eec (diff)
downloadguix-556aa310505276c11dee54822e0f8eb1017e69de.tar.gz
gnu: llvm-14: Fix building on powerpc-linux.
* gnu/packages/llvm.scm (llvm-14)[arguments]: When building for
powerpc-linux adjust the configure-flags to always link shared libraries
with -latomic.

Change-Id: If020528bf1717595b66e6e0826dbe7a0c1128322
-rw-r--r--gnu/packages/llvm.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 08536fc865..a84b8c0030 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -706,6 +706,10 @@ of programming tools as well as libraries with equivalent functionality.")
                    #$(string-append "-DLLVM_TARGETS_TO_BUILD="
                                     (system->llvm-target)))
                 '())
+         ;; undefined reference to `__atomic_fetch_add_8' in lib/libLLVMOrcJIT.so.14
+         #$@(if (target-ppc32?)
+                (list "-DCMAKE_SHARED_LINKER_FLAGS=-latomic")
+                `())
          "-DCMAKE_SKIP_BUILD_RPATH=FALSE"
          "-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE"
          "-DBUILD_SHARED_LIBS:BOOL=TRUE"