Message ID | 20230929091627.7820-4-jean@foundationdevices.com |
---|---|
State | New |
Headers | show |
Series | guix: Add avr as a platform. | expand |
On Fri, Sep 29, 2023 at 11:16:08AM +0200, Jean-Pierre De Jesus DIAZ wrote: > * guix/utils.scm (target-avr?): New procedure. > --- > guix/utils.scm | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/guix/utils.scm b/guix/utils.scm > index e9af33bdeb..1724b53149 100644 > --- a/guix/utils.scm > +++ b/guix/utils.scm > @@ -98,6 +98,7 @@ (define-module (guix utils) > target-arm32? > target-aarch64? > target-arm? > + target-avr? > target-ppc32? > target-ppc64le? > target-powerpc? > @@ -722,6 +723,9 @@ (define* (target-arm? #:optional (target (or (%current-target-system) > (%current-system)))) > (or (target-arm32? target) (target-aarch64? target))) Is it ever avr<something> or is it always avr? Mostly wondering if it should be string=? > +(define* (target-avr? #:optional (target (%current-target-system))) > + (string-prefix? "avr" target)) > + > (define* (target-ppc32? #:optional (target (or (%current-target-system) > (%current-system)))) > (string-prefix? "powerpc-" target)) > -- > 2.34.1 > > >
diff --git a/guix/utils.scm b/guix/utils.scm index e9af33bdeb..1724b53149 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -98,6 +98,7 @@ (define-module (guix utils) target-arm32? target-aarch64? target-arm? + target-avr? target-ppc32? target-ppc64le? target-powerpc? @@ -722,6 +723,9 @@ (define* (target-arm? #:optional (target (or (%current-target-system) (%current-system)))) (or (target-arm32? target) (target-aarch64? target))) +(define* (target-avr? #:optional (target (%current-target-system))) + (string-prefix? "avr" target)) + (define* (target-ppc32? #:optional (target (or (%current-target-system) (%current-system)))) (string-prefix? "powerpc-" target))