diff options
author | Mathieu Othacehe <m.othacehe@gmail.com> | 2019-08-20 17:45:50 +0200 |
---|---|---|
committer | Mathieu Othacehe <m.othacehe@gmail.com> | 2019-11-22 16:33:42 +0100 |
commit | 74f1718081a33203fcc92b811eac6a7094d8c64b (patch) | |
tree | 9e6484c3d89a80687729e4c859b672933a575afa | |
parent | cf87919657bcbc422ca599007f5b111dc7807919 (diff) | |
download | guix-74f1718081a33203fcc92b811eac6a7094d8c64b.tar guix-74f1718081a33203fcc92b811eac6a7094d8c64b.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.scm | 8 |
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")))) |