diff options
author | Jean-Pierre De Jesus DIAZ <jean@foundationdevices.com> | 2023-11-28 12:34:47 +0100 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2023-12-11 11:53:54 +0200 |
commit | 520e3d267ecc3964af301ab9341462e905f234c6 (patch) | |
tree | 05b781904902cfd44d79e954221eafa93b32d964 /guix | |
parent | be5ec2ebb4bde4b4f702a30f08849dff05cceccd (diff) |
guix: Add target-avr?.
* guix/utils.scm (target-avr?): New procedure.
* tests/utils.scm: Add tests for target-avr? procedure.
Change-Id: Iaa0fa97a2b6bc45d45f907f43157f1548a0ba3fa
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Diffstat (limited to 'guix')
-rw-r--r-- | guix/utils.scm | 6 |
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)) |