From 926fcb488b756fb5d6c4c129c4348650919e5835 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 29 May 2022 08:46:17 +0300 Subject: 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(-) (limited to 'gnu/packages/llvm.scm') 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" -- cgit 1.4.1