utils: Define 'target-riscv64?' predicate.

* guix/utils.scm (target-riscv64?): New predicate.
This commit is contained in:
Efraim Flashner 2021-08-01 11:01:41 +03:00
parent b1de968fd5
commit 697686805f
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351

@ -97,6 +97,7 @@
target-ppc32?
target-ppc64le?
target-powerpc?
target-riscv64?
target-64bit?
cc-for-target
cxx-for-target
@ -704,6 +705,11 @@ architecture (x86_64)?"
(%current-system))))
(string-prefix? "powerpc" target))
(define* (target-riscv64? #:optional (target (or (%current-target-system)
(%current-system))))
"Is the architecture of TARGET a 'riscv64' machine?"
(string-prefix? "riscv64" target))
(define* (target-64bit? #:optional (system (or (%current-target-system)
(%current-system))))
(any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "powerpc64")))