summaryrefslogtreecommitdiff
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-22 16:33:42 +0100
commit74f1718081a33203fcc92b811eac6a7094d8c64b (patch)
tree9e6484c3d89a80687729e4c859b672933a575afa
parentcf87919657bcbc422ca599007f5b111dc7807919 (diff)
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 64853f2989..728039fbf0 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"))))