summary refs log tree commit diff
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2021-08-01 11:01:41 +0300
committerEfraim Flashner <efraim@flashner.co.il>2021-10-10 16:19:07 +0300
commit697686805f473ca896f685adb840fa66654d8e49 (patch)
tree7f72e9073a32e2763bdcaa2957a4e7b2ce511bfb
parentb1de968fd5fd916e30258c6e256f65a294fca780 (diff)
downloadguix-697686805f473ca896f685adb840fa66654d8e49.tar.gz
utils: Define 'target-riscv64?' predicate.
* guix/utils.scm (target-riscv64?): New predicate.
-rw-r--r--guix/utils.scm6
1 files changed, 6 insertions, 0 deletions
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")))