guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/41: utils: Define 'target-riscv?' predicate.


From: guix-commits
Subject: 01/41: utils: Define 'target-riscv?' predicate.
Date: Thu, 9 Sep 2021 08:39:28 -0400 (EDT)

efraim pushed a commit to branch wip-riscv
in repository guix.

commit 17b94f45fa732347f926e19ae581f093438f349f
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Sun Aug 1 11:01:41 2021 +0300

    utils: Define 'target-riscv?' predicate.
    
    * guix/utils.scm (target-riscv?): New predicate.
---
 guix/utils.scm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/guix/utils.scm b/guix/utils.scm
index 3f253d6..5b4e0d9 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -97,6 +97,7 @@
             target-ppc32?
             target-ppc64le?
             target-powerpc?
+            target-riscv?
             target-64bit?
             cc-for-target
             cxx-for-target
@@ -704,6 +705,11 @@ architecture (x86_64)?"
                                                  (%current-system))))
   (string-prefix? "powerpc" target))
 
+(define* (target-riscv? #:optional (target (or (%current-target-system)
+                                               (%current-system))))
+  "Is the architecture of TARGET a 'riscv' architecture variant?"
+  (string-prefix? "riscv" target))
+
 (define* (target-64bit? #:optional (system (or (%current-target-system)
                                                (%current-system))))
   (any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" 
"powerpc64")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]