From: Zheng Junjie <zhengjunjie@iscas.ac.cn>
To: 69944@debbugs.gnu.org
Subject: [bug#69944] [PATCH] gnu: dmraid: Fix cross-compiling to riscv64-linux.
Date: Sat, 23 Mar 2024 00:44:44 +0800 [thread overview]
Message-ID: <a1e35066bfa43894fe6ab607cdc258866ed8896d.1711125878.git.zhengjunjie@iscas.ac.cn> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 2661 bytes --]
* gnu/packages/disk.scm (dmraid)
[native-inputs]: When cross compiling to riscv64-linux-gnu, add config.
[arguments]: When target riscv64-linux-gnu, add update-config phase.
Change-Id: I491c43a6ce2c3fc3aed43ecab9d4a2ab251038bb
---
gnu/packages/disk.scm | 22 +++++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm
index b0117d77ce..5339f54d99 100644
--- a/gnu/packages/disk.scm
+++ b/gnu/packages/disk.scm
@@ -27,7 +27,7 @@
;;; Copyright © 2022 Disseminate Dissent <disseminatedissent@protonmail.com>
;;; Copyright © 2023 Timotej Lazar <timotej.lazar@araneo.si>
;;; Copyright © 2023 Morgan Smith <Morgan.J.Smith@outlook.com>
-;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1145,7 +1145,12 @@ (define-public dmraid
"1n7vsqvh7y6yvil682q129d21yhb0cmvd5fvsbkza7ypd78inhlk"))))
(build-system gnu-build-system)
(inputs (list lvm2))
- (native-inputs (list which))
+ (native-inputs
+ (append (if (and (target-riscv64?)
+ (%current-target-system))
+ (list config)
+ '())
+ (list which)))
(arguments
`(#:tests? #f ; No tests.
;; Prevent a race condition where some target would attempt to link
@@ -1158,7 +1163,18 @@ (define-public dmraid
(chdir (string-append ,version "/dmraid"))
(substitute* "make.tmpl.in"
(("/bin/sh") (which "sh")))
- #t)))
+ #t))
+ ,@(if (and (target-riscv64?)
+ (%current-target-system))
+ `((add-after 'unpack 'update-config
+ (lambda* (#:key native-inputs inputs #:allow-other-keys)
+ (for-each (lambda (file)
+ (install-file
+ (search-input-file
+ (or native-inputs inputs)
+ (string-append "/bin/" file)) "."))
+ '("config.guess" "config.sub")))))
+ '()))
#:configure-flags (list ;; Make sure programs such as 'dmevent_tool' can
;; find libdmraid.so.
(string-append "LDFLAGS=-Wl,-rpath="
base-commit: 40f53e8fb5b867e3a1e8fa798328423718282aac
--
2.41.0
next reply other threads:[~2024-03-22 17:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-22 16:44 Zheng Junjie [this message]
2024-03-27 12:44 ` [bug#69944] [PATCH] gnu: dmraid: Fix cross-compiling to riscv64-linux Christopher Baines
2024-03-27 13:40 ` Zheng Junjie
2024-04-21 14:03 ` Christopher Baines
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a1e35066bfa43894fe6ab607cdc258866ed8896d.1711125878.git.zhengjunjie@iscas.ac.cn \
--to=zhengjunjie@iscas.ac.cn \
--cc=69944@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.