mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-25 20:19:18 -05:00
gnu: llvm-9: Fix building on riscv64-linux.
* gnu/packages/llvm.scm (llvm-12)[arguments]: Add a phase to update config.guess when config is one of the native-inputs. (llvm-10)[native-inputs]: Add config when building for riscv64-linux and the llvm version is less than 11.
This commit is contained in:
parent
3c7736f745
commit
ab82dd3f58
1 changed files with 17 additions and 1 deletions
|
@ -54,6 +54,7 @@ (define-module (gnu packages llvm)
|
||||||
#:use-module (guix build-system python)
|
#:use-module (guix build-system python)
|
||||||
#:use-module (guix build-system trivial)
|
#:use-module (guix build-system trivial)
|
||||||
#:use-module (gnu packages)
|
#:use-module (gnu packages)
|
||||||
|
#:use-module (gnu packages autotools)
|
||||||
#:use-module (gnu packages base)
|
#:use-module (gnu packages base)
|
||||||
#:use-module (gnu packages gcc)
|
#:use-module (gnu packages gcc)
|
||||||
#:use-module (gnu packages bootstrap) ;glibc-dynamic-linker
|
#:use-module (gnu packages bootstrap) ;glibc-dynamic-linker
|
||||||
|
@ -741,6 +742,14 @@ (define-public llvm-12
|
||||||
#:build-type "Release"
|
#:build-type "Release"
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
|
,@(if (assoc "config" (package-native-inputs this-package))
|
||||||
|
`((add-after 'unpack 'update-config
|
||||||
|
(lambda* (#:key inputs native-inputs #:allow-other-keys)
|
||||||
|
(let ((config.guess (search-input-file
|
||||||
|
(or inputs native-inputs)
|
||||||
|
"/bin/config.guess")))
|
||||||
|
(copy-file config.guess "cmake/config.guess")))))
|
||||||
|
'())
|
||||||
(add-before 'build 'shared-lib-workaround
|
(add-before 'build 'shared-lib-workaround
|
||||||
;; Even with CMAKE_SKIP_BUILD_RPATH=FALSE, llvm-tblgen
|
;; Even with CMAKE_SKIP_BUILD_RPATH=FALSE, llvm-tblgen
|
||||||
;; doesn't seem to get the correct rpath to be able to run
|
;; doesn't seem to get the correct rpath to be able to run
|
||||||
|
@ -825,7 +834,14 @@ (define-public llvm-10
|
||||||
(uri (llvm-uri "llvm" version))
|
(uri (llvm-uri "llvm" version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1wydhbp9kyjp5y0rc627imxgkgqiv3dfirbqil9dgpnbaw5y7n65"))))))
|
"1wydhbp9kyjp5y0rc627imxgkgqiv3dfirbqil9dgpnbaw5y7n65"))))
|
||||||
|
(native-inputs
|
||||||
|
`(("python" ,python-wrapper)
|
||||||
|
("perl" ,perl)
|
||||||
|
;; In llvm-11 riscv64 support was added manually to config.guess.
|
||||||
|
,@(if (target-riscv64?)
|
||||||
|
`(("config" ,config))
|
||||||
|
'())))))
|
||||||
|
|
||||||
(define-public clang-runtime-10
|
(define-public clang-runtime-10
|
||||||
(clang-runtime-from-llvm
|
(clang-runtime-from-llvm
|
||||||
|
|
Loading…
Reference in a new issue