summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2024-01-02 09:27:32 +0200
committerEfraim Flashner <efraim@flashner.co.il>2024-01-04 21:48:13 +0200
commitc69230c81f9657fd6338c1cd625139a1c1d1c39f (patch)
tree55a3b6e1aab57374cd1ee262705702218f2a46cb /guix
parent3c1f25fc7b3cd1942c33a48e71697f94c4c86bc2 (diff)
gnu: Add support for x86_64-linux-gnux32.
* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Add entry for x86_64-linux-gnux32. * gnu/packages/gcc.scm (gcc-configure-flags-for-triplet): Add configure-flag for x86_64-linux-gnux32. * guix/platforms/x86.scm (x86_64-linux-gnux32): New variable. * guix/utils.scm (gnu-triplet->nix-system): Force x86_64-linux-gnux32 to output a different nix-system than x86_64-linux-gnu. Change-Id: I519fea2f8357e4b9895ede05fe8a5e373e9b034a Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Diffstat (limited to 'guix')
-rw-r--r--guix/platforms/x86.scm10
-rw-r--r--guix/utils.scm4
2 files changed, 13 insertions, 1 deletions
diff --git a/guix/platforms/x86.scm b/guix/platforms/x86.scm
index 4ed5638c14..0c8fc7296c 100644
--- a/guix/platforms/x86.scm
+++ b/guix/platforms/x86.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2022 Mathieu Othacehe <othacehe@gnu.org>
+;;; Copyright © 2023, 2024 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,6 +22,7 @@
#:use-module (guix records)
#:export (i686-linux
x86_64-linux
+ x86_64-linux-x32
i686-mingw
x86_64-mingw
i586-gnu))
@@ -41,6 +43,14 @@
(rust-target "x86_64-unknown-linux-gnu")
(glibc-dynamic-linker "/lib/ld-linux-x86-64.so.2")))
+(define x86_64-linux-x32
+ (platform
+ (target "x86_64-linux-gnux32")
+ (system #f)
+ (linux-architecture "x86_64")
+ (rust-target "x86_64-unknown-linux-gnux32")
+ (glibc-dynamic-linker "/lib/ld-linux-x32.so.2")))
+
(define i686-mingw
(platform
(target "i686-w64-mingw32")
diff --git a/guix/utils.scm b/guix/utils.scm
index 8e71f97e1c..f4bf965e9a 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -7,7 +7,7 @@
;;; Copyright © 2015 David Thompson <davet@gnu.org>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2018, 2020 Marius Bakke <marius@gnu.org>
-;;; Copyright © 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2020, 2021, 2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Simon Tournier <zimon.toutoune@gmail.com>
;;; Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
@@ -634,6 +634,8 @@ returned by `config.guess'."
(else triplet))))
(cond ((string-match "^arm[^-]*-([^-]+-)?linux-gnueabihf" triplet)
"armhf-linux")
+ ;; Otherwise it will show up as x86_64-linux... which isn't wrong.
+ ((string-match "x86_64-linux-gnux32" triplet) "x86_64-linux-gnux32")
((string-match "^([^-]+)-([^-]+-)?linux-gnu.*" triplet)
=>
(lambda (m)