me
/
guix
Archived
1
0
Fork 0

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'.
master
Efraim Flashner 2022-05-29 08:46:17 +03:00
parent a5f4c03df1
commit 926fcb488b
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351
1 changed files with 9 additions and 1 deletions

View File

@ -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"