mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-18 04:37:36 -05:00
utils: 'target-arm32?' & co. take an optional parameter.
* guix/utils.scm (target-arm32?, target-aarch64?) (target-arm?, target-64bit?): Make 'target' an optional parameter.
This commit is contained in:
parent
8d408d5ae4
commit
3d028f03c8
1 changed files with 12 additions and 9 deletions
|
@ -490,18 +490,21 @@ (define* (target-mingw? #:optional (target (%current-target-system)))
|
|||
(and target
|
||||
(string-suffix? "-mingw32" target)))
|
||||
|
||||
(define (target-arm32?)
|
||||
(string-prefix? "arm" (or (%current-target-system) (%current-system))))
|
||||
(define* (target-arm32? #:optional (target (or (%current-target-system)
|
||||
(%current-system))))
|
||||
(string-prefix? "arm" target))
|
||||
|
||||
(define (target-aarch64?)
|
||||
(string-prefix? "aarch64" (or (%current-target-system) (%current-system))))
|
||||
(define* (target-aarch64? #:optional (target (or (%current-target-system)
|
||||
(%current-system))))
|
||||
(string-prefix? "aarch64" target))
|
||||
|
||||
(define (target-arm?)
|
||||
(or (target-arm32?) (target-aarch64?)))
|
||||
(define* (target-arm? #:optional (target (or (%current-target-system)
|
||||
(%current-system))))
|
||||
(or (target-arm32? target) (target-aarch64? target)))
|
||||
|
||||
(define (target-64bit?)
|
||||
(let ((system (or (%current-target-system) (%current-system))))
|
||||
(any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "ppc64"))))
|
||||
(define* (target-64bit? #:optional (system (or (%current-target-system)
|
||||
(%current-system))))
|
||||
(any (cut string-prefix? <> system) '("x86_64" "aarch64" "mips64" "ppc64")))
|
||||
|
||||
(define version-compare
|
||||
(let ((strverscmp
|
||||
|
|
Loading…
Reference in a new issue