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
parent
a5f4c03df1
commit
926fcb488b
|
@ -216,7 +216,15 @@ given PATCHES. When TOOLS-EXTRA is given, it must point to the
|
||||||
;; Use a sane default include directory.
|
;; Use a sane default include directory.
|
||||||
(string-append "-DC_INCLUDE_DIRS="
|
(string-append "-DC_INCLUDE_DIRS="
|
||||||
(assoc-ref %build-inputs "libc")
|
(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.
|
;; Don't use '-g' during the build to save space.
|
||||||
#:build-type "Release"
|
#:build-type "Release"
|
||||||
|
|
Reference in New Issue