diff mbox series

[bug#55343,1/2] utils: Define 'target-x86?' predicate.

Message ID 20220509232451.30605-1-GNUtoo@cyberdimension.org
State New
Headers show
Series [bug#55343,1/2] utils: Define 'target-x86?' predicate. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Denis 'GNUtoo' Carikli May 9, 2022, 11:24 p.m. UTC
* guix/utils.scm (target-x86?): New predicate.
---
 guix/utils.scm | 6 ++++++
 1 file changed, 6 insertions(+)


base-commit: 37e44d48baf976f6bfcd885b2e10da4ab7be4af9
diff mbox series

Patch

diff --git a/guix/utils.scm b/guix/utils.scm
index 44c46cb4a9..a9d8819770 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 © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -91,6 +92,7 @@  (define-module (guix utils)
             target-mingw?
             target-x86-32?
             target-x86-64?
+            target-x86?
             target-arm32?
             target-aarch64?
             target-arm?
@@ -683,6 +685,10 @@  (define* (target-x86-64? #:optional (target (or (%current-target-system)
 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))