aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2022-05-10 01:24:50 +0200
committerMathieu Othacehe <othacehe@gnu.org>2022-06-24 10:21:05 +0200
commit242fad357e969da3b1f80b7e4360b54d99ee03f3 (patch)
tree0643d457e7e6bf2f70c44a770411ab85135dfa08
parent14518fcc54b4172389a0c733a7b734e4bed94405 (diff)
downloadguix-242fad357e969da3b1f80b7e4360b54d99ee03f3.tar
guix-242fad357e969da3b1f80b7e4360b54d99ee03f3.tar.gz
utils: Define 'target-x86?' predicate.
* guix/utils.scm (target-x86?): New predicate. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
-rw-r--r--guix/utils.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/guix/utils.scm b/guix/utils.scm
index 5c36b15cfe..745da98a79 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -14,6 +14,7 @@
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2018 Steve Sprang <scs@stevesprang.com>
;;; Copyright © 2022 Taiju HIGASHI <higashi@taiju.info>
+;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -92,6 +93,7 @@
target-mingw?
target-x86-32?
target-x86-64?
+ target-x86?
target-arm32?
target-aarch64?
target-arm?
@@ -697,6 +699,10 @@ a character other than '@'."
architecture (x86_64)?"
(string-prefix? "x86_64-" target))
+(define* (target-x86? #:optional (target (or (%current-target-system)
+ (%current-system))))
+ (or (target-x86-32? target) (target-x86-64? target)))
+
(define* (target-arm32? #:optional (target (or (%current-target-system)
(%current-system))))
(string-prefix? "arm" target))