summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2022-06-16 19:25:08 +0300
committerEfraim Flashner <efraim@flashner.co.il>2022-06-16 19:42:02 +0300
commitab82dd3f58d7dfd88511705e871e9a41d9185aba (patch)
tree7b9203fd53ea6cfc3c515081138f00df442f5a20 /gnu
parent3c7736f7456fb84a1917063b18cf5c41c935b4e0 (diff)
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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/llvm.scm18
1 files changed, 17 insertions, 1 deletions
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 7b197bb67b4..32625385ff9 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -54,6 +54,7 @@
54 #:use-module (guix build-system python) 54 #:use-module (guix build-system python)
55 #:use-module (guix build-system trivial) 55 #:use-module (guix build-system trivial)
56 #:use-module (gnu packages) 56 #:use-module (gnu packages)
57 #:use-module (gnu packages autotools)
57 #:use-module (gnu packages base) 58 #:use-module (gnu packages base)
58 #:use-module (gnu packages gcc) 59 #:use-module (gnu packages gcc)
59 #:use-module (gnu packages bootstrap) ;glibc-dynamic-linker 60 #:use-module (gnu packages bootstrap) ;glibc-dynamic-linker
@@ -741,6 +742,14 @@ of programming tools as well as libraries with equivalent functionality.")
741 #:build-type "Release" 742 #:build-type "Release"
742 #:phases 743 #:phases
743 (modify-phases %standard-phases 744 (modify-phases %standard-phases
745 ,@(if (assoc "config" (package-native-inputs this-package))
746 `((add-after 'unpack 'update-config
747 (lambda* (#:key inputs native-inputs #:allow-other-keys)
748 (let ((config.guess (search-input-file
749 (or inputs native-inputs)
750 "/bin/config.guess")))
751 (copy-file config.guess "cmake/config.guess")))))
752 '())
744 (add-before 'build 'shared-lib-workaround 753 (add-before 'build 'shared-lib-workaround
745 ;; Even with CMAKE_SKIP_BUILD_RPATH=FALSE, llvm-tblgen 754 ;; Even with CMAKE_SKIP_BUILD_RPATH=FALSE, llvm-tblgen
746 ;; doesn't seem to get the correct rpath to be able to run 755 ;; doesn't seem to get the correct rpath to be able to run
@@ -825,7 +834,14 @@ of programming tools as well as libraries with equivalent functionality.")
825 (uri (llvm-uri "llvm" version)) 834 (uri (llvm-uri "llvm" version))
826 (sha256 835 (sha256
827 (base32 836 (base32
828 "1wydhbp9kyjp5y0rc627imxgkgqiv3dfirbqil9dgpnbaw5y7n65")))))) 837 "1wydhbp9kyjp5y0rc627imxgkgqiv3dfirbqil9dgpnbaw5y7n65"))))
838 (native-inputs
839 `(("python" ,python-wrapper)
840 ("perl" ,perl)
841 ;; In llvm-11 riscv64 support was added manually to config.guess.
842 ,@(if (target-riscv64?)
843 `(("config" ,config))
844 '())))))
829 845
830(define-public clang-runtime-10 846(define-public clang-runtime-10
831 (clang-runtime-from-llvm 847 (clang-runtime-from-llvm