summaryrefslogtreecommitdiff
path: root/guix/utils.scm
diff options
context:
space:
mode:
authorJohn Kehayias <john.kehayias@protonmail.com>2023-12-16 23:14:56 -0500
committerJohn Kehayias <john.kehayias@protonmail.com>2023-12-16 23:14:56 -0500
commit17c3a3bfff150a42c904233fa39818d73c9f68f3 (patch)
treea7614b7cd9a7106ea59f5ac1caad0c2c496b3a45 /guix/utils.scm
parentf5493629e2650c0d30caf0f01f76b2383f78b9de (diff)
parentfe86819d8bde674766659c22b215d3a689a8026e (diff)
Merge branch 'master' into mesa-updates
Change-Id: I0c6e2410c51335c68634738be030e374f5b492e9
Diffstat (limited to 'guix/utils.scm')
-rw-r--r--guix/utils.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/guix/utils.scm b/guix/utils.scm
index 7a42b49df2..8e71f97e1c 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -19,6 +19,7 @@
;;; Copyright © 2023 Philip McGrath <philip@philipmcgrath.com>
;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -99,6 +100,7 @@
target-arm32?
target-aarch64?
target-arm?
+ target-avr?
target-ppc32?
target-ppc64le?
target-powerpc?
@@ -724,6 +726,10 @@ architecture (x86_64)?"
(%current-system))))
(or (target-arm32? target) (target-aarch64? target)))
+(define* (target-avr? #:optional (target (%current-target-system)))
+ "Is the architecture of TARGET a variant of Microchip's AVR architecture?"
+ (or (string=? target "avr") (string-prefix? "avr-" target)))
+
(define* (target-ppc32? #:optional (target (or (%current-target-system)
(%current-system))))
(string-prefix? "powerpc-" target))