gnu: Add target-x32?.

* guix/utils.scm (target-x32?): New procedure.

Change-Id: Ia16c7edce64de01d5ccb126c7bd9a6736f327b5f
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
This commit is contained in:
Efraim Flashner 2024-01-02 09:27:33 +02:00
parent c69230c81f
commit 433b680dd6
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -97,6 +97,7 @@ (define-module (guix utils)
target-x86-32?
target-x86-64?
target-x86?
target-x32?
target-arm32?
target-aarch64?
target-arm?
@ -712,6 +713,13 @@ (define* (target-x86-64? #:optional (target (or (%current-target-system)
architecture (x86_64)?"
(string-prefix? "x86_64-" target))
(define* (target-x32? #:optional (target (or (%current-target-system)
(%current-system))))
"Is the architecture of TARGET a variant of Intel/AMD's 64-bit
architecture (x86_64) using 32-bit data types?"
(and (target-x86-64? target)
(string-suffix? "gnux32" target)))
(define* (target-x86? #:optional (target (or (%current-target-system)
(%current-system))))
(or (target-x86-32? target) (target-x86-64? target)))