Message ID | fdba6969380b5c73d30556110ed2deaaf1bc0761.1704179455.git.efraim@flashner.co.il |
---|---|
State | New |
Headers | show |
Series | Add support for x86_64-linux-gnux32 | expand |
Hi, On Tue, 2 Jan 2024 at 08:29, Efraim Flashner <efraim@flashner.co.il> wrote: > +(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))) Why not add it to target-x86-32? ? Cheers, simon
On Mon, Jan 08, 2024 at 10:20:36AM +0100, Simon Tournier wrote: > Hi, > > On Tue, 2 Jan 2024 at 08:29, Efraim Flashner <efraim@flashner.co.il> wrote: > > > +(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))) > > Why not add it to target-x86-32? ? It won't run on 32-bit only systems. The preprocessor macro test is __x86_64__ and __ILP32__ I wasn't exactly sure where to put it, but ld.so --help gave the output with the glibc-hwcaps optimization paths exactly like x86_64-linux and pretty much every other piece of software which needed adjusting for it stressed that it was x86_64. There's a #debian-x32 channel on libera.chat, they might have some suggestions about tagging it as 32-bit or 64-bit. As-is it's currently labeled as 64-bit.
diff --git a/guix/utils.scm b/guix/utils.scm index f4bf965e9a..e4e9d922e7 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -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)))