summary refs log tree commit diff
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2019-08-20 17:45:50 +0200
committerMathieu Othacehe <m.othacehe@gmail.com>2019-11-15 17:32:27 +0100
commit94f60b4bc98d9a054be731e613b81073e1082ce3 (patch)
treecba1a2d5d294f698bb4db2642e5bf1f3fc6fab53
parenta8446b40295c18ce1fcce66081c828bb391c09c9 (diff)
downloadguix-94f60b4bc98d9a054be731e613b81073e1082ce3.tar.gz
utils: Use target-aarch64? and target-arm? helpers.
* guix/utils.scm (target-aarch64?, target-arm?): New exported procedures.
-rw-r--r--guix/utils.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/guix/utils.scm b/guix/utils.scm
index 1f99c5b3f5..c9236ad165 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -78,6 +78,8 @@
             package-name->name+version
             target-mingw?
             target-arm32?
+            target-aarch64?
+            target-arm?
             target-64bit?
             version-compare
             version>?
@@ -494,6 +496,12 @@ a character other than '@'."
 (define (target-arm32?)
   (string-prefix? "arm" (or (%current-target-system) (%current-system))))
 
+(define (target-aarch64?)
+  (string-prefix? "aarch64" (or (%current-target-system) (%current-system))))
+
+(define (target-arm?)
+  (or (target-arm32?) (target-aarch64?)))
+
 (define (target-64bit?)
   (let ((system (or (%current-target-system) (%current-system))))
     (any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "ppc64"))))