* [bug#63839] [PATCH] gnu: riscv-pk: don't target riscv64-linux-gnu when current system is riscv64. @ 2023-06-02 12:10 Z572 via Guix-patches via 2023-06-06 15:48 ` Josselin Poiret via Guix-patches via 0 siblings, 1 reply; 4+ messages in thread From: Z572 via Guix-patches via @ 2023-06-02 12:10 UTC (permalink / raw) To: 63839 [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset=y, Size: 2406 bytes --] * gnu/packages/virtualization.scm (riscv-pk): don't target riscv64-linux-gnu when current system is riscv64. --- gnu/packages/virtualization.scm | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index c88fd31146..1257bb531d 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm @@ -28,6 +28,7 @@ ;;; Copyright © 2022 Ekaitz Zarraga <ekaitz@elenq.tech> ;;; Copyright © 2022 Arun Isaac <arunisaac@systemreboot.net> ;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com> +;;; Copyright © 2023 Zheng Junjie <873216071@qq.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -2554,16 +2555,21 @@ (define-public riscv-pk "1cc0rz4q3a1zw8756b8yysw8lb5g4xbjajh5lvqbjix41hbdx6xz")))) (build-system gnu-build-system) (arguments - (list #:out-of-source? #t - ;; riscv-pk can only be built for riscv64. - #:target "riscv64-linux-gnu" - #:make-flags #~(list (string-append "INSTALLDIR=" #$output)) - ;; Add flags to keep symbols fromhost and tohost. These symbols are - ;; required for the correct functioning of pk. - #:strip-flags #~(list "--strip-unneeded" - "--keep-symbol=fromhost" - "--keep-symbol=tohost" - "--enable-deterministic-archives"))) + (append + ;; riscv-pk can only be built for riscv64. + (if (string-prefix? "riscv64" (%current-system)) + '() + (list + #:target "riscv64-linux-gnu")) + (list #:out-of-source? #t + + #:make-flags #~(list (string-append "INSTALLDIR=" #$output)) + ;; Add flags to keep symbols fromhost and tohost. These symbols are + ;; required for the correct functioning of pk. + #:strip-flags #~(list "--strip-unneeded" + "--keep-symbol=fromhost" + "--keep-symbol=tohost" + "--enable-deterministic-archives")))) (home-page "https://github.com/riscv-software-src/riscv-pk") (synopsis "RISC-V Proxy Kernel") (description "The RISC-V Proxy Kernel, @command{pk}, is a lightweight base-commit: 75bdd4b05253c0e6ca5399f60e424f0f00fdb673 -- 2.40.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#63839] [PATCH] gnu: riscv-pk: don't target riscv64-linux-gnu when current system is riscv64. 2023-06-02 12:10 [bug#63839] [PATCH] gnu: riscv-pk: don't target riscv64-linux-gnu when current system is riscv64 Z572 via Guix-patches via @ 2023-06-06 15:48 ` Josselin Poiret via Guix-patches via [not found] ` <87o7lmrqt2.fsf@qq.com> 0 siblings, 1 reply; 4+ messages in thread From: Josselin Poiret via Guix-patches via @ 2023-06-06 15:48 UTC (permalink / raw) To: Z572, 63839 [-- Attachment #1: Type: text/plain, Size: 593 bytes --] Hi, Z572 via Guix-patches via <guix-patches@gnu.org> writes: > + ;; riscv-pk can only be built for riscv64. > + (if (string-prefix? "riscv64" (%current-system)) > + '() > + (list > + #:target "riscv64-linux-gnu")) I don't think that's a good idea, in general, consumers of the package should be the ones specifying for which arch this package builds. For that purpose, there's the supported-systems field of the package record type. It's not good in general to hardcode targets in package definitions. Best, -- Josselin Poiret [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 682 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <87o7lmrqt2.fsf@qq.com>]
* [bug#63839] [PATCH] gnu: riscv-pk: don't target riscv64-linux-gnu when current system is riscv64. [not found] ` <87o7lmrqt2.fsf@qq.com> @ 2023-06-11 14:48 ` Z572 via Guix-patches via 2023-08-25 13:11 ` Josselin Poiret via Guix-patches via 0 siblings, 1 reply; 4+ messages in thread From: Z572 via Guix-patches via @ 2023-06-11 14:48 UTC (permalink / raw) To: Josselin Poiret; +Cc: 63839 Josselin Poiret via Guix-patches via <guix-patches@gnu.org> writes: > [[PGP Signed Part:Undecided]] > Hi, > > Z572 via Guix-patches via <guix-patches@gnu.org> writes: > > >> + ;; riscv-pk can only be built for riscv64. >> + (if (string-prefix? "riscv64" (%current-system)) >> + '() >> + (list >> + #:target "riscv64-linux-gnu")) > > I don't think that's a good idea, in general, consumers of the package > should be the ones specifying for which arch this package builds. For > that purpose, there's the supported-systems field of the package record > type. It's not good in general to hardcode targets in package > definitions. look it's name. because it doesn't make sense to target other targets, like `u-boot-sifive-unmatched' or `opensbi-generic'. > > Best, -- over ^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#63839] [PATCH] gnu: riscv-pk: don't target riscv64-linux-gnu when current system is riscv64. 2023-06-11 14:48 ` Z572 via Guix-patches via @ 2023-08-25 13:11 ` Josselin Poiret via Guix-patches via 0 siblings, 0 replies; 4+ messages in thread From: Josselin Poiret via Guix-patches via @ 2023-08-25 13:11 UTC (permalink / raw) To: Z572; +Cc: 63839 [-- Attachment #1: Type: text/plain, Size: 336 bytes --] Hi, Any news on this patch? I still stand by what I said: I believe it's wrong for packages to force a target, this should be specified by the caller instead, using `--target=`. One can add the supported systems to supported-systems to note that this package only works for some systems though. Best, -- Josselin Poiret [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 682 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-08-25 13:13 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2023-06-02 12:10 [bug#63839] [PATCH] gnu: riscv-pk: don't target riscv64-linux-gnu when current system is riscv64 Z572 via Guix-patches via 2023-06-06 15:48 ` Josselin Poiret via Guix-patches via [not found] ` <87o7lmrqt2.fsf@qq.com> 2023-06-11 14:48 ` Z572 via Guix-patches via 2023-08-25 13:11 ` Josselin Poiret via Guix-patches via
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/guix.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).