From: Efraim Flashner <efraim@flashner.co.il>
To: 68202@debbugs.gnu.org
Cc: "Efraim Flashner" <efraim@flashner.co.il>,
"Christopher Baines" <guix@cbaines.net>,
"Josselin Poiret" <dev@jpoiret.xyz>,
"Ludovic Courtès" <ludo@gnu.org>,
"Mathieu Othacehe" <othacehe@gnu.org>,
"Ricardo Wurmus" <rekado@elephly.net>,
"Simon Tournier" <zimon.toutoune@gmail.com>,
"Tobias Geerinckx-Rice" <me@tobias.gr>
Subject: [bug#68202] [PATCH 1/5] gnu: Add support for x86_64-linux-gnux32.
Date: Tue, 2 Jan 2024 09:27:32 +0200 [thread overview]
Message-ID: <626cb5a810638e59f9d3f2b7ca8b5664e91c3a36.1704179455.git.efraim@flashner.co.il> (raw)
In-Reply-To: <cover.1704179455.git.efraim@flashner.co.il>
* 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
---
gnu/packages/bootstrap.scm | 5 ++++-
gnu/packages/gcc.scm | 5 ++++-
guix/platforms/x86.scm | 10 ++++++++++
guix/utils.scm | 4 +++-
4 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 602d8f26c5..a36bb289cd 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -1,7 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2018, 2019 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2017, 2020 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2020, 2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018, 2020, 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2019 Carl Dong <contact@carldong.me>
;;; Copyright © 2019 Léo Le Bouter <lle-bout@zaclys.net>
@@ -323,6 +323,9 @@ (define* (glibc-dynamic-linker
((string=? system "powerpc64-linux") "/lib/ld64.so.1")
((string=? system "alpha-linux") "/lib/ld-linux.so.2")
+ ;; TODO: Differentiate between x86_64-linux-gnu and x86_64-linux-gnux32.
+ ((string=? system "x86_64-linux-gnux32") "/lib/ld-linux-x32.so.2")
+
;; XXX: This one is used bare-bones, without a libc, so add a case
;; here just so we can keep going.
((string=? system "arm-eabi") "no-ld.so")
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index a8b74a3632..5590cd3d7e 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014, 2015, 2016, 2017, 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015, 2023 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2015-2018, 2020-2023 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015-2018, 2020-2024 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2020, 2022 Marius Bakke <marius@gnu.org>
@@ -75,6 +75,9 @@ (define (gcc-configure-flags-for-triplet target)
"--with-mode=thumb"
"--with-fpu=neon"))
+ ((string-match "x86_64-linux-gnux32" target)
+ '("--with-abi=mx32"))
+
((and (string-suffix? "-gnu" target)
(not (string-contains target "-linux")))
;; Cross-compilation of libcilkrts in GCC 5.5.0 to GNU/Hurd fails
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 @@ (define-module (guix platforms x86)
#: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 @@ (define x86_64-linux
(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 @@ (define (gnu-triplet->nix-system triplet)
(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)
--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
next prev parent reply other threads:[~2024-01-02 7:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-02 7:26 [bug#68202] [PATCH 0/5] Add support for x86_64-linux-gnux32 Efraim Flashner
2024-01-02 7:27 ` Efraim Flashner [this message]
2024-01-02 7:27 ` [bug#68202] [PATCH 2/5] gnu: Add target-x32? Efraim Flashner
2024-01-08 9:20 ` Simon Tournier
2024-01-08 10:05 ` Efraim Flashner
2024-01-02 7:27 ` [bug#68202] [PATCH 3/5] gnu: openssl: Fix building on x86_64-linux-gnux32 Efraim Flashner
2024-01-02 7:27 ` [bug#68202] [PATCH 4/5] gnu: gmp: " Efraim Flashner
2024-01-02 7:27 ` [bug#68202] [PATCH 5/5] gnu: libsigsegv: Fix building for x86_64-linux-gnux32 Efraim Flashner
2024-01-03 8:43 ` Mathieu Othacehe
2024-01-03 8:53 ` Efraim Flashner
2024-01-05 11:22 ` bug#68202: [PATCH 0/5] Add support " Efraim Flashner
2024-01-08 17:14 ` [bug#68202] " Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=626cb5a810638e59f9d3f2b7ca8b5664e91c3a36.1704179455.git.efraim@flashner.co.il \
--to=efraim@flashner.co.il \
--cc=68202@debbugs.gnu.org \
--cc=dev@jpoiret.xyz \
--cc=guix@cbaines.net \
--cc=ludo@gnu.org \
--cc=me@tobias.gr \
--cc=othacehe@gnu.org \
--cc=rekado@elephly.net \
--cc=zimon.toutoune@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).