diff --git a/guix/utils.scm b/guix/utils.scm index 3f253d6cd8..9596ff8582 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -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")))