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 @@ (define* (clang-from-llvm llvm clang-runtime ;; 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"