summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/llvm.scm10
1 files changed, 9 insertions, 1 deletions
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"