guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: clang-from-llvm: Fix building on riscv64-lin


From: guix-commits
Subject: branch master updated: gnu: clang-from-llvm: Fix building on riscv64-linux.
Date: Sun, 29 May 2022 02:18:31 -0400

This is an automated email from the git hooks/post-receive script.

efraim pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 926fcb488b gnu: clang-from-llvm: Fix building on riscv64-linux.
926fcb488b is described below

commit 926fcb488b756fb5d6c4c129c4348650919e5835
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Sun May 29 08:46:17 2022 +0300

    gnu: clang-from-llvm: Fix building on riscv64-linux.
    
    * gnu/packages/llvm.scm (clang-from-llvm)[arguments]: When building for
    riscv64-linux add configure-flags and make-flags to ensure linking with
    '-latomic'.
---
 gnu/packages/llvm.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index aedf039ff4..d3b16f2759 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -216,7 +216,15 @@ given PATCHES.  When TOOLS-EXTRA is given, it must point 
to the
              ;; Use a sane default include directory.
              (string-append "-DC_INCLUDE_DIRS="
                             (assoc-ref %build-inputs "libc")
-                            "/include"))
+                            "/include")
+       ,@(if (target-riscv64?)
+           (list "-DLIBOMP_LIBFLAGS=-latomic"
+                 "-DCMAKE_SHARED_LINKER_FLAGS=-latomic")
+           `()))
+
+       ,@(if (target-riscv64?)
+           `(#:make-flags '("LDFLAGS=-latomic"))
+           '())
 
        ;; Don't use '-g' during the build to save space.
        #:build-type "Release"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]