[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: gnu: llvm-9: Fix building on riscv64-linux.
From: |
guix-commits |
Subject: |
02/02: gnu: llvm-9: Fix building on riscv64-linux. |
Date: |
Thu, 16 Jun 2022 12:48:14 -0400 (EDT) |
efraim pushed a commit to branch master
in repository guix.
commit ab82dd3f58d7dfd88511705e871e9a41d9185aba
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Thu Jun 16 19:25:08 2022 +0300
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.
---
gnu/packages/llvm.scm | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 7b197bb67b..32625385ff 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -54,6 +54,7 @@
#:use-module (guix build-system python)
#:use-module (guix build-system trivial)
#:use-module (gnu packages)
+ #:use-module (gnu packages autotools)
#:use-module (gnu packages base)
#:use-module (gnu packages gcc)
#:use-module (gnu packages bootstrap) ;glibc-dynamic-linker
@@ -741,6 +742,14 @@ of programming tools as well as libraries with equivalent
functionality.")
#:build-type "Release"
#: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
;; Even with CMAKE_SKIP_BUILD_RPATH=FALSE, llvm-tblgen
;; 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.")
(uri (llvm-uri "llvm" version))
(sha256
(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
(clang-runtime-from-llvm