all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd.
@ 2024-11-10 10:32 Janneke Nieuwenhuizen
  2024-11-10 10:37 ` [bug#74290] [PATCH 01/31] gnu: mig: Update to v1.8+git20231217 Janneke Nieuwenhuizen
                   ` (32 more replies)
  0 siblings, 33 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:32 UTC (permalink / raw)
  To: 74290; +Cc: Jan (janneke) Nieuwenhuizen

From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>

Hi,

Lo and behold, the 64bit Hurd boots!  Again, thanks to the help from the
kind folks over at libera #hurd and their excellent work.  Do something like:

--8<---------------cut here---------------start------------->8---
./pre-inst-env guix system image --image-type=hurd64-qcow2 \
  gnu/system/examples/bare-hurd.tmpl
--8<---------------cut here---------------end--------------->8---

producing something like: /gnu/store/...-disk-image.

Run the image in QEMU:

--8<---------------cut here---------------start------------->8---
guix shell qemu@7 -- qemu-system-x86_64                 \
--machine q35                                           \
-m 4096                                                 \
--enable-kvm                                            \
--device rtl8139,netdev=net0                            \
--netdev user,id=net0,hostfwd=tcp:0.0.0.0:11022-:2222   \
--snapshot                                              \
--hda /gnu/store/...-disk-image
--8<---------------cut here---------------end--------------->8---

and login

--8<---------------cut here---------------start------------->8---
11:03:20 janneke@dundal:~/src/guix/hurd-team 
$ ssh -p 11022 root@localhost
Last login: Sun Nov 10 10:09:00 2024 from 10.0.2.2


  This is the GNU Hurd.  Welcome.

root@guixygnu ~# uname -a
GNU guixygnu 0.9 GNU-Mach 1.8/Hurd-0.9 x86_64 GNU
--8<---------------cut here---------------end--------------->8---

Most notably, besides the expected updates, this series adds an indirection
for gcc and gcc-toolchain, (current-gcc) and (current-gcc-toolchain)
respectively, as the 64bit Hurd needs gcc-14.  We may also want to think about
image names hurd64-qcow2 etc. and their defaults, vs hurd-qcow2/hurd32-qcow2.
We'll probably also want a 64bit childhurd service, etc, etc...

This series builds on/waits for #73927, which I intend to rebase and push
later this weekend if there are no further comments.  And I guess that the
pending blog post will also need an update :)

For your hacking convenience I have reset and updated the `hurd-team' branch.

Greetings,
Janneke

Janneke Nieuwenhuizen (31):
  gnu: mig: Update to v1.8+git20231217.
  gnu: gnumach: Update to v1.8+git20240714.
  gnu: hurd: Update to v0.9.git20240714.
  gnu: gcc: Add indirections current-gcc, current-gcc-toolchain.
  gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd.
  gnu: cross-libc: Support cross-building for the 64bit Hurd.
  gnu: bash-minimal: Fix build for 64bit Hurd.
  gnu: elfutils: Fix build for 64bit Hurd.
  gnu: grep: Fix build for the 64bit Hurd.
  gnu: patch: Fix build for the 64bit Hurd.
  gnu: libxcrypt: Support the 64bit Hurd.
  gnu: libstdc++: Support the 64bit Hurd.
  gnu: gcc-13, gcc-14: Support being used as parent for gcc-static.
  DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd.
  system: image: Add hurd64 image types.
  gnu: Add libgpg-error-1.50.
  gnu: libgcrypt: Use libgpg-error-1.50 for the 64bit Hurd.
  gnu: perl: Support cross-building for the 64bit Hurd.
  gnu: openssl-3.0: Support the 64bit Hurd.
  gnu: pciutils: Support the 64bit Hurd.
  gnu: libpciaccess: Support the 64bit Hurd.
  gnu: netdde: Update to c0ef248dc7c5ccc1273e2a796f3ece30c5b645df.
  gnu: netdde: Support the 64bit Hurd.
  gnu: rumpkernel: Update to f1ffd6405f225336e595a0f99f01095ed7438337.
  gnu: rumpkernel: Support the 64bit Hurd.
  gnu: hurd: Build fixes for the 64bit Hurd.
  gnu: git-minimal: Support the 64bit Hurd.
  gnu: inetutils: Fix build for the 64bit Hurd.
  gnu: grub: Fix build for the 64bit Hurd.
  gnu: guile-fibers: Fix build for the 64bit Hurd.
  system: hurd: Use 64bit gnumach for the 64bit Hurd.

 doc/guix.texi                                 |   9 +-
 gnu/ci.scm                                    |   4 +-
 gnu/local.mk                                  |   9 +
 gnu/packages/admin.scm                        |  14 +-
 gnu/packages/avr.scm                          |   7 +-
 gnu/packages/base.scm                         |  74 ++++---
 gnu/packages/bash.scm                         |   9 +
 gnu/packages/benchmark.scm                    |   6 +-
 gnu/packages/bootloaders.scm                  |  10 +-
 gnu/packages/bootstrap.scm                    |  46 ++++-
 gnu/packages/c.scm                            |   4 +-
 gnu/packages/chicken.scm                      |   7 +-
 gnu/packages/commencement.scm                 |  35 ++--
 gnu/packages/containers.scm                   |   5 +-
 gnu/packages/cross-base.scm                   |  27 +--
 gnu/packages/crypto.scm                       |  15 ++
 gnu/packages/dlang.scm                        |   3 +-
 gnu/packages/elf.scm                          |   6 +-
 gnu/packages/engineering.scm                  |   4 +-
 gnu/packages/gawk.scm                         |   3 +-
 gnu/packages/gcc.scm                          |  69 ++++---
 gnu/packages/gnupg.scm                        |  19 +-
 gnu/packages/golang.scm                       |   3 +-
 gnu/packages/guile-xyz.scm                    |   2 +-
 gnu/packages/hurd.scm                         | 187 ++++++++++++------
 gnu/packages/julia-xyz.scm                    |   3 +-
 gnu/packages/lisp.scm                         |   3 +-
 gnu/packages/llvm.scm                         |   7 +-
 gnu/packages/make-bootstrap.scm               |  60 +++---
 gnu/packages/mpi.scm                          |   3 +-
 gnu/packages/parallel.scm                     |   5 +-
 gnu/packages/patches/gnumach-version.patch    |  23 +++
 gnu/packages/patches/grub-hurd64.patch        |  32 +++
 gnu/packages/patches/hurd-64bit.patch         |  56 ++++++
 gnu/packages/patches/inetutils-hurd64.patch   |  65 ++++++
 .../patches/libpciaccess-hurd64.patch         |  58 ++++++
 gnu/packages/patches/libxcrypt-hurd64.patch   |  38 ++++
 gnu/packages/patches/netdde-csum.patch        |  18 ++
 gnu/packages/patches/openssl-hurd64.patch     |  99 ++++++++++
 gnu/packages/patches/pciutils-hurd64.patch    |  31 +++
 gnu/packages/pciutils.scm                     |  25 ++-
 gnu/packages/perl.scm                         |  20 +-
 gnu/packages/rocm.scm                         |   3 +-
 gnu/packages/tls.scm                          |   9 +
 gnu/packages/version-control.scm              |   8 +-
 gnu/packages/xorg.scm                         |  23 ++-
 gnu/system.scm                                |   1 -
 gnu/system/hurd.scm                           |  11 +-
 gnu/system/images/hurd.scm                    |  47 ++++-
 guix/packages.scm                             |   8 +-
 guix/platforms/x86.scm                        |  11 +-
 guix/utils.scm                                |  15 +-
 m4/guix.m4                                    |  12 +-
 53 files changed, 1025 insertions(+), 246 deletions(-)
 create mode 100644 gnu/packages/patches/gnumach-version.patch
 create mode 100644 gnu/packages/patches/grub-hurd64.patch
 create mode 100644 gnu/packages/patches/hurd-64bit.patch
 create mode 100644 gnu/packages/patches/inetutils-hurd64.patch
 create mode 100644 gnu/packages/patches/libpciaccess-hurd64.patch
 create mode 100644 gnu/packages/patches/libxcrypt-hurd64.patch
 create mode 100644 gnu/packages/patches/netdde-csum.patch
 create mode 100644 gnu/packages/patches/openssl-hurd64.patch
 create mode 100644 gnu/packages/patches/pciutils-hurd64.patch


base-commit: 7105e7125882be35e334448eafd6d81b37b627f0
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 01/31] gnu: mig: Update to v1.8+git20231217.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
@ 2024-11-10 10:37 ` Janneke Nieuwenhuizen
  2024-11-10 10:37 ` [bug#74290] [PATCH 02/31] gnu: gnumach: Update to v1.8+git20240714 Janneke Nieuwenhuizen
                   ` (31 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:37 UTC (permalink / raw)
  To: 74290

* gnu/packages/hurd.scm (mig): Update to v1.8+git20231217.

Change-Id: I0e531ecc7fdcfbefe2e0e24d7b2fb5e0fe8a3ae2
---
 gnu/packages/hurd.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 9c1681f236..0a7db31e1c 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -93,7 +93,7 @@ (define-public gnumach-headers
 (define-public mig
   (package
     (name "mig")
-    (version "1.8+git20230520")
+    (version "1.8+git20231217")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -102,7 +102,7 @@ (define-public mig
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "10r0fdjqjzqsy6ajb21rifvhw0wpjvrw6a1zdyliqlzqny5k0qlz"))))
+                "1mx7w5vzw5ws0zplm1y6s679jb1g2hjkiwl3dlk5lxys0dxs5g4g"))))
     (build-system gnu-build-system)
     ;; Flex is needed both at build and run time.
     (inputs (list gnumach-headers flex))
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 02/31] gnu: gnumach: Update to v1.8+git20240714.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
  2024-11-10 10:37 ` [bug#74290] [PATCH 01/31] gnu: mig: Update to v1.8+git20231217 Janneke Nieuwenhuizen
@ 2024-11-10 10:37 ` Janneke Nieuwenhuizen
  2024-11-10 11:45   ` janneke
  2024-11-10 10:37 ` [bug#74290] [PATCH 03/31] gnu: hurd: Update to v0.9.git20240714 Janneke Nieuwenhuizen
                   ` (30 subsequent siblings)
  32 siblings, 1 reply; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:37 UTC (permalink / raw)
  To: 74290

* gnu/packages/patches/gnumach-version.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/hurd.scm (gnumach-headers): Update to v1.8+git20240714 and use
it.

Change-Id: I147c64021c2ee79dfc4cd4fd9a29529eef8890c5
---
 gnu/local.mk                               |  1 +
 gnu/packages/hurd.scm                      |  9 ++++-----
 gnu/packages/patches/gnumach-version.patch | 23 ++++++++++++++++++++++
 3 files changed, 28 insertions(+), 5 deletions(-)
 create mode 100644 gnu/packages/patches/gnumach-version.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 2c810117eb..4d3ee9ea35 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1459,6 +1459,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gnome-session-support-elogind.patch	\
   %D%/packages/patches/gnome-tweaks-search-paths.patch		\
   %D%/packages/patches/gnulib-bootstrap.patch			\
+  %D%/packages/patches/gnumach-version.patch			\
   %D%/packages/patches/gnupg-default-pinentry.patch		\
   %D%/packages/patches/gnupg-1-build-with-gcc10.patch		\
   %D%/packages/patches/gnutls-skip-trust-store-test.patch	\
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 0a7db31e1c..28f39cc448 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -57,21 +57,20 @@ (define (hurd-source-url version)
                  version ".tar.gz"))
 
 (define-public gnumach-headers
-  (let ((revision "0")
-        (commit "2556fdece900d67529d5eda01f1bdaae4ffe96b0"))
+  (let ((commit "v1.8+git20240714"))
     (package
       (name "gnumach-headers")
-      (version (git-version "1.8" revision commit))
+      (version (string-drop commit 1))
       (source
        (origin
          (method git-fetch)
          (uri (git-reference
                (url "https://git.savannah.gnu.org/git/hurd/gnumach.git")
                (commit commit)))
+         (patches (search-patches "gnumach-version.patch"))
          (file-name (git-file-name "gnumach" version))
          (sha256
-          (base32
-           "1lzsbix0l4jhab38pvwnmk7ip1lsn7m5smhnrciqajsqnadsnlzs"))))
+          (base32 "0ykav1kx0bgxcxw04bpcsh5s4531fzdkahjgrlsfs2h3w3vfkga0"))))
       (build-system gnu-build-system)
       (arguments
        `(#:phases
diff --git a/gnu/packages/patches/gnumach-version.patch b/gnu/packages/patches/gnumach-version.patch
new file mode 100644
index 0000000000..aec3c86a16
--- /dev/null
+++ b/gnu/packages/patches/gnumach-version.patch
@@ -0,0 +1,23 @@
+Upstream-status: Taken from Debian upstream:
+    <https://salsa.debian.org/hurd-team/gnumach/-/raw/master/debian/patches/12_version_suffix.patch>
+
+Index: gnumach/configure.ac
+===================================================================
+--- gnumach.orig/configure.ac
++++ gnumach/configure.ac
+@@ -19,6 +19,7 @@ AC_PREREQ([2.57])
+ m4_include([version.m4])
+ AC_INIT([AC_PACKAGE_NAME], [AC_PACKAGE_VERSION], [AC_PACKAGE_BUGREPORT],
+   [AC_PACKAGE_TARNAME])
++AC_SUBST([PACKAGE_VERSION_SUFFIX])
+ AC_CONFIG_SRCDIR([kern/ipc_kobject.c])
+ 
+ if test -z "${CFLAGS+set}"; then
+Index: gnumach/version.c.in
+===================================================================
+--- gnumach.orig/version.c.in
++++ gnumach/version.c.in
+@@ -1,2 +1,2 @@
+ /* @configure_input@ */
+-const char version[] = "@PACKAGE_NAME@ @PACKAGE_VERSION@";
++const char version[] = "@PACKAGE_NAME@ @PACKAGE_VERSION@@PACKAGE_VERSION_SUFFIX@";
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 03/31] gnu: hurd: Update to v0.9.git20240714.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
  2024-11-10 10:37 ` [bug#74290] [PATCH 01/31] gnu: mig: Update to v1.8+git20231217 Janneke Nieuwenhuizen
  2024-11-10 10:37 ` [bug#74290] [PATCH 02/31] gnu: gnumach: Update to v1.8+git20240714 Janneke Nieuwenhuizen
@ 2024-11-10 10:37 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 04/31] gnu: gcc: Add indirections current-gcc, current-gcc-toolchain Janneke Nieuwenhuizen
                   ` (29 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:37 UTC (permalink / raw)
  To: 74290

* gnu/packages/hurd.scm (hurd-headers): Update to v0.9.git20240714.
(hurd)[arguments]: Remove rumpdisk build hack from "prepare-addons" stage.
Instead, when cross-compiling, add stage "fixup-cross-configure" to enable
rumpdisk.
* gnu/system.scm (hurd-multiboot-modules): Remove
"--x-xattr-translator-records" option that has been removed and is now the
default.

Change-Id: I4609b5a959c1ece98e2fe1aedbb1d31d6edadcca
---
 gnu/packages/hurd.scm | 12 +++++++++---
 gnu/system.scm        |  1 -
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 28f39cc448..06fae1bd3b 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -132,7 +132,7 @@ (define-public mig
 
 (define-public hurd-headers
   (let ((revision "3")
-        (commit "v0.9.git20231217"))
+        (commit "v0.9.git20240714"))
     (package
       (name "hurd-headers")
       (version (string-drop commit 1))
@@ -143,7 +143,7 @@ (define-public hurd-headers
                       (commit commit)))
                 (sha256
                  (base32
-                  "1d138kzhil6s5gf9di8grpz1iziakyfv037wkc8s7qyd61imm31d"))
+                  "0wvzil3llmrjg7ymwqs86d11bm5fl771jwncv7kk679lsvqca0ll"))
                 (file-name (git-file-name name version))))
       (build-system gnu-build-system)
       (native-inputs
@@ -336,7 +336,7 @@ (define-public hurd
              ;; Makefile. libdde_linux26 is built later in its own phase.
              (substitute* "Makefile"
                (("libbpf ")
-                "libbpf libmachdevdde libddekit rumpdisk"))))
+                "libbpf libmachdevdde libddekit "))))
          (add-after 'unpack 'find-tirpc
            (lambda* (#:key inputs #:allow-other-keys)
              (for-each (lambda (var)
@@ -362,6 +362,12 @@ (define-public hurd
                (("#include <rpc/pmap_prot.h>" m)
                 (string-append "#include <rpc/types.h>\n#include <rpc/xdr.h>\n" m)))
              #t))
+         ,@(if (%current-target-system)
+               '((add-after 'configure 'fixup-cross-configure
+                   (lambda _
+                     (substitute* "config.make"
+                       (("HAVE_LIBRUMP = no") "HAVE_LIBRUMP = yes")))))
+               '())
          (add-before 'build 'pre-build
            (lambda _
              ;; Don't change the ownership of any file at this time.
diff --git a/gnu/system.scm b/gnu/system.scm
index 533a4154d6..6e1ebbcc9c 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -1534,7 +1534,6 @@ (define (hurd-multiboot-modules os)
                 "--multiboot-command-line='${kernel-command-line}'"
                 "--exec-server-task='${exec-task}'"
                 "--store-type=typed"
-                "--x-xattr-translator-records"
                 "'${root}'"
                 "'$(fs-task=task-create)'"))
          (target (%current-target-system))
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 04/31] gnu: gcc: Add indirections current-gcc, current-gcc-toolchain.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (2 preceding siblings ...)
  2024-11-10 10:37 ` [bug#74290] [PATCH 03/31] gnu: hurd: Update to v0.9.git20240714 Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 05/31] gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd Janneke Nieuwenhuizen
                   ` (28 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290
  Cc: Andreas Enge, Efraim Flashner, Ekaitz Zarraga,
	Guillaume Le Vaillant, Katherine Cox-Buday, Ludovic Courtès,
	Munyoki Kilyungi, Sharlatan Hellseher, Simon Tournier,
	Vagrant Cascadian, jgart

Throughout: use (current-gcc) and (current-gcc-toolchain) instead of gcc and
gcc-toolchain.

* gnu/packages/gcc.scm (current-gcc): New procedure.
(gcc): Deprecate.
* gnu/packages/commencement.scm (current-gcc-toolchain): New procedure.
(gcc-toolchain): Deprecate.

Change-Id: I538897e53e2c9956abdc53c67621bb52cbd78a50
---
 gnu/packages/avr.scm            |  7 ++++---
 gnu/packages/benchmark.scm      |  6 ++++--
 gnu/packages/bootloaders.scm    |  2 +-
 gnu/packages/bootstrap.scm      |  4 ++--
 gnu/packages/c.scm              |  4 ++--
 gnu/packages/chicken.scm        |  7 ++++---
 gnu/packages/commencement.scm   | 33 +++++++++++++++++++--------------
 gnu/packages/containers.scm     |  5 +++--
 gnu/packages/cross-base.scm     |  4 ++--
 gnu/packages/dlang.scm          |  3 ++-
 gnu/packages/engineering.scm    |  4 ++--
 gnu/packages/gawk.scm           |  3 ++-
 gnu/packages/gcc.scm            | 21 ++++++++++++++-------
 gnu/packages/golang.scm         |  3 ++-
 gnu/packages/julia-xyz.scm      |  3 ++-
 gnu/packages/lisp.scm           |  3 ++-
 gnu/packages/llvm.scm           |  7 ++++---
 gnu/packages/make-bootstrap.scm | 20 ++++++++++----------
 gnu/packages/mpi.scm            |  3 ++-
 gnu/packages/parallel.scm       |  5 +++--
 gnu/packages/rocm.scm           |  3 ++-
 21 files changed, 88 insertions(+), 62 deletions(-)

diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm
index 6042c1bd55..00dc124aa9 100644
--- a/gnu/packages/avr.scm
+++ b/gnu/packages/avr.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -53,7 +54,7 @@ (define make-avr-binutils
       (inherit (cross-binutils "avr"))
       (name "avr-binutils"))))
 
-(define* (make-avr-gcc/implementation #:key (xgcc gcc))
+(define* (make-avr-gcc/implementation #:key (xgcc (current-gcc)))
   "Return a XGCC-base cross-compiler for the AVR target."
   (let ((xgcc (cross-gcc "avr" #:xgcc xgcc #:xbinutils (make-avr-binutils))))
     (package
@@ -96,7 +97,7 @@ (define* (make-avr-gcc/implementation #:key (xgcc gcc))
               (variable "CROSS_LIBRARY_PATH")
               (files '("avr/lib")))))
       (native-inputs
-       `(("gcc" ,gcc)
+       `(("gcc" ,(current-gcc))
          ,@(package-native-inputs xgcc))))))
 
 (define make-avr-gcc
@@ -136,7 +137,7 @@ (define* (make-avr-libc/implementation #:key
 (define make-avr-libc
   (memoize make-avr-libc/implementation))
 
-(define* (make-avr-toolchain/implementation #:key (xgcc gcc))
+(define* (make-avr-toolchain/implementation #:key (xgcc (current-gcc)))
   (let ((avr-binutils (make-avr-binutils))
         (avr-libc (make-avr-libc #:xgcc (cross-gcc "avr" #:xgcc xgcc)))
         (avr-gcc (make-avr-gcc #:xgcc xgcc)))
diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm
index 326bbc99b4..c802e105ed 100644
--- a/gnu/packages/benchmark.scm
+++ b/gnu/packages/benchmark.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2022 Tomasz Jeneralczyk <tj@schwi.pl>
 ;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -75,8 +76,8 @@ (define-module (gnu packages benchmark)
 
 ;; Lazily resolve the gcc-toolchain to avoid a circular dependency.
 (define gcc-toolchain*
-  (delay (module-ref (resolve-interface '(gnu packages commencement))
-                     'gcc-toolchain)))
+  (delay ((module-ref (resolve-interface '(gnu packages commencement))
+                      'current-gcc-toolchain))))
 
 (define-public fio
   (package
@@ -379,6 +380,7 @@ (define-public phoronix-test-suite
      (list bash
            coreutils
            (force gcc-toolchain*)
+           gcc-toolchain*
            gnu-make
            gzip
            php
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index fcc1088fd6..8ae9621e5b 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -1707,7 +1707,7 @@ (define u-boot-ts-mx6
               (add-before 'build 'adjust-for-current-gcc
                 (lambda _
                   (let ((gcc-major-version #$(version-major
-                                              (package-version gcc))))
+                                              (package-version (current-gcc)))))
                     (copy-file "include/linux/compiler-gcc6.h"
                                (string-append "include/linux/compiler-gcc"
                                               gcc-major-version ".h")))
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 3743abf9fe..c4640b62e1 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2012-2020, 2024 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2018, 2019 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2017, 2020, 2024 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2018, 2020, 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2018, 2020, 2022, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2019 Carl Dong <contact@carldong.me>
 ;;; Copyright © 2019 Léo Le Bouter <lle-bout@zaclys.net>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
@@ -311,7 +311,7 @@ (define* (glibc-dynamic-linker
                                         gnu-triplet->nix-system)
                                  (%current-system))))
   "Return the name of Glibc's dynamic linker for SYSTEM."
-  ;; See the 'SYSDEP_KNOWN_INTERPRETER_NAMES' cpp macro in libc.
+  ;; See the appropriate 'shlib-versions' file in libc.
   (let ((platform (false-if-platform-not-found
                    (lookup-platform-by-system system))))
     (cond
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index 13fdb99424..f52a7c603e 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2019, 2020, 2022-2024 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2019, 2021 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2019 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2020 Katherine Cox-Buday <cox.katherine.e@gmail.com>
 ;;; Copyright © 2020, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
@@ -178,7 +178,7 @@ (define-public cproc
                           (string-append "--with-ld=" #$(ld-for-target))
                           (string-append "--with-gcc-libdir=" gcc-lib))))))))
       (inputs `(("qbe" ,qbe)
-                ("gcc:lib" ,gcc "lib")))
+                ("gcc:lib" ,(current-gcc) "lib")))
       (supported-systems (list "x86_64-linux" "aarch64-linux"))
       (synopsis "Simple C11 compiler backed by QBE")
       (description "@code{cproc} is a C compiler using QBE as a backend,
diff --git a/gnu/packages/chicken.scm b/gnu/packages/chicken.scm
index 3743ae3e2a..64fd3cb86b 100644
--- a/gnu/packages/chicken.scm
+++ b/gnu/packages/chicken.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
 ;;; Copyright © 2020 Evan Hanson <evhan@foldling.org>
 ;;; Copyright © 2020 raingloom <raingloom@riseup.net>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -69,9 +70,9 @@ (define-public chicken
             (files (list "var/lib/chicken/11")))))
     ;; Reference gcc-toolchain lazily to avoid circular module dependency
     ;; problems.
-    (propagated-inputs (list (module-ref (resolve-interface
-                                          '(gnu packages commencement))
-                                         'gcc-toolchain)))
+    (propagated-inputs (list ((module-ref (resolve-interface
+                                           '(gnu packages commencement))
+                                          'current-gcc-toolchain))))
     (home-page "https://www.call-cc.org/")
     (synopsis "R5RS Scheme implementation that compiles native code via C")
     (description
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index ce40f0cea6..2b43759dac 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -73,7 +73,8 @@ (define-module (gnu packages commencement)
   #:use-module (guix utils)
   #:use-module (srfi srfi-1)
   #:use-module (ice-9 vlist)
-  #:use-module (ice-9 match))
+  #:use-module (ice-9 match)
+  #:export (current-gcc-toolchain))
 
 ;;; Commentary:
 ;;;
@@ -908,7 +909,7 @@ (define gcc-core-mesboot0
   ;; with gcc-2.95.3, binutils (2.14.0, 2.20.1a) and glibc-2.2.5 we found a
   ;; GNU toolchain triplet "that works".
   (package
-    (inherit gcc)
+    (inherit (current-gcc))
     (name "gcc-core-mesboot0")
     (version "2.95.3")
     (source (origin
@@ -2319,19 +2320,19 @@ (define libstdc++-boot0-gcc7
 
 (define gcc-boot0
   (package
-    (inherit gcc)
+    (inherit (current-gcc))
     (name "gcc-cross-boot0")
-    (outputs (delete "debug" (package-outputs gcc)))
+    (outputs (delete "debug" (package-outputs (current-gcc))))
     (source
      (bootstrap-origin
       (origin
-        (inherit (package-source gcc))
+        (inherit (package-source (current-gcc)))
         (snippet
          #~(begin
              ;; XXX: The GCC test suite contains files with non-ASCII file
              ;; names, which cannot be repacked by BOOTSTRAP-ORIGIN.  Nor
              ;; can it be deleted from Guile, so resort to this evil hack.
-             #$(origin-snippet (package-source gcc))
+             #$(origin-snippet (package-source (current-gcc)))
              (system* #$(file-append (let-system system
                                        ;; 'coreutils-boot0' is Linux-only.
                                        (if (target-hurd? system)
@@ -2348,7 +2349,7 @@ (define gcc-boot0
                   (ice-9 regex)
                   (srfi srfi-1)
                   (srfi srfi-26))
-      (substitute-keyword-arguments (package-arguments gcc)
+      (substitute-keyword-arguments (package-arguments (current-gcc))
         ((#:configure-flags flags)
          #~(append (list #$(string-append "--target=" (boot-triplet))
 
@@ -2436,7 +2437,7 @@ (define gcc-boot0
                    (with-directory-excursion
                        (string-append out "/lib/gcc/"
                                       #$(boot-triplet)
-                                      "/" #$(package-version gcc))
+                                      "/" #$(package-version (current-gcc)))
                      (symlink "libgcc.a" "libgcc_eh.a"))))))))))
 
     (inputs `(("gmp-source" ,(bootstrap-origin (package-source gmp-6.0)))
@@ -2951,7 +2952,7 @@ (define/system-dependent glibc-final-with-bootstrap-bash
 (define (cross-gcc-wrapper gcc binutils glibc bash)
   "Return a wrapper for the pseudo-cross toolchain GCC/BINUTILS/GLIBC
 that makes it available under the native tool names."
-  (package (inherit gcc)
+  (package (inherit (current-gcc))
     (name (string-append (package-name gcc) "-wrapped"))
     (source #f)
     (build-system trivial-build-system)
@@ -3218,7 +3219,7 @@ (define gcc-final
                   (srfi srfi-26)
                   ,@%default-gnu-modules)
 
-      (substitute-keyword-arguments (package-arguments gcc)
+      (substitute-keyword-arguments (package-arguments (current-gcc))
         ((#:make-flags flags)
          ;; Since $LIBRARY_PATH is not honored, add the relevant flags.
          #~(let ((zlib (assoc-ref %build-inputs "zlib")))
@@ -3541,8 +3542,8 @@ (define* (make-gcc-toolchain gcc
   (let ((gcc (if libc (make-gcc-libc gcc libc) gcc))
         (libc (if libc libc glibc-final)))
     (package
-      (name (string-append (package-name gcc) "-toolchain"))
-      (version (package-version gcc))
+      (name (string-append (package-name (current-gcc)) "-toolchain"))
+      (version (package-version (current-gcc)))
       (source #f)
       (build-system trivial-build-system)
       (arguments
@@ -3639,13 +3640,17 @@ (define-public gcc-toolchain-14
   (make-gcc-toolchain gcc-14))
 
 ;; The default GCC
-(define-public gcc-toolchain
+(define (current-gcc-toolchain)
+  "The current default gcc-toolchain version."
   gcc-toolchain-11)
 
+(define-public gcc-toolchain
+  (deprecated-package "gcc-toolchain" gcc-toolchain-11))
+
 (define-public gcc-toolchain-aka-gcc
   ;; It's natural for users to try "guix install gcc".  This package
   ;; automatically "redirects" them to 'gcc-toolchain'.
-  (deprecated-package "gcc" gcc-toolchain))
+  (deprecated-package "gcc" (current-gcc-toolchain)))
 
 
 (define-public gdc-toolchain-10
diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm
index d32bc2704a..78304cebbc 100644
--- a/gnu/packages/containers.scm
+++ b/gnu/packages/containers.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz>
 ;;; Copyright © 2024 Foundation Devices, Inc. <hello@foundation.xyz>
 ;;; Copyright © 2024 Jean-Pierre De Jesus DIAZ <jean@foundation.xyz>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -533,7 +534,7 @@ (define-public podman
                   (,(string-append #$catatonit      "/bin")
                    ,(string-append #$conmon         "/bin")
                    ,(string-append #$crun           "/bin")
-                   ,(string-append #$gcc            "/bin") ; cpp
+                   ,(string-append #$(current-gcc)  "/bin") ; cpp
                    ,(string-append #$iptables       "/sbin")
                    ,(string-append #$passt          "/bin")
                    ,(string-append #$procps         "/bin") ; ps
@@ -667,7 +668,7 @@ (define-public buildah
                   (,(string-append #$output "/_guix")))
                 `("PATH" suffix
                   (,(string-append #$crun           "/bin")
-                   ,(string-append #$gcc            "/bin") ; cpp
+                   ,(string-append #$(current-gcc)  "/bin") ; cpp
                    ,(string-append #$passt          "/bin")
                    "/run/privileged/bin")))))
           (add-after 'install 'install-completions
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index cecc21083e..9c701efae8 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013-2018, 2020, 2023-2024 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2016, 2019, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2016, 2019, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
@@ -61,7 +61,7 @@ (define-syntax %xgcc
   ;;
   ;; Note: This is a macro so that we do not refer to 'gcc' from the top
   ;; level, which would lead to circular-dependency issues.
-  (identifier-syntax gcc))
+  (identifier-syntax (current-gcc)))
 
 (define %gcc-include-paths
   ;; Environment variables for header search paths.
diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm
index 8bf0ee685e..654d5b2281 100644
--- a/gnu/packages/dlang.scm
+++ b/gnu/packages/dlang.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2021, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2022 ( <paren@disroot.org>
 ;;; Copyright © 2022 Esther Flashner <esther@flashner.co.il>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -426,7 +427,7 @@ (define dmd-bootstrap
     (build-system gnu-build-system)
     (arguments
      (list
-      #:disallowed-references (list (gexp-input (canonical-package gcc)
+      #:disallowed-references (list (gexp-input (canonical-package (current-gcc))
                                                 "lib"))
       ;; Disable tests, as gdmd cannot cope with some arguments used such as
       ;; '-conf'.
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 6f449f0c39..07f3edd4dd 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2336,8 +2336,8 @@ (define-public freehdl
            coreutils
 
            ;; Lazily resolve the gcc-toolchain to avoid a circular dependency.
-           (module-ref (resolve-interface '(gnu packages commencement))
-                       'gcc-toolchain)
+           ((module-ref (resolve-interface '(gnu packages commencement))
+                        'current-gcc-toolchain))
 
            guile-2.2
            perl
diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm
index 6a77a692f5..a8b8369d7b 100644
--- a/gnu/packages/gawk.scm
+++ b/gnu/packages/gawk.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2018, 2022-2024 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2021, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -227,7 +228,7 @@ (define-public cppawk
     (inputs
      (list coreutils                    ; For dirname, mktemp, printf, rm
            gawk-mpfr                    ; Default variant, but supports others
-           gcc                          ; For cpp
+           (current-gcc)                ; For cpp
            sed))
     (home-page "https://www.kylheku.com/cgit/cppawk/")
     (synopsis "Wrapper script that adds C preprocessing to Awk")
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index c9e475b676..3b5d05b9a9 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
 ;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2024 Nguyễn Gia Phong <mcsinyx@disroot.org>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -57,7 +58,8 @@ (define-module (gnu packages gcc)
   #:use-module (guix utils)
   #:use-module (srfi srfi-1)
   #:use-module (ice-9 match)
-  #:use-module (ice-9 regex))
+  #:use-module (ice-9 regex)
+  #:export (current-gcc))
 
 (define %gcc-infrastructure
   ;; Base URL for GCC's infrastructure.
@@ -857,7 +859,12 @@ (define-public gcc-14
 
 ;; Note: When changing the default gcc version, update
 ;;       the gcc-toolchain-* definitions.
-(define-public gcc gcc-11)
+(define (current-gcc)
+  "The current default gcc version."
+  gcc-11)
+
+(define-public gcc
+  (deprecated-package "gcc" gcc-11))
 
 \f
 ;;;
@@ -868,7 +875,7 @@ (define-public gcc-2.95
   ;; Note: 'gcc-core-mesboot0' in commencement.scm provides 2.95 as well, but
   ;; with additional tricks to support compilation with TinyCC and Mes-libc.
   (package
-    (inherit gcc)
+    (inherit (current-gcc))
     (version "2.95.3")
     (source (origin
               (method url-fetch)
@@ -1045,7 +1052,7 @@ (define-public (make-libstdc++ gcc)
 
 (define libstdc++
   ;; Libstdc++ matching the default GCC.
-  (make-libstdc++ gcc))
+  (make-libstdc++ (current-gcc)))
 
 (define libstdc++-headers
   ;; XXX: This package is for internal use to work around
@@ -1100,7 +1107,7 @@ (define (make-libiberty gcc)
     (synopsis "Collection of subroutines used by various GNU programs")))
 
 (define-public libiberty
-  (make-libiberty gcc))
+  (make-libiberty (current-gcc)))
 
 (define* (custom-gcc gcc name languages
                      #:optional
@@ -1157,7 +1164,7 @@ (define-public gfortran-13
 
 (define-public gfortran
   (hidden-package
-   (custom-gcc gcc
+   (custom-gcc (current-gcc)
                "gfortran" '("fortran")
                %generic-search-paths)))
 
@@ -1186,7 +1193,7 @@ (define-public gdc-11
 ;;; Alias tracking the latest GDC version.
 (define-public gdc
   (hidden-package
-   (custom-gcc gcc "gdc" '("d")
+   (custom-gcc (current-gcc) "gdc" '("d")
                %generic-search-paths)))
 
 (define-public (make-libgccjit gcc)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 00dde61f2c..27e0db9cb1 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -47,6 +47,7 @@
 ;;; Copyright © 2024 Greg Hogan <code@greghogan.com>
 ;;; Copyright © 2024 Brennan Vincent <brennan@umanwizard.com>
 ;;; Copyright © 2024 André Batista <nandre@riseup.net>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -253,7 +254,7 @@ (define-public go-1.4
     (inputs
      `(("tzdata" ,tzdata)
        ("pcre" ,pcre)
-       ("gcc:lib" ,(canonical-package gcc) "lib")))
+       ("gcc:lib" ,(canonical-package (current-gcc)) "lib")))
     (native-inputs
      (list pkg-config which net-base perl))
 
diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index 77385ee6e0..3860da608e 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2021 jgart <jgart@dismail.de>
 ;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus@gmail.com>
 ;;; Copyright © 2024 Spencer King <spencer.king@geneoscopy.com>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -5170,7 +5171,7 @@ (define-public julia-quadmath
     (propagated-inputs
      (list julia-requires))
     (inputs
-     `(("gcc:lib" ,gcc "lib")))
+     `(("gcc:lib" ,(current-gcc) "lib")))
     (native-inputs
      (list julia-specialfunctions))
     (home-page "https://github.com/JuliaMath/Quadmath.jl")
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 6c16d8ab71..8dc3208327 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -29,6 +29,7 @@
 ;;; Copyright © 2024 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2024 bigbug <bigbookofbug@proton.me>
 ;;; Copyright © 2024 Ashish SHUKLA <ashish.is@lostca.se>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -388,7 +389,7 @@ (define-public clasp-cl
         (base32 "10jjhcid6qp64gx29iyy5rqqijwy8hrvx66f0xabdj8w3007ky39"))))
     (build-system gnu-build-system)
     (inputs
-     (list boost clang-15 fmt `(,gcc "lib") gmp libelf libunwind llvm-15))
+     (list boost clang-15 fmt `(,(current-gcc) "lib") gmp libelf libunwind llvm-15))
     (native-inputs
      (list binutils-gold ninja pkg-config sbcl))
     (arguments
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 9f851a478e..cd2ad311a0 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -27,6 +27,7 @@
 ;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
 ;;; Copyright © 2023 Hilton Chain <hako@ultrarare.space>
 ;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -89,8 +90,8 @@ (define-module (gnu packages llvm)
 
 ;; Lazily resolve the gcc-toolchain to avoid a circular dependency.
 (define gcc-toolchain*
-  (delay (module-ref (resolve-interface '(gnu packages commencement))
-                     'gcc-toolchain)))
+  (delay ((module-ref (resolve-interface '(gnu packages commencement))
+                      'current-gcc-toolchain))))
 
 (define* (system->llvm-target #:optional
                               (system (or (and=> (%current-target-system)
@@ -250,7 +251,7 @@ (define* (clang-from-llvm llvm clang-runtime
     (native-inputs (package-native-inputs llvm))
     (inputs
      `(("libxml2" ,libxml2)
-       ("gcc-lib" ,gcc "lib")
+       ("gcc-lib" ,(current-gcc) "lib")
        ,@(package-inputs llvm)
        ,@(if tools-extra
              `(("clang-tools-extra" ,tools-extra))
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index edc536bff4..c6293b9a38 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2017, 2021 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018, 2019 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2018, 2019, 2021, 2022, 2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2018, 2019, 2021, 2022, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2019, 2020, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
@@ -108,13 +108,13 @@ (define gcc-for-bootstrap
   (mlambdaq (glibc)
     "Return a variant of GCC that uses the bootstrap variant of GLIBC."
     (package
-      (inherit gcc)
+      (inherit (current-gcc))
       (outputs '("out")) ;all in one so libgcc_s is easily found
       (inputs
        `( ;; Distinguish the name so we can refer to it below.
          ("bootstrap-libc" ,(glibc-for-bootstrap glibc))
          ("libc:static" ,(glibc-for-bootstrap glibc) "static")
-         ,@(package-inputs gcc))))))
+         ,@(package-inputs (current-gcc)))))))
 
 (define (package-with-relocatable-glibc p)
   "Return a variant of P that uses the libc as defined by
@@ -153,7 +153,7 @@ (define (package-with-relocatable-glibc p)
                              (cons (search-path-specification
                                     (variable "CROSS_CPLUS_INCLUDE_PATH")
                                     (files '("include")))
-                                   (package-search-paths gcc)))))
+                                   (package-search-paths (current-gcc))))))
             ("cross-binutils" ,(cross-binutils target))
             ,@(%final-inputs)))
         `(("libc" ,(glibc-for-bootstrap glibc))
@@ -481,11 +481,11 @@ (define (%glibc-stripped)
 (define %gcc-static
   ;; A statically-linked GCC, with stripped-down functionality.
   (package-with-relocatable-glibc
-   (package (inherit gcc)
+   (package (inherit (current-gcc))
      (name "gcc-static")
      (outputs '("out"))                           ; all in one
      (arguments
-      (substitute-keyword-arguments (package-arguments gcc)
+      (substitute-keyword-arguments (package-arguments (current-gcc))
         ((#:modules modules %default-gnu-modules)
          `((srfi srfi-1)
            (srfi srfi-26)
@@ -536,7 +536,7 @@ (define %gcc-static
      (inputs
       `(("zlib:static" ,zlib "static")
         ("isl:static" ,isl "static")
-        ,@(package-inputs gcc)))
+        ,@(package-inputs (current-gcc))))
      (native-inputs
       (if (%current-target-system)
           `(;; When doing a Canadian cross, we need GMP/MPFR/MPC both
@@ -549,13 +549,13 @@ (define %gcc-static
             ("gmp-native" ,gmp)
             ("mpfr-native" ,mpfr)
             ("mpc-native" ,mpc)
-            ,@(package-native-inputs gcc))
-          (package-native-inputs gcc))))))
+            ,@(package-native-inputs (current-gcc)))
+          (package-native-inputs (current-gcc)))))))
 
 (define %gcc-stripped
   ;; The subset of GCC files needed for bootstrap.
   (package
-    (inherit gcc)
+    (inherit (current-gcc))
     (name "gcc-stripped")
     (build-system trivial-build-system)
     (source #f)
diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index bc1fd797d6..e956167137 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2018 Paul Garlick <pgarlick@tourbillion-technology.com>
 ;;; Copyright © 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2024 Romain Garbage <romain.garbage@inria.fr>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -378,7 +379,7 @@ (define-public openmpi-5
                                   "ompi/tools/ompi_info/param.c")
                      (("_ABSOLUTE") "")))))
 
-           #:disallowed-references (list (canonical-package gcc))))))
+           #:disallowed-references (list (canonical-package (current-gcc)))))))
 
 (define-public openmpi-c++
   (package/inherit openmpi
diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm
index 85f8a114c3..c0e3f44bcd 100644
--- a/gnu/packages/parallel.scm
+++ b/gnu/packages/parallel.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
 ;;; Copyright © 2024 David Elsing <david.elsing@posteo.net>
 ;;; Copyright © 2024 Romain Garbage <romain.garbage@inria.fr>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -665,7 +666,7 @@ (define-public openpmix
 
           ;; Don't keep a reference to GCC.
           #:disallowed-references (and (not (%current-target-system))
-                                       (list (canonical-package gcc)))
+                                       (list (canonical-package (current-gcc))))
 
           #:phases
           #~(modify-phases %standard-phases
@@ -737,7 +738,7 @@ (define-public prrte
                      (string-append "prte_launch_agent = \""
                                     #$output "/bin/prted\";\n"))))))
 
-          #:disallowed-references (list (canonical-package gcc))))
+          #:disallowed-references (list (canonical-package (current-gcc)))))
    (inputs (list libevent
                  `(,hwloc "lib")
                  openpmix))
diff --git a/gnu/packages/rocm.scm b/gnu/packages/rocm.scm
index e883371928..2f315e3985 100644
--- a/gnu/packages/rocm.scm
+++ b/gnu/packages/rocm.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
 ;;; Copyright © 2022, 2023 John Kehayias <john.kehayias@protonmail.com>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This program is free software; you can redistribute it and/or modify it
 ;;; under the terms of the GNU General Public License as published by
@@ -131,7 +132,7 @@ (define-public roct-thunk-interface
     (build-system cmake-build-system)
     (arguments `(#:tests? #f)) ; Not sure how to run tests.
     (inputs (list libdrm numactl))
-    (native-inputs (list `(,gcc "lib") pkg-config))
+    (native-inputs (list `(,(current-gcc) "lib") pkg-config))
     (home-page "https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface")
     (synopsis "Radeon Open Compute Thunk Interface")
     (description "User-mode API interfaces used to interact with the ROCk
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 05/31] gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (3 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 04/31] gnu: gcc: Add indirections current-gcc, current-gcc-toolchain Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 06/31] gnu: cross-libc: Support cross-building for the " Janneke Nieuwenhuizen
                   ` (27 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290
  Cc: Andreas Enge, Christopher Baines, Efraim Flashner, Ekaitz Zarraga,
	Josselin Poiret, Ludovic Courtès, Mathieu Othacehe,
	Simon Tournier, Tobias Geerinckx-Rice

* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Update comment on where
to find shared linker name.
* guix/platforms/x86.scm (x86_64-gnu): New exported variable.
* guix/utils.scm (target-hurd64? system-hurd64?): New procedures.
* gnu/packages/gcc.scm: (current-gcc): Use target-hurd64? in new procedure to
select gcc-14 on 64bit Hurd.
(libstdc++): Change to procedure.
(libstdc++-headers): Update accordingly.
* gnu/packages/commencement.scm (current-gcc-toolchain): Likewise, to select
gcc-toolchain-14 on 64bit Hurd.
* gnu/packages/cross-base.scm (%xgcc): Use current-gcc.
(cross-kernel-headers*): Use target-hurd? instead of custom "i586..."
matching to also use xhurd-core-headers for target-hurd64.
* gnu/packages/make-bootstrap.scm (package-with-relocatable-glibc):
Capture (current-gcc) before resetting %current-target-system.
[native-inputs]:  Move final-inputs before cross-packages.
(%glibc-stripped): Likewise.
(%gcc-static): Change to procedure.
(%gcc-stripped): Likewise, update accordingly.
(%gcc-bootstrap-tarball): Likewise, update accordingly.
* gnu/ci.scm (%core-packages): Update accordingly.
* gnu/packages/patches/gcc-14-cross-without-bootstrap.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/cross-base.scm (cross-gcc)[origin]: Use it when
cross-building gcc >= 14.

Change-Id: I4ae189e7e5188ced91744b89fe9d753b6a1fca78
---
 gnu/ci.scm                      |  4 ++--
 gnu/packages/commencement.scm   |  6 +++--
 gnu/packages/cross-base.scm     |  6 ++---
 gnu/packages/gcc.scm            | 32 +++++++++++++-------------
 gnu/packages/make-bootstrap.scm | 40 +++++++++++++++++++++------------
 guix/platforms/x86.scm          | 11 ++++++++-
 guix/utils.scm                  | 15 ++++++++++++-
 7 files changed, 76 insertions(+), 38 deletions(-)

diff --git a/gnu/ci.scm b/gnu/ci.scm
index 4e282d197f..e7e839d968 100644
--- a/gnu/ci.scm
+++ b/gnu/ci.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012-2024 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2017, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2017, 2020, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2020, 2021 Mathieu Othacehe <othacehe@gnu.org>
@@ -146,7 +146,7 @@ (define %core-packages
         %bootstrap-binaries-tarball
         %binutils-bootstrap-tarball
         (%glibc-bootstrap-tarball)
-        %gcc-bootstrap-tarball
+        (%gcc-bootstrap-tarball)
         %guile-bootstrap-tarball
         %bootstrap-tarballs))
 
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 2b43759dac..682deb89cf 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3642,10 +3642,12 @@ (define-public gcc-toolchain-14
 ;; The default GCC
 (define (current-gcc-toolchain)
   "The current default gcc-toolchain version."
-  gcc-toolchain-11)
+  (if (target-hurd64?)
+      gcc-toolchain-14
+      gcc-toolchain-11))
 
 (define-public gcc-toolchain
-  (deprecated-package "gcc-toolchain" gcc-toolchain-11))
+  (deprecated-package "gcc-toolchain" (current-gcc-toolchain)))
 
 (define-public gcc-toolchain-aka-gcc
   ;; It's natural for users to try "guix install gcc".  This package
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 9c701efae8..7b32a6b64e 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -641,9 +641,9 @@ (define* (cross-kernel-headers* target
                 ("hurd-headers" ,xhurd-headers)
                 ("hurd-minimal" ,xhurd-minimal)))))
 
-  (match target
-    ((or "i586-pc-gnu" "i586-gnu") xhurd-core-headers)
-    (_ xlinux-headers)))
+  (if (target-hurd? target)
+      xhurd-core-headers
+      xlinux-headers))
 
 (define* (cross-libc . args)
   (if (or (= (length args) 1) (contains-keyword? args))
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 3b5d05b9a9..fc3746fb05 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -861,10 +861,12 @@ (define-public gcc-14
 ;;       the gcc-toolchain-* definitions.
 (define (current-gcc)
   "The current default gcc version."
-  gcc-11)
+  (if (target-hurd64?)
+      gcc-14
+      gcc-11))
 
 (define-public gcc
-  (deprecated-package "gcc" gcc-11))
+  (deprecated-package "gcc" (current-gcc)))
 
 \f
 ;;;
@@ -903,15 +905,15 @@ (define-public gcc-2.95
     (outputs '("out"))
     (arguments
      (let ((matching-system
-             (match (%current-system)
-               ;; This package predates our 64-bit architectures.
-               ;; Force a 32-bit build targeting a similar architecture.
-               ("aarch64-linux"
-                "armhf-linux")
-               ("x86_64-linux"
-                "i686-linux")
-               (_
-                (%current-system)))))
+            (match (%current-system)
+              ;; This package predates our 64-bit architectures.
+              ;; Force a 32-bit build targeting a similar architecture.
+              ("aarch64-linux"
+               "armhf-linux")
+              ("x86_64-linux"
+               "i686-linux")
+              (_
+               (%current-system)))))
        (list #:system matching-system
              #:configure-flags #~'("--disable-werror")
 
@@ -1050,8 +1052,8 @@ (define-public (make-libstdc++ gcc)
     (propagated-inputs '())
     (synopsis "GNU C++ standard library")))
 
-(define libstdc++
-  ;; Libstdc++ matching the default GCC.
+(define (current-libstdc++)
+  ;; Libstdc++ matching the CURRENT-GCC.
   (make-libstdc++ (current-gcc)))
 
 (define libstdc++-headers
@@ -1061,7 +1063,7 @@ (define libstdc++-headers
   ;; is right under include/c++ and not under
   ;; include/c++/x86_64-unknown-linux-gnu (aka. GPLUSPLUS_TOOL_INCLUDE_DIR).
   (package
-    (inherit libstdc++)
+    (inherit (current-libstdc++))
     (name "libstdc++-headers")
     (outputs '("out"))
     (build-system trivial-build-system)
@@ -1072,7 +1074,7 @@ (define libstdc++-headers
                    (mkdir (string-append out "/include"))
                    (symlink (string-append libstdc++ "/include")
                             (string-append out "/include/c++")))))
-    (inputs `(("libstdc++" ,libstdc++)))
+    (inputs `(("libstdc++" ,(current-libstdc++))))
     (synopsis "Headers of GNU libstdc++")))
 
 (define-public libstdc++-4.9
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index c6293b9a38..18281198ba 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -124,8 +124,11 @@ (define (package-with-relocatable-glibc p)
     (glibc-for-bootstrap
      ;; `cross-libc' already returns a cross libc, so clear
      ;; %CURRENT-TARGET-SYSTEM.
-     (parameterize ((%current-target-system #f))
-       (cross-libc target))))
+     (let ((xgcc (cross-gcc target #:xgcc (current-gcc))))
+       (parameterize ((%current-target-system #f))
+         (cross-libc target #:xgcc xgcc
+                     #:xheaders (cross-kernel-headers
+                                 target #:xgcc xgcc))))))
 
   ;; Standard inputs with the above libc and corresponding GCC.
 
@@ -145,7 +148,10 @@ (define (package-with-relocatable-glibc p)
                       target
                       #:xbinutils (cross-binutils target)
                       #:libc (cross-bootstrap-libc target))))
-          `(("cross-gcc" ,(package
+          `(,@(%final-inputs)
+            ;; As versions for gcc and cross-gcc can differ, make sure to have
+            ;; cross-gcc behind gcc in CPLUS_INCLUDE_PATH.
+            ("cross-gcc" ,(package
                             (inherit xgcc)
                             (search-paths
                              ;; Ensure the cross libc headers appears on the
@@ -154,8 +160,7 @@ (define (package-with-relocatable-glibc p)
                                     (variable "CROSS_CPLUS_INCLUDE_PATH")
                                     (files '("include")))
                                    (package-search-paths (current-gcc))))))
-            ("cross-binutils" ,(cross-binutils target))
-            ,@(%final-inputs)))
+            ("cross-binutils" ,(cross-binutils target))))
         `(("libc" ,(glibc-for-bootstrap glibc))
           ("libc:static" ,(glibc-for-bootstrap glibc) "static")
           ("gcc" ,(gcc-for-bootstrap glibc))
@@ -446,7 +451,8 @@ (define (%glibc-stripped)
   ;; GNU libc's essential shared libraries, dynamic linker, and headers,
   ;; with all references to store directories stripped.  As a result,
   ;; libc.so is unusable and need to be patched for proper relocation.
-  (let ((glibc (glibc-for-bootstrap glibc)))
+  (let ((glibc (glibc-for-bootstrap glibc))
+        (gcc (current-gcc)))
     (package (inherit glibc)
       (name "glibc-stripped")
       (build-system trivial-build-system)
@@ -463,8 +469,13 @@ (define (%glibc-stripped)
        `(("libc" ,(let ((target (%current-target-system)))
                     (if target
                         (glibc-for-bootstrap
-                         (parameterize ((%current-target-system #f))
-                           (cross-libc target)))
+                         (let* ((xgcc (cross-gcc target #:xgcc gcc))
+                                (xheaders (cross-kernel-headers target
+                                                                #:xgcc xgcc)))
+                           (parameterize ((%current-target-system #f))
+                             (cross-libc target
+                                         #:xgcc xgcc
+                                         #:xheaders xheaders))))
                         glibc)))))
       (inputs
        `(("kernel-headers"
@@ -478,11 +489,12 @@ (define (%glibc-stripped)
       ;; Only one output.
       (outputs '("out")))))
 
-(define %gcc-static
+(define (%gcc-static)
   ;; A statically-linked GCC, with stripped-down functionality.
   (package-with-relocatable-glibc
    (package (inherit (current-gcc))
      (name "gcc-static")
+     (source (package-source (current-gcc)))
      (outputs '("out"))                           ; all in one
      (arguments
       (substitute-keyword-arguments (package-arguments (current-gcc))
@@ -552,7 +564,7 @@ (define %gcc-static
             ,@(package-native-inputs (current-gcc)))
           (package-native-inputs (current-gcc)))))))
 
-(define %gcc-stripped
+(define (%gcc-stripped)
   ;; The subset of GCC files needed for bootstrap.
   (package
     (inherit (current-gcc))
@@ -575,7 +587,7 @@ (define %gcc-stripped
                       (libdir     (string-append out "/lib"))
                       (includedir (string-append out "/include"))
                       (libexecdir (string-append out "/libexec"))
-                      (gcc        #$%gcc-static))
+                      (gcc        #$(%gcc-static)))
                  (copy-recursively (string-append gcc "/bin") bindir)
                  (for-each remove-store-references
                            (find-files bindir ".*"))
@@ -813,9 +825,9 @@ (define (%glibc-bootstrap-tarball)
   ;; A tarball with GNU libc's shared libraries, dynamic linker, and headers.
   (tarball-package (%glibc-stripped)))
 
-(define %gcc-bootstrap-tarball
+(define (%gcc-bootstrap-tarball)
   ;; A tarball with a dynamic-linked GCC and its headers.
-  (tarball-package %gcc-stripped))
+  (tarball-package (%gcc-stripped)))
 
 (define %guile-bootstrap-tarball
   ;; A tarball with the statically-linked, relocatable Guile.
@@ -856,7 +868,7 @@ (define %bootstrap-tarballs
            ((or "i686-linux" "x86_64-linux")
             (list %linux-libre-headers-bootstrap-tarball))
            (_
-            (list %gcc-bootstrap-tarball
+            (list (%gcc-bootstrap-tarball)
                   %binutils-bootstrap-tarball
                   (%glibc-bootstrap-tarball)
                   %bootstrap-binaries-tarball)))))
diff --git a/guix/platforms/x86.scm b/guix/platforms/x86.scm
index 0c8fc7296c..5617e6dd68 100644
--- a/guix/platforms/x86.scm
+++ b/guix/platforms/x86.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2022 Mathieu Othacehe <othacehe@gnu.org>
 ;;; Copyright © 2023, 2024 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -25,7 +26,8 @@ (define-module (guix platforms x86)
             x86_64-linux-x32
             i686-mingw
             x86_64-mingw
-            i586-gnu))
+            i586-gnu
+            x86_64-gnu))
 
 (define i686-linux
   (platform
@@ -71,3 +73,10 @@ (define i586-gnu
    (system "i586-gnu")
    (rust-target "i686-unknown-hurd-gnu")
    (glibc-dynamic-linker "/lib/ld.so.1")))
+
+(define x86_64-gnu
+  (platform
+   (target "x86_64-pc-gnu")
+   (system "x86_64-gnu")
+   (rust-target "x86_64-unknown-hurd-gnu")
+   (glibc-dynamic-linker "/lib/ld-x86-64.so.1")))
diff --git a/guix/utils.scm b/guix/utils.scm
index f161cb4ef3..e100c03365 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -17,7 +17,7 @@
 ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
 ;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
 ;;; Copyright © 2023 Philip McGrath <philip@philipmcgrath.com>
-;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
 ;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
 ;;; Copyright © 2024 Herman Rimm <herman@rimm.ee>
@@ -94,6 +94,8 @@ (define-module (guix utils)
             target-linux?
             target-hurd?
             system-hurd?
+            target-hurd64?
+            system-hurd64?
             target-mingw?
             target-x86-32?
             target-x86-64?
@@ -716,6 +718,17 @@ (define* (system-hurd?)
   "Is the current system the GNU(/Hurd) system?"
   (and=> (%current-system) target-hurd?))
 
+(define* (target-hurd64? #:optional (target (or (%current-target-system)
+                                                (%current-system))))
+  "Does TARGET represent the 64bit GNU(/Hurd) system?"
+  (and (target-hurd?)
+       (target-64bit? target)))
+
+(define* (system-hurd64?)
+  "Is the current system the 64bit GNU(/Hurd) system?"
+  (and (system-hurd?)
+       (target-64bit? (%current-system))))
+
 (define* (target-mingw? #:optional (target (%current-target-system)))
   "Is the operating system of TARGET Windows?"
   (and target
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 06/31] gnu: cross-libc: Support cross-building for the 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (4 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 05/31] gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 07/31] gnu: bash-minimal: Fix build for " Janneke Nieuwenhuizen
                   ` (26 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290; +Cc: Andreas Enge, Ludovic Courtès

* gnu/packages/base.scm (glibc)[arguments]: When building for the Hurd, in
phase "create-machine-symlink", do not assume CPU is i386, also cater for
x86_64.
* gnu/packages/cross-base.scm (cross-libc*)[arguments]: Likewise.

Change-Id: Ib009b7bd301b543b8629382330cca9d963b7a812
---
 gnu/packages/base.scm       | 18 ++++++++++++------
 gnu/packages/cross-base.scm | 17 +++++++++++------
 2 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 4e8121ae2c..02ef71f20d 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1079,7 +1079,7 @@ (define-public glibc
                                (string-append locale "/C.UTF-8")))))
 
                  ,@(if (target-hurd?)
-                       '((add-after 'install 'augment-libc.so
+                       `((add-after 'install 'augment-libc.so
                            (lambda* (#:key outputs #:allow-other-keys)
                              (let ((out (assoc-ref outputs "out")))
                                (substitute* (string-append out "/lib/libc.so")
@@ -1088,11 +1088,17 @@ (define-public glibc
                                                  " libmachuser.so libhurduser.so"))))))
                          (add-after 'install 'create-machine-symlink
                            (lambda* (#:key outputs #:allow-other-keys)
-                             (let ((out (assoc-ref outputs "out"))
-                                   (cpu "i386"))
-                               (symlink cpu
-                                        (string-append out
-                                                       "/include/mach/machine"))))))
+                             (let* ((out (assoc-ref outputs "out"))
+                                    (cpu ,(match (or (%current-target-system)
+                                                     (%current-system))
+                                            ((? target-x86-32?)
+                                             "i386")
+                                            ((? target-x86-64?)
+                                             "x86_64")))
+                                    (machine (string-append
+                                              out "/include/mach/machine")))
+                               (unless (file-exists? machine)
+                                 (symlink cpu machine))))))
                        '()))))
 
    (inputs `(("static-bash" ,static-bash)))
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 7b32a6b64e..3827e87aec 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -738,7 +738,7 @@ (define* (cross-libc* target
                (delete 'install-utf8-c-locale)
 
                ,@(if (target-hurd? target)
-                     '((add-after 'install 'augment-libc.so
+                     `((add-after 'install 'augment-libc.so
                          (lambda* (#:key outputs #:allow-other-keys)
                            (let ((out (assoc-ref outputs "out")))
                              (substitute* (string-append out "/lib/libc.so")
@@ -747,11 +747,16 @@ (define* (cross-libc* target
                                                " libmachuser.so libhurduser.so"))))))
                        (add-after 'install 'create-machine-symlink
                          (lambda* (#:key outputs #:allow-other-keys)
-                           (let ((out (assoc-ref outputs "out"))
-                                 (cpu "i386"))
-                             (symlink cpu
-                                      (string-append out
-                                                     "/include/mach/machine"))))))
+                           (let* ((out (assoc-ref outputs "out"))
+                                  (cpu ,(match target
+                                          ((? target-x86-32?)
+                                           "i386")
+                                          ((? target-x86-64?)
+                                           "x86_64")))
+                                  (machine (string-append
+                                            out "/include/mach/machine")))
+                             (unless (file-exists? machine)
+                               (symlink cpu machine))))))
                      '())))))
 
       ;; Shadow the native "kernel-headers" because glibc's recipe expects the
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 07/31] gnu: bash-minimal: Fix build for 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (5 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 06/31] gnu: cross-libc: Support cross-building for the " Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 08/31] gnu: elfutils: " Janneke Nieuwenhuizen
                   ` (25 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290

* gnu/packages/bash-minimal.scm (bash)[arguments]: When building with gcc >=
14 use "CFLAGS=-Wno-implicit-function-declaration".

Change-Id: I3fd2da7a1d9011b155084dceadbad649dbb2a1b9
---
 gnu/packages/bash.scm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index 93641a78d5..1a3b014ad7 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
 ;;; Copyright © 2021 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2024 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -30,6 +31,7 @@ (define-module (gnu packages bash)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bootstrap)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages readline)
@@ -251,6 +253,13 @@ (define-public bash-minimal
                ;; modules and related code.
                "ac_cv_func_dlopen=no"
 
+               ,@(if (version>=? (package-version (current-gcc)) "14")
+                     ;; gcc-14 implictly uses -Wimplicit-function-declaration
+                     ;; which together with -Werror causes:
+                     ;; ./enable.def:492:11: error: implicit declaration of function ‘dlclose’;
+                     '("CFLAGS=-Wno-implicit-function-declaration")
+                     '())
+
                ,@(if (%current-target-system)
                      '("bash_cv_job_control_missing=no"
                        "bash_cv_getcwd_malloc=yes")
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 08/31] gnu: elfutils: Fix build for 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (6 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 07/31] gnu: bash-minimal: Fix build for " Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 09/31] gnu: grep: Fix build for the " Janneke Nieuwenhuizen
                   ` (24 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290

* gnu/packages/elf.scm (elfutils)[arguments]: When building for a 64bit Hurd,
set #:make-flags.

Change-Id: I00abf360a7de5b1f78c1e912f0dcf27c62c1af68
---
 gnu/packages/elf.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm
index 119f8d13dd..81a753a483 100644
--- a/gnu/packages/elf.scm
+++ b/gnu/packages/elf.scm
@@ -10,7 +10,7 @@
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
 ;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
-;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -86,6 +86,10 @@ (define-public elfutils
                                "--disable-libdebuginfod"
                                "--disable-debuginfod")
 
+       ,@(if (target-hurd64?)
+             '(#:make-flags '("core-file_no_Werror=yes"))
+             '())
+
        ;; Disable tests on MIPS and PowerPC (without changing
        ;; the arguments list on other systems).
        ,@(if (any (cute string-prefix? <> (or (%current-target-system)
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 09/31] gnu: grep: Fix build for the 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (7 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 08/31] gnu: elfutils: " Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 10/31] gnu: patch: " Janneke Nieuwenhuizen
                   ` (23 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290; +Cc: Andreas Enge, Ludovic Courtès

* gnu/packages/base.scm (grep)[arguments]: When building for the 64bit Hurd,
add patch-sigsegv.h stage.

Change-Id: I795a591ef8282ee5b760fec43bd4ad849007f602
---
 gnu/packages/base.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 02ef71f20d..010be631d7 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -154,6 +154,13 @@ (define-public grep
                                        (string-append bin "/fgrep"))
                       (("^exec grep")
                        (string-append "exec " bin "/grep"))))))
+              #$@(if (target-hurd64?)
+                     #~((add-after 'unpack 'patch-sigsegv
+                          (lambda _
+                            ;; Stack overflow recovery does not compile
+                            (substitute* "lib/sigsegv.in.h"
+                              (("__GNU__") "__XGNU__")))))
+                     #~())
               #$@(if (system-hurd?)
                      #~((add-before 'check 'skip-test
                           (lambda _
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 10/31] gnu: patch: Fix build for the 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (8 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 09/31] gnu: grep: Fix build for the " Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 11/31] gnu: libxcrypt: Support " Janneke Nieuwenhuizen
                   ` (22 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290; +Cc: Andreas Enge, Ludovic Courtès

* gnu/packages/base.scm (patch)[arguments]: When building for the 64bit Hurd,
set #:configure-flags.

Change-Id: I795a591ef8282ee5b760fec43bd4ad849007f602
---
 gnu/packages/base.scm | 49 ++++++++++++++++++++++++-------------------
 1 file changed, 28 insertions(+), 21 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 010be631d7..83f8c0d9e9 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -339,27 +339,34 @@ (define-public patch
                   "1bk38169c0xh01b0q0zmnrjqz8k9byz3arp4q7q66sn6xwf94nvz"))
                 (patches (search-patches "patch-hurd-path-max.patch"))))
       (arguments
-       (substitute-keyword-arguments (package-arguments base)
-         ((#:phases phases '%standard-phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'copy-gnulib-sources
-                (lambda _
-                  ;; XXX: We copy the source instead of using 'gnulib' as a
-                  ;; native input to avoid introducing a dependency cycle.
-                  (copy-recursively #+gnulib "gnulib")
-                  (setenv "GNULIB_SRCDIR"
-                          (string-append (getcwd) "/gnulib/src/gnulib"))))
-              (add-after 'copy-gnulib-sources 'update-bootstrap-script
-                (lambda _
-                  (copy-file "gnulib/src/gnulib/build-aux/bootstrap"
-                             "bootstrap")))
-              (add-after 'unpack 'patch-configure.ac
-                (lambda _
-                  (substitute* "configure.ac"
-                    ;; The gnulib-provided git-version-gen script has a plain
-                    ;; shebang of #!/bin/sh; avoid using it.
-                    (("build-aux/git-version-gen" all)
-                     (string-append "sh " all)))))))))
+       (let ((arguments
+         (substitute-keyword-arguments (package-arguments base)
+           ((#:phases phases '%standard-phases)
+            #~(modify-phases #$phases
+                (add-after 'unpack 'copy-gnulib-sources
+                  (lambda _
+                    ;; XXX: We copy the source instead of using 'gnulib' as a
+                    ;; native input to avoid introducing a dependency cycle.
+                    (copy-recursively #+gnulib "gnulib")
+                    (setenv "GNULIB_SRCDIR"
+                            (string-append (getcwd) "/gnulib/src/gnulib"))))
+                (add-after 'copy-gnulib-sources 'update-bootstrap-script
+                  (lambda _
+                    (copy-file "gnulib/src/gnulib/build-aux/bootstrap"
+                               "bootstrap")))
+                (add-after 'unpack 'patch-configure.ac
+                  (lambda _
+                    (substitute* "configure.ac"
+                      ;; The gnulib-provided git-version-gen script has a plain
+                      ;; shebang of #!/bin/sh; avoid using it.
+                      (("build-aux/git-version-gen" all)
+                       (string-append "sh " all))))))))))
+         (if (target-hurd64?)
+             (substitute-keyword-arguments arguments
+               ((#:configure-flags flags '())
+                #~(list "--disable-threads"
+                        "gl_cv_func_working_mktime=yes")))
+             arguments)))
       (native-inputs (list autoconf automake bison ed))
       (properties '()))))
 
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 11/31] gnu: libxcrypt: Support the 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (9 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 10/31] gnu: patch: " Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 12/31] gnu: libstdc++: " Janneke Nieuwenhuizen
                   ` (21 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290

* gnu/packages/patches/libxcrypt-hurd64.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/crypto.scm (libxcrypt)[arguments]: When building for the 64bit
Hurd, use it in new phase `apply-patch'.

Change-Id: I795a591ef8282ee5b760fec43bd4ad849007f602
---
 gnu/local.mk                                |  1 +
 gnu/packages/crypto.scm                     | 15 ++++++++
 gnu/packages/patches/libxcrypt-hurd64.patch | 38 +++++++++++++++++++++
 3 files changed, 54 insertions(+)
 create mode 100644 gnu/packages/patches/libxcrypt-hurd64.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 4d3ee9ea35..4b9fa95658 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1725,6 +1725,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/libvpx-CVE-2016-2818.patch		\
   %D%/packages/patches/libvpx-CVE-2023-5217.patch		\
   %D%/packages/patches/libvpx-CVE-2023-44488.patch		\
+  %D%/packages/patches/libxcrypt-hurd64.patch			\
   %D%/packages/patches/libxml2-xpath0-Add-option-xpath0.patch	\
   %D%/packages/patches/libwpd-gcc-compat.patch			\
   %D%/packages/patches/libxslt-generated-ids.patch		\
diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 2a298c4caf..94a98bb0ad 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -27,6 +27,7 @@
 ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
 ;;; Copyright © 2023 Ivan Vilata-i-Balaguer <ivan@selidor.net>
 ;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1661,6 +1662,20 @@ (define-public libxcrypt
     (build-system gnu-build-system)
     (native-inputs
      (list perl))
+    (arguments
+     (if (target-hurd64?)
+         (list
+          #:phases
+          #~(modify-phases %standard-phases
+              (add-after 'unpack 'apply-patch
+                (lambda _
+                  (let ((patch-file
+                         #$(local-file
+                            (search-patch
+                             "libxcrypt-hurd64.patch"))))
+                    (invoke "patch" "--force" "-p1" "-i"
+                            patch-file))))))
+              '()))
     (synopsis
      "Extended crypt library for descrypt, md5crypt, bcrypt, and others")
     (description
diff --git a/gnu/packages/patches/libxcrypt-hurd64.patch b/gnu/packages/patches/libxcrypt-hurd64.patch
new file mode 100644
index 0000000000..9fc3018539
--- /dev/null
+++ b/gnu/packages/patches/libxcrypt-hurd64.patch
@@ -0,0 +1,38 @@
+Upstream-status: Taken from upstream:
+    <https://github.com/besser82/libxcrypt/commit/b2c1da2e1ce2d3e72f511f5bc94a6ffa68b70917>
+
+From b2c1da2e1ce2d3e72f511f5bc94a6ffa68b70917 Mon Sep 17 00:00:00 2001
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Sun, 14 Jul 2024 13:13:07 +0200
+Subject: [PATCH] Add binary compatibility for x86_64 GNU/Hurd
+Content-Transfer-Encoding: 8bit
+Content-Type: text/plain; charset=UTF-8
+
+
+diff --git a/lib/libcrypt.map.in b/lib/libcrypt.map.in
+index 88ea911..a56b7bf 100644
+--- a/lib/libcrypt.map.in
++++ b/lib/libcrypt.map.in
+@@ -43,5 +43,5 @@ fcrypt			-		GLIBC_2.0
+ %chain GLIBC_2.0 GLIBC_2.2 GLIBC_2.2.1 GLIBC_2.2.2 GLIBC_2.2.5 GLIBC_2.2.6
+ %chain GLIBC_2.3 GLIBC_2.4 GLIBC_2.12 GLIBC_2.16 GLIBC_2.17 GLIBC_2.18
+ %chain GLIBC_2.21 GLIBC_2.27 GLIBC_2.29 GLIBC_2.32 GLIBC_2.33 GLIBC_2.35
+-%chain GLIBC_2.36
++%chain GLIBC_2.36 GLIBC_2.38
+ %chain OW_CRYPT_1.0 XCRYPT_2.0 XCRYPT_4.3 XCRYPT_4.4
+diff --git a/lib/libcrypt.minver b/lib/libcrypt.minver
+index 8478077..c5a5bf2 100644
+--- a/lib/libcrypt.minver
++++ b/lib/libcrypt.minver
+@@ -51,6 +51,7 @@
+ #VERSION     SYSTEM          CPU_FAMILY    PREPROCESSOR_CHECK
+ 
+ # GNU Hurd
++GLIBC_2.38   gnu             x86_64
+ GLIBC_2.2.6  gnu             i[3-9]86
+ ERROR        gnu             .
+ 
+-- 
+Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
+Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
+
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 12/31] gnu: libstdc++: Support the 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (10 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 11/31] gnu: libxcrypt: Support " Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 13/31] gnu: gcc-13, gcc-14: Support being used as parent for gcc-static Janneke Nieuwenhuizen
                   ` (20 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290; +Cc: Andreas Enge, Ludovic Courtès

* gnu/packages/gcc.scm (make-libstdc++)[arguments]: When building for the
64bit Hurd, add stage patch-hurd64.

Change-Id: I795a591ef8282ee5b760fec43bd4ad849007f602
---
 gnu/packages/gcc.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index fc3746fb05..850a14cb1c 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -1033,7 +1033,15 @@ (define-public (make-libstdc++ gcc)
                   (("/lib64") "/lib")))))
           (add-before 'configure 'chdir
             (lambda _
-              (chdir "libstdc++-v3"))))
+              (chdir "libstdc++-v3")))
+          #$@(let ((version (package-version gcc)))
+               (if (target-hurd64?)
+                   #~((add-after 'unpack 'patch-hurd64
+                        (lambda _
+                          (substitute* "libstdc++-v3/src/c++20/tzdb.cc"
+                            (("#if ! defined _GLIBCXX_ZONEINFO_DIR")
+                             "#if __GNU__ || ! defined _GLIBCXX_ZONEINFO_DIR")))))
+                   '())))
 
       #:configure-flags '`("--disable-libstdcxx-pch"
                            ,(string-append "--with-gxx-include-dir="
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 13/31] gnu: gcc-13, gcc-14: Support being used as parent for gcc-static.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (11 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 12/31] gnu: libstdc++: " Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 14/31] DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (19 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290; +Cc: Andreas Enge, Ludovic Courtès

* gnu/packages/gcc.scm (gcc-13)[arguments]: Use quasiquote instead of
g-expressions.
(gcc-14)[arguments]: Likewise.

Change-Id: I22269b31d49868effe967d46247b189ed9a9d394
---
 gnu/packages/gcc.scm | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 850a14cb1c..befbbda027 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -811,10 +811,10 @@ (define-public gcc-13
               (snippet gcc-canadian-cross-objdump-snippet)))
     (arguments
      (substitute-keyword-arguments (package-arguments gcc-11)
-       ((#:phases phases #~%standard-phases)
+       ((#:phases phases '%standard-phases)
        (if (target-hurd?)
-           #~(modify-phases #$phases
-               (delete 'patch-hurd-libpthread))
+           `(modify-phases ,phases
+              (delete 'patch-hurd-libpthread))
            phases))))
     (properties
      `((compiler-cpu-architectures
@@ -841,8 +841,8 @@ (define-public gcc-14
               (modules '((guix build utils)))
               (snippet gcc-canadian-cross-objdump-snippet)))
     (arguments (substitute-keyword-arguments (package-arguments gcc-13)
-                 ((#:phases phases #~%standard-phases)
-                  #~(modify-phases #$phases
+                 ((#:phases phases '%standard-phases)
+                  `(modify-phases ,phases
                       (add-before 'configure 'pre-x86-configure
                         (lambda _
                           (substitute* "gcc/config/i386/t-linux64"
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 14/31] DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (12 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 13/31] gnu: gcc-13, gcc-14: Support being used as parent for gcc-static Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-11 18:05   ` janneke
  2024-11-10 10:38 ` [bug#74290] [PATCH 15/31] system: image: Add hurd64 image types Janneke Nieuwenhuizen
                   ` (18 subsequent siblings)
  32 siblings, 1 reply; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290
  Cc: Andreas Enge, Christopher Baines, Josselin Poiret,
	Ludovic Courtès, Mathieu Othacehe, Maxim Cournoyer,
	Simon Tournier, Tobias Geerinckx-Rice

XXX TODO:

   v Boot a 64bit hurd and guix build hello,
   o Push the commit below,
   o Re-check the bootstrap-tarballs build/hash,
   o Update this commit message with new commit hash,
   o Push it with remainder of hurd-team branch,
   o Update blog post.

On commit:
    7a8acd375aa807b7d4386ed8052aa743261c42ce
    gnu: gcc-13, gcc-14: Support being used as parent for gcc-static.

Run:
    ./pre-inst-env guix build --target=x86_64-gnu bootstrap-tarballs

Producing:
    /gnu/store/sm23f2g91k554w2clcm9l9airwn9gqmz-bootstrap-tarballs-0

With guix hash -r:
    1v9ld86vw76drrxlqf0b930644mgj6mgxqak9ybx4h0xsiczxisw

* gnu/packages/bootstrap.scm (%bootstrap-executables): Add entries for
x86_64-gnu.
(%bootstrap-guile-hash, %bootstrap-coreutils&co, %bootstrap-binutils,
%bootstrap-glibc, %bootstrap-gcc): Add entry for x86_64-gnu.
* guix/packages.scm (%supported-systems, %hurd-systems): Add x86_64-gnu.
(%cuirass-supported-systems): Remove x86_64-gnu.
* guix/utils.scm (target-64bit?): Add x86_64-gnu.
* m4/guix.m4: Add x86_64-gnu as a supported system.
* doc/guix.texi (GNU Distribution): Add x86_64-gnu.

Change-Id: Ic0e09d5b3b035aec27c7274e57cccedee9c0611c
---
 doc/guix.texi              |  9 +++++++-
 gnu/packages/bootstrap.scm | 42 ++++++++++++++++++++++++++++++++++----
 guix/packages.scm          |  8 +++++---
 m4/guix.m4                 | 12 ++++++++---
 4 files changed, 60 insertions(+), 11 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 187bae6898..73692d73d6 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -36,7 +36,7 @@
 Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Efraim Flashner@*
 Copyright @copyright{} 2016 John Darrington@*
 Copyright @copyright{} 2016, 2017 Nikita Gillmann@*
-Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Jan Nieuwenhuizen@*
+Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Janneke Nieuwenhuizen@*
 Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021 Julien Lepiller@*
 Copyright @copyright{} 2016 Alex ter Weele@*
 Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021 Christopher Baines@*
@@ -637,6 +637,13 @@ GNU Distribution
 (@pxref{transparent-emulation-qemu, @code{hurd-vm-service-type}}).
 @xref{Contributing}, on how to help!
 
+@item x86_64-gnu
+@uref{https://hurd.gnu.org, GNU/Hurd} on the @code{x86_64} Intel/AMD
+64-bit architecture.
+
+This configuration is even more experimental and under heavy upstream
+development.
+
 @item mips64el-linux (unsupported)
 little-endian 64-bit MIPS processors, specifically the Loongson series,
 n32 ABI, and Linux-Libre kernel.  This configuration is no longer fully
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index c4640b62e1..eb6a4f1917 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -118,13 +118,22 @@ (define %bootstrap-executables
       ,(base32 "0i9kxdi17bm5gxfi2xzm0y73p3ii0cqxli1sbljm6rh2fjgyn90k")))
     ("i586-gnu"
      ("bash"
-      ,(base32 "1as8649aqaibahhhrvkj10ci8shpi4hq5n7gnik8rhhy0dc1jarg"))
+      ,(base32 "0nb8ga2j7a4kf6j7pnavq8zf68mj8mhqh26nwkilz1ykj86vg9ml"))
      ("mkdir"
-      ,(base32 "1snqgpfrl00hfn82lm29jqylzjsfb9jd6ha74dp12phwb8fpbmb9"))
+      ,(base32 "0ldsx9pwan40fx2hf4s9d10sfkhvkljvl20hksvm4192p7jb4shp"))
      ("tar"
-      ,(base32 "0nq2c1zb3wv5bf7kd83sziaashydazrn7xgq6kijlk0zj2syzc2m"))
+      ,(base32 "1z6kfvpwhy14vc52i61v1vzzk3gzxka3db5rlg1jsq6kli35s2ab"))
      ("xz"
-      ,(base32 "033rhpk6zrpxpd6ffjyg5y2zwq9x9cnq0zljb7k8jlncbalsayq5")))
+      ,(base32 "1f7g40sk5a6k6qf65k58vlybnnmhyyzczdxy60m3jgcsp674wfcr")))
+    ("x86_64-gnu"
+     ("bash"
+      ,(base32 "0l0dnighcipvdfbk14q834n57q859i2b9ssiq4bnbh0jpxvvqp1l"))
+     ("mkdir"
+      ,(base32 "1nd17k8pwwi7zsqi685w4rn1p2cvfcalrzdhfgwpsk1ilxnmdvsq"))
+     ("tar"
+      ,(base32 "0lf94y22ngmxdwhsp0cvj33m23p33r999xnlrff0s1yvlf20w3ks"))
+     ("xz"
+      ,(base32 "145aq65rx7w0qk1sw9239888id5ri60ha0xp1kyp6ir3pvizh6by")))
     ("mips64el-linux"
      ("bash"
       ,(base32 "1aw046dhda240k9pb9iaj5aqkm23gkvxa9j82n4k7fk87nbrixw6"))
@@ -165,6 +174,7 @@ (define (bootstrap-executable-file-name system program)
   (match system
     ("powerpc64le-linux" (string-append system "/20210106/" program))
     ("i586-gnu" (string-append system "/20200326/" program))
+    ("x86_64-gnu" (string-append system "/20241110/" program))
     ("powerpc-linux" (string-append system "/20200923/bin/" program))
     ("riscv64-linux" (string-append system "/20210725/bin/" program))
     (_ (string-append system "/" program
@@ -366,6 +376,8 @@ (define (bootstrap-guile-url-path system)
                     "/20150101/guile-2.0.11.tar.xz")
                    ("i586-gnu"
                     "/20200326/guile-static-stripped-2.0.14-i586-pc-gnu.tar.xz")
+                   ("x86_64-gnu"
+                    "/20241110/guile-static-stripped-3.0.9-x86_64-pc-gnu.tar.xz")
                    ("powerpc64le-linux"
                     "/20210106/guile-static-stripped-2.0.14-powerpc64le-linux-gnu.tar.xz")
                    ("riscv64-linux"
@@ -390,6 +402,8 @@ (define (bootstrap-guile-hash system)
      (base32 "1giy2aprjmn5fp9c4s9r125fljw4wv6ixy5739i5bffw4jgr0f9r"))
     ("i586-gnu"
      (base32 "0wgqpsmvg25rnqn49ap7kwd2qxccd8dr4lllzp7i3rjvgav27vac"))
+    ("x86_64-gnu"
+     (base32 "0fgasmbidp584ibr5fbirmp3wr8qchv84a50i4bichysp00gg26p"))
     ("powerpc-linux"
      (base32 "1by2p7s27fbyjzfkcw8h65h4kkqh7d23kv4sgg5jppjn2qx7swq4"))
     ("riscv64-linux"
@@ -598,6 +612,8 @@ (define %bootstrap-coreutils&co
                                              "/20210106/static-binaries-0-powerpc64le-linux-gnu.tar.xz")
                                             ("i586-gnu"
                                              "/20200326/static-binaries-0-i586-pc-gnu.tar.xz")
+                                            ("x86_64-gnu"
+                                             "/20241110/static-binaries-0-x86_64-pc-gnu.tar.xz")
                                             ("powerpc-linux"
                                              "/20200923/static-binaries.tar.xz")
                                             ("riscv64-linux"
@@ -625,6 +641,9 @@ (define %bootstrap-coreutils&co
                               ("i586-gnu"
                                (base32
                                 "17kllqnf3fg79gzy9ansgi801c46yh9c23h4d923plvb0nfm1cfn"))
+                              ("x86_64-gnu"
+                               (base32
+                                "118s161df8hgrdfph2w5spnrms02rh1dk7mzfvx1k1prvgngpm9p"))
                               ("powerpc-linux"
                                (base32
                                 "0kspxy0yczan2vlih6aa9hailr2inz000fqa0gn5x9d1fxxa5y8m"))
@@ -681,6 +700,8 @@ (define %bootstrap-binutils
                                              "/20210106/binutils-static-stripped-2.34-powerpc64le-linux-gnu.tar.xz")
                                             ("i586-gnu"
                                              "/20200326/binutils-static-stripped-2.34-i586-pc-gnu.tar.xz")
+                                            ("x86_64-gnu"
+                                             "/20241110/binutils-static-stripped-2.41-x86_64-pc-gnu.tar.xz")
                                             ("powerpc-linux"
                                              "/20200923/binutils-2.35.1.tar.xz")
                                             ("riscv64-linux"
@@ -711,6 +732,9 @@ (define %bootstrap-binutils
                               ("i586-gnu"
                                (base32
                                 "11kykv1kmqc5wln57rs4klaqa13hm952smkc57qcsyss21kfjprs"))
+                              ("x86_64-gnu"
+                               (base32
+                                "07r74sa7341frhf5a7h1p3pklsrmfpfrf5s8dxm3yz2kqzhish48"))
                               ("powerpc-linux"
                                (base32
                                 "0asbg1c4avkrvh057mx0942xwddd136jni382zqsxzn79ls42yq8"))
@@ -771,6 +795,8 @@ (define %bootstrap-glibc
                                        "/20210106/glibc-stripped-2.31-powerpc64le-linux-gnu.tar.xz")
                                       ("i586-gnu"
                                        "/20240816/glibc-stripped-2.39-i586-pc-gnu.tar.xz")
+                                      ("x86_64-gnu"
+                                       "/20241110/glibc-stripped-2.39-x86_64-pc-gnu.tar.xz")
                                       ("powerpc-linux"
                                        "/20200923/glibc-2.32.tar.xz")
                                       ("riscv64-linux"
@@ -801,6 +827,9 @@ (define %bootstrap-glibc
                         ("i586-gnu"
                          (base32
                           "0x2x6w611k6v9qdabacawamw2475p04hm3s0q95xcg063wjq4ig2"))
+                        ("x86_64-gnu"
+                         (base32
+                          "1dcgrnlxbsdic0xmmrjbr8gl6ra5y2xbj8f8jr6y0zvpdyi12ldd"))
                         ("powerpc-linux"
                          (base32
                           "0smmssyjrlk5cvx49586smmk81gkwff0i6r91n4rir4jm6ba25sb"))
@@ -877,6 +906,8 @@ (define %bootstrap-gcc
                                         "/20210106/gcc-stripped-5.5.0-powerpc64le-linux-gnu.tar.xz")
                                        ("i586-gnu"
                                         "/20200326/gcc-stripped-5.5.0-i586-pc-gnu.tar.xz")
+                                       ("x86_64-gnu"
+                                        "/20241110/gcc-stripped-14.2.0-x86_64-pc-gnu.tar.xz")
                                        ("powerpc-linux"
                                         "/20200923/gcc-5.5.0.tar.xz")
                                        ("riscv64-linux"
@@ -907,6 +938,9 @@ (define %bootstrap-gcc
                          ("i586-gnu"
                           (base32
                            "1j2zc58wzil71a34h7c70sd68dmqvcscrw3rmn2whq79vd70zvv5"))
+                         ("x86_64-gnu"
+                          (base32
+                           "0vqvjvw6xi16lihiqz4mhisfwx3dgs15y60q07ksdkgvi1wdli2w"))
                          ("powerpc-linux"
                           (base32
                            "1p7df3yixhm87dw5sccc6yn1i9db1r9hnmsg87wq5xi4rfmirq7w"))
diff --git a/guix/packages.scm b/guix/packages.scm
index f373136d22..403217d711 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2022 jgart <jgart@dismail.de>
 ;;; Copyright © 2023 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -419,7 +420,7 @@ (define %32bit-supported-systems
 (define %64bit-supported-systems
   ;; This is the list of 64-bit system types that are supported.
   '("x86_64-linux" "mips64el-linux" "aarch64-linux" "powerpc64le-linux"
-    "riscv64-linux"))
+    "riscv64-linux" "x86_64-gnu"))
 
 (define %supported-systems
   ;; This is the list of system types that are supported.  By default, we
@@ -428,14 +429,15 @@ (define %supported-systems
 
 (define %hurd-systems
   ;; The GNU/Hurd systems for which support is being developed.
-  '("i586-gnu"))
+  '("i586-gnu" "x86_64-gnu"))
 
 (define %cuirass-supported-systems
   ;; This is the list of system types for which build machines are available.
   ;;
   ;; XXX: MIPS is unavailable in CI:
   ;; <https://lists.gnu.org/archive/html/guix-devel/2017-03/msg00790.html>.
-  (fold delete %supported-systems '("mips64el-linux" "powerpc-linux" "riscv64-linux")))
+  (fold delete %supported-systems '("mips64el-linux" "powerpc-linux"
+                                    "riscv64-linux" "x86_64-gnu")))
 
 (define (maybe-add-input-labels inputs)
   "Add labels to INPUTS unless it already has them."
diff --git a/m4/guix.m4 b/m4/guix.m4
index b93daba5c3..8c2757a8b7 100644
--- a/m4/guix.m4
+++ b/m4/guix.m4
@@ -3,6 +3,7 @@ dnl Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019, 2020, 2021 Ludovic Co
 dnl Copyright © 2014 Mark H Weaver <mhw@netris.org>
 dnl Copyright © 2017, 2020, 2021, 2023 Efraim Flashner <efraim@flashner.co.il>
 dnl Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
+dnl Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 dnl
 dnl This file is part of GNU Guix.
 dnl
@@ -61,8 +62,13 @@ AC_DEFUN([GUIX_SYSTEM_TYPE], [
        linux-musl*)
 	  guix_system="$machine_name-linux";;
        gnu*)
-          # Always use i586 for GNU/Hurd.
-          guix_system="i586-gnu";;
+          case "$machine_name" in
+            i386|i486|i586|i686)
+              # Always use i586 for 32bit GNU/Hurd.
+              guix_system="i586-gnu";;
+            *)
+	      guix_system="$machine_name-gnu";;
+          esac;;
        *)
 	  # Strip the version number from names such as `gnu0.3',
 	  # `darwin10.2.0', etc.
@@ -91,7 +97,7 @@ courageous and port the GNU System distribution to it (see
   # Currently only Linux-based systems are supported, and only on some
   # platforms.
   case "$guix_system" in
-    x86_64-linux|i686-linux|armhf-linux|aarch64-linux|powerpc64le-linux|riscv64-linux|i586-gnu)
+    x86_64-linux|i686-linux|armhf-linux|aarch64-linux|powerpc64le-linux|riscv64-linux|i586-gnu|x86_64-gnu)
       ;;
     mips64el-linux|powerpc-linux)
       AC_MSG_WARN([building Guix on `$guix_system', which is not supported])
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 15/31] system: image: Add hurd64 image types.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (13 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 14/31] DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 16/31] gnu: Add libgpg-error-1.50 Janneke Nieuwenhuizen
                   ` (17 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290

* gnu/system/images/hurd.scm (hurd64-disk-image, hurd64-image-type,
hurd64-qcow2-image-type, hurd64-barebones-disk-image,
hurd64-barebones-qcow2-image): New variables.

Change-Id: I68834a4c5c18b0e154d06082824008d13ca52214
---
 gnu/system/images/hurd.scm | 47 ++++++++++++++++++++++++++++++++++++--
 1 file changed, 45 insertions(+), 2 deletions(-)

diff --git a/gnu/system/images/hurd.scm b/gnu/system/images/hurd.scm
index 01c422a54f..75f255ed94 100644
--- a/gnu/system/images/hurd.scm
+++ b/gnu/system/images/hurd.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
-;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,7 +36,13 @@ (define-module (gnu system images hurd)
             hurd-image-type
             hurd-qcow2-image-type
             hurd-barebones-disk-image
-            hurd-barebones-qcow2-image))
+            hurd-barebones-qcow2-image
+
+            hurd64-disk-image
+            hurd6-image-type
+            hurd64-qcow2-image-type
+            hurd64-barebones-disk-image
+            hurd64-barebones-qcow2-image))
 
 (define hurd-barebones-os
   (operating-system
@@ -115,5 +121,42 @@ (define hurd-barebones-qcow2-image
                         #:type hurd-qcow2-image-type))
    (name 'hurd-barebones.qcow2)))
 
+\f
+;;;
+;;; 64bit Hurd
+;;;
+(define hurd64-disk-image
+  (image
+   (inherit hurd-disk-image)
+   (platform x86_64-gnu)))
+
+(define hurd64-image-type
+  (image-type
+   (name 'hurd64-raw)
+   (constructor (cut image-with-os hurd64-disk-image <>))))
+
+(define hurd64-qcow2-image-type
+  (image-type
+   (name 'hurd64-qcow2)
+   (constructor (lambda (os)
+                  (image
+                   (inherit hurd64-disk-image)
+                   (format 'compressed-qcow2)
+                   (operating-system os))))))
+
+(define hurd64-barebones-disk-image
+  (image
+   (inherit
+    (os+platform->image hurd-barebones-os x86_64-gnu
+                        #:type hurd64-image-type))
+   (name 'hurd64-barebones-disk-image)))
+
+(define hurd64-barebones-qcow2-image
+  (image
+   (inherit
+    (os+platform->image hurd-barebones-os x86_64-gnu
+                        #:type hurd64-qcow2-image-type))
+   (name 'hurd64-barebones.qcow2)))
+
 ;; Return the default image.
 hurd-barebones-qcow2-image
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 16/31] gnu: Add libgpg-error-1.50.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (14 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 15/31] system: image: Add hurd64 image types Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 17/31] gnu: libgcrypt: Use libgpg-error-1.50 for the 64bit Hurd Janneke Nieuwenhuizen
                   ` (16 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290

* gnu/packages/gnupg.scm (libgpg-error-1.50): New variable.

Change-Id: Ia34c0f339f331420d76b2c840205f29e511d1dcc
---
 gnu/packages/gnupg.scm | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 2e97c2244a..a4863542f2 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -22,7 +22,7 @@
 ;;; Copyright © 2021 Nikita Domnitskii <nikita@domnitskii.me>
 ;;; Copyright © 2021 Aleksandr Vityazev <avityazev@posteo.org>
 ;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
-;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -164,6 +164,19 @@ (define-public libgpg-error
     (properties '((ftp-server . "ftp.gnupg.org")
                   (ftp-directory . "/gcrypt/libgpg-error")))))
 
+(define-public libgpg-error-1.50
+  (package
+    (inherit libgpg-error)
+    (version "1.50")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
+                          version ".tar.bz2"))
+      (sha256
+       (base32
+        "02p2jgz95688ib28sl4aa624cj0liz73anwcl92f8cx6w14m6h39"))))))
+
 (define-public libgcrypt
   (package
     (name "libgcrypt")
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 17/31] gnu: libgcrypt: Use libgpg-error-1.50 for the 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (15 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 16/31] gnu: Add libgpg-error-1.50 Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 18/31] gnu: perl: Support cross-building " Janneke Nieuwenhuizen
                   ` (15 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290

* gnu/packages/gnupg.scm (libgcrypt)[propagated-inputs]: When building for the
64bit Hurd, use libgcrypt-1.50.

Change-Id: I608d283a4a307527d5b09a81fa1a53cec5d6bb76
---
 gnu/packages/gnupg.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index a4863542f2..6c6efff026 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -190,7 +190,9 @@ (define-public libgcrypt
                "1pp9zyx02bzgzjzldxf0mx9kp3530xgaaqcz4n2cv100ddaaw57g"))))
     (build-system gnu-build-system)
     (propagated-inputs
-     `(("libgpg-error-host" ,libgpg-error)))
+     `(("libgpg-error-host" ,(if (target-hurd64?)
+                                 libgpg-error-1.50
+                                 libgpg-error))))
     (native-inputs
      ;; Needed here for the 'gpg-error' program.
      `(("libgpg-error-native" ,libgpg-error)))
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 18/31] gnu: perl: Support cross-building for the 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (16 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 17/31] gnu: libgcrypt: Use libgpg-error-1.50 for the 64bit Hurd Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 19/31] gnu: openssl-3.0: Support " Janneke Nieuwenhuizen
                   ` (14 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290

* gnu/packages/cross-base.scm (perl)[native-inputs]: When cross-building for
the 64bit Hurd, use perl-cross-1.6.

Change-Id: I4a77f51a6757ad4aed9bcca8f9bbbf2cbd162e15
---
 gnu/packages/perl.scm | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index faaac13bf1..2ea7c49419 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -248,14 +248,18 @@ (define-public perl
     (native-inputs
      (if (%current-target-system)
          `(("perl-cross"
-            ,(origin
-               (method git-fetch)
-               (uri (git-reference
-                     (url "https://github.com/arsv/perl-cross")
-                     (commit "1.4")))
-               (file-name (git-file-name "perl-cross" "1.4"))
-               (sha256
-                (base32 "1ydjvlhrk06ccyj4bm8by7xk90krsll2k380mc3x1mhfrc7r9gzy")))))
+            ,(let ((version (if (target-hurd64?) "1.6" "1.4"))
+                   (hash
+                    (if (target-hurd64?)
+                        "0s06lkx5b79r9cn6pm5p6d4jbdjq7wg7rjr75nw5xdhw1z3wnl2d"
+                        "1ydjvlhrk06ccyj4bm8by7xk90krsll2k380mc3x1mhfrc7r9gzy")))
+               (origin
+                 (method git-fetch)
+                 (uri (git-reference
+                       (url "https://github.com/arsv/perl-cross")
+                       (commit version)))
+                 (file-name (git-file-name "perl-cross" version))
+                 (sha256 (base32 hash))))))
          '()))
     (native-search-paths (list (search-path-specification
                                 (variable "PERL5LIB")
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 19/31] gnu: openssl-3.0: Support the 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (17 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 18/31] gnu: perl: Support cross-building " Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 20/31] gnu: pciutils: " Janneke Nieuwenhuizen
                   ` (13 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290

* gnu/packages/patches/openssl-hurd64.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/tls.scm (openssl-3.0)[arguments]: When building for
the 64bit Hurd, use it in new "apply-hurd-patch" phase.

Change-Id: I8936377da726681b748cc010e1fbae3fb19dee05
---
 gnu/local.mk                              |  1 +
 gnu/packages/patches/openssl-hurd64.patch | 99 +++++++++++++++++++++++
 gnu/packages/tls.scm                      |  9 +++
 3 files changed, 109 insertions(+)
 create mode 100644 gnu/packages/patches/openssl-hurd64.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 4b9fa95658..576f60579e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1891,6 +1891,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/opensles-add-license-file.patch			\
   %D%/packages/patches/openssl-1.1-c-rehash-in.patch		\
   %D%/packages/patches/openssl-3.0-c-rehash-in.patch		\
+  %D%/packages/patches/openssl-hurd64.patch			\
   %D%/packages/patches/opentaxsolver-file-browser-fix.patch     \
   %D%/packages/patches/open-zwave-hidapi.patch			\
   %D%/packages/patches/orangeduck-mpc-fix-pkg-config.patch	\
diff --git a/gnu/packages/patches/openssl-hurd64.patch b/gnu/packages/patches/openssl-hurd64.patch
new file mode 100644
index 0000000000..372fda834a
--- /dev/null
+++ b/gnu/packages/patches/openssl-hurd64.patch
@@ -0,0 +1,99 @@
+Upstream-status: Taken from upstream:
+
+<https://github.com/openssl/openssl/commit/7c729851d169f30d9e0c0ad6e7c1cf6cefb37935>.
+
+From 795699363be8f717e36802c3ac503011b74ad752 Mon Sep 17 00:00:00 2001
+From: Janneke Nieuwenhuizen <janneke@gnu.org>
+Date: Thu, 7 Nov 2024 14:08:05 +0100
+Subject: [PATCH] Add support for the 64bit Hurd.
+Content-Transfer-Encoding: 8bit
+Content-Type: text/plain; charset=UTF-8
+
+Taken from <https://salsa.debian.org/debian/openssl>.
+---
+ Configurations/10-main.conf | 45 ++++++++++++++++++++++++++++++++-----
+ util/perl/OpenSSL/config.pm |  3 ++-
+ 2 files changed, 41 insertions(+), 7 deletions(-)
+
+diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
+index b578a3c2a8..740460ebd3 100644
+--- a/Configurations/10-main.conf
++++ b/Configurations/10-main.conf
+@@ -1685,20 +1685,53 @@ my %targets = (
+     },
+ 
+ ##### GNU Hurd
+-    "hurd-x86" => {
++    "hurd-generic32" => {
+         inherit_from     => [ "BASE_unix" ],
+         CC               => "gcc",
+-        CFLAGS           => "-O3 -fomit-frame-pointer -Wall",
++        CXX              => "g++",
++        CFLAGS           => picker(default => "-Wall",
++                                   debug   => "-O0 -g",
++                                   release => "-O3"),
++        CXXFLAGS         => picker(default => "-Wall",
++                                   debug   => "-O0 -g",
++                                   release => "-O3"),
+         cflags           => threads("-pthread"),
+-        lib_cppflags     => "-DL_ENDIAN",
++        cxxflags         => combine("-std=c++11", threads("-pthread")),
+         ex_libs          => add("-ldl", threads("-pthread")),
+-        bn_ops           => "BN_LLONG",
+-        asm_arch         => 'x86',
+-        perlasm_scheme   => 'elf',
++        bn_ops           => "BN_LLONG RC4_CHAR",
+         thread_scheme    => "pthreads",
+         dso_scheme       => "dlfcn",
+         shared_target    => "linux-shared",
+         shared_cflag     => "-fPIC",
++        shared_ldflag    => sub { $disabled{pinshared} ? () : "-Wl,-znodelete" },
++    },
++
++    "hurd-generic64" => {
++        inherit_from     => [ "hurd-generic32" ],
++        bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
++    },
++
++    #### X86 / X86_64 targets
++    "hurd-x86" => {
++        inherit_from     => [ "hurd-generic32" ],
++        CFLAGS           => add(picker(release => "-fomit-frame-pointer")),
++        cflags           => add("-m32"),
++        cxxflags         => add("-m32"),
++        lib_cppflags     => add("-DL_ENDIAN"),
++        bn_ops           => "BN_LLONG",
++        asm_arch         => 'x86',
++        perlasm_scheme   => 'elf',
++    },
++
++    "hurd-x86_64" => {
++        inherit_from     => [ "hurd-generic64" ],
++        cflags           => add("-m64"),
++        cxxflags         => add("-m64"),
++        lib_cppflags     => add("-DL_ENDIAN"),
++        bn_ops           => "SIXTY_FOUR_BIT_LONG",
++        asm_arch         => 'x86_64',
++        perlasm_scheme   => 'elf',
++        multilib         => "64",
+     },
+ 
+ ##### VxWorks for various targets
+diff --git a/util/perl/OpenSSL/config.pm b/util/perl/OpenSSL/config.pm
+index 2f1edcafb6..707db71537 100755
+--- a/util/perl/OpenSSL/config.pm
++++ b/util/perl/OpenSSL/config.pm
+@@ -92,7 +92,8 @@ my $guess_patterns = [
+     [ 'IRIX64:.*',                  'mips4-sgi-irix64' ],
+     [ 'Linux:[2-9]\..*',            '${MACHINE}-whatever-linux2' ],
+     [ 'Linux:1\..*',                '${MACHINE}-whatever-linux1' ],
+-    [ 'GNU.*',                      'hurd-x86' ],
++    [ 'GNU:.*86-AT386',             'hurd-x86' ],
++    [ 'GNU:.*86_64-AT386',          'hurd-x86_64' ],
+     [ 'LynxOS:.*',                  '${MACHINE}-lynx-lynxos' ],
+     # BSD/OS always says 386
+     [ 'BSD\/OS:4\..*',              'i486-whatever-bsdi4' ],
+-- 
+Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
+Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
+
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index 1a1ce0d215..261a063090 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -589,6 +589,15 @@ (define-public openssl-3.0
                                            "/bin/perl"))))
             #$@(if (target-hurd?)
                    #~((delete 'patch-configure))
+                   #~())
+            #$@(if (target-hurd64?)
+                   #~((add-after 'unpack 'apply-hurd-patch
+                        (lambda _
+                          (let ((patch-file
+                                 #$(local-file
+                                    (search-patch "openssl-hurd64.patch"))))
+                            (invoke "patch" "--force" "-p1" "-i"
+                                    patch-file)))))
                    #~())))
        ((#:configure-flags flags #~'())
         (if (system-hurd?)
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 20/31] gnu: pciutils: Support the 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (18 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 19/31] gnu: openssl-3.0: Support " Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 21/31] gnu: libpciaccess: " Janneke Nieuwenhuizen
                   ` (12 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290

* gnu/packages/patches/pciutils-hurd64.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/pciutils.scm (pciutils)[arguments]: Use g-expressions.  When
building for the 64bit Hurd, use it in new "apply-hurd64-patch" phase.

Change-Id: I8936377da726681b748cc010e1fbae3fb19dee05
---
 gnu/local.mk                               |  1 +
 gnu/packages/patches/pciutils-hurd64.patch | 31 ++++++++++++++++++++++
 gnu/packages/pciutils.scm                  | 25 +++++++++++------
 3 files changed, 49 insertions(+), 8 deletions(-)
 create mode 100644 gnu/packages/patches/pciutils-hurd64.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 576f60579e..ad18f62eb6 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1906,6 +1906,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/pam-krb5-CVE-2020-10595.patch		\
   %D%/packages/patches/pango-skip-libthai-test.patch		\
   %D%/packages/patches/password-store-tree-compat.patch		\
+  %D%/packages/patches/pciutils-hurd64.patch			\
   %D%/packages/patches/pdfpc-build-with-vala-0.56.patch         \
   %D%/packages/patches/petri-foo-0.1.87-fix-recent-file-not-exist.patch			\
   %D%/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch \
diff --git a/gnu/packages/patches/pciutils-hurd64.patch b/gnu/packages/patches/pciutils-hurd64.patch
new file mode 100644
index 0000000000..316f12e131
--- /dev/null
+++ b/gnu/packages/patches/pciutils-hurd64.patch
@@ -0,0 +1,31 @@
+Upstream-status: Not presented upstream.
+
+--- pciutils-3.8.0/lib/hurd.c.orig	2024-11-07 15:09:20.728973822 +0100
++++ pciutils-3.8.0/lib/hurd.c	2024-11-07 15:05:08.524682813 +0100
+@@ -213,7 +213,7 @@
+ hurd_read(struct pci_dev *d, int pos, byte * buf, int len)
+ {
+   int err;
+-  size_t nread;
++  mach_msg_type_number_t nread;
+   char *data;
+   mach_port_t device_port = device_port_lookup(d);
+ 
+@@ -266,7 +266,7 @@
+   mach_port_t device_port = device_port_lookup(d);
+   struct pci_bar regions[6];
+   char *buf = (char *) &regions;
+-  size_t size = sizeof(regions);
++  mach_msg_type_number_t size = sizeof(regions);
+ 
+   int err = pci_get_dev_regions(device_port, &buf, &size);
+   if (err)
+@@ -305,7 +305,7 @@
+   struct pci_xrom_bar rom;
+   mach_port_t device_port = device_port_lookup(d);
+   char *buf = (char *) &rom;
+-  size_t size = sizeof(rom);
++  mach_msg_type_number_t size = sizeof(rom);
+ 
+   int err = pci_get_dev_rom(device_port, &buf, &size);
+   if (err)
diff --git a/gnu/packages/pciutils.scm b/gnu/packages/pciutils.scm
index d2a352eb6b..08f1634113 100644
--- a/gnu/packages/pciutils.scm
+++ b/gnu/packages/pciutils.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
-;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2022 Brendan Tildesley <mail@brendan.scot>
 ;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
 ;;;
@@ -81,25 +81,34 @@ (define-public pciutils
                 "01aglgw9ds9qiswcbi2lx90lswncikrlyv8mmp4haix8542bvvci"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
          (add-after 'unpack 'unbundle-pci.ids
            (lambda* (#:key native-inputs inputs #:allow-other-keys)
              (copy-file (search-input-file (or native-inputs inputs)
                                            "share/hwdata/pci.ids")
                         "pci.ids")))
+         #$@(if (target-hurd64?)
+               #~((add-after 'unpack 'apply-hurd64-patch
+                    (lambda _
+                      (let ((patch-file
+                             #$(local-file
+                                (search-patch "pciutils-hurd64.patch"))))
+                        (invoke "patch" "--force" "-p1" "-i" patch-file)))))
+               #~())
          (replace 'configure
            (lambda* (#:key outputs #:allow-other-keys)
              ;; There's no 'configure' script, just a raw makefile.
              (substitute* "Makefile"
-               ,@(if (%current-target-system)
-                     `((("^CROSS_COMPILE=.*$")
+               #$@(if (%current-target-system)
+                     #~((("^CROSS_COMPILE=.*$")
                         (string-append "CROSS_COMPILE="
-                                       ,(%current-target-system) "-"
+                                       #$(%current-target-system) "-"
                                        "\n"))
                        (("^HOST=.*$")
                         (string-append "HOST="
-                                       ,(gnu-triplet->nix-system
+                                       #$(gnu-triplet->nix-system
                                          (%current-target-system)) "\n"))
                        ;; Disable 'install' strip option, that would fail when
                        ;; we are cross-compiling.
@@ -139,7 +148,7 @@ (define-public pciutils
              (invoke "make" "install" "install-lib"))))
 
        ;; Make sure programs have an RPATH so they can find libpciutils.so.
-       #:make-flags (list ,(string-append "CC="
+       #:make-flags #~(list #$(string-append "CC="
                                           (if (%current-target-system)
                                               (cc-for-target)
                                               "gcc"))
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 21/31] gnu: libpciaccess: Support the 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (19 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 20/31] gnu: pciutils: " Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 22/31] gnu: netdde: Update to c0ef248dc7c5ccc1273e2a796f3ece30c5b645df Janneke Nieuwenhuizen
                   ` (11 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290

* gnu/packages/patches/libpciaccess-hurd64.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/xorg.scm (libpciaccess) [arguments]: Use g-expressions.  When
building for the 64bit Hurd, use it in new "apply-hurd64-patch" phase.

Change-Id: I8936377da726681b748cc010e1fbae3fb19dee05
---
 gnu/local.mk                                  |  1 +
 .../patches/libpciaccess-hurd64.patch         | 58 +++++++++++++++++++
 gnu/packages/xorg.scm                         | 23 +++++---
 3 files changed, 75 insertions(+), 7 deletions(-)
 create mode 100644 gnu/packages/patches/libpciaccess-hurd64.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index ad18f62eb6..1e81c16979 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1701,6 +1701,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/libmpeg2-global-symbol-test.patch	\
   %D%/packages/patches/libmygpo-qt-fix-qt-5.11.patch		\
   %D%/packages/patches/libmygpo-qt-missing-qt5-modules.patch	\
+  %D%/packages/patches/libpciaccess-hurd64.patch		\
   %D%/packages/patches/libphonenumber-reproducible-build.patch	\
   %D%/packages/patches/libqalculate-3.8.0-libcurl-ssl-fix.patch	\
   %D%/packages/patches/libquicktime-ffmpeg.patch 		\
diff --git a/gnu/packages/patches/libpciaccess-hurd64.patch b/gnu/packages/patches/libpciaccess-hurd64.patch
new file mode 100644
index 0000000000..f7e11059b1
--- /dev/null
+++ b/gnu/packages/patches/libpciaccess-hurd64.patch
@@ -0,0 +1,58 @@
+Upstream-status: Taken from upstream:
+
+<https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/commit/6cd5a4afbb70868c7746de8d50dea59e02e9acf2>.
+
+From 6cd5a4afbb70868c7746de8d50dea59e02e9acf2 Mon Sep 17 00:00:00 2001
+From: Flavio Cruz <flaviocruz@gmail.com>
+Date: Wed, 28 Jun 2023 01:02:34 -0400
+Subject: [PATCH] Fix compilation warnings when building against hurd-amd64.
+Content-Transfer-Encoding: 8bit
+Content-Type: text/plain; charset=UTF-8
+
+Passes mach_msg_type_number_t instead of size_t which have different
+sizes. Example warning:
+
+/hurd_pci.c:101:53: warning: passing argument 3 of 'pci_get_dev_regions' from incompatible pointer type [-Wincompatible-pointer-types]
+  101 |     err = pci_get_dev_regions(d->device_port, &buf, &size);
+      |                                                     ^~~~~
+      |                                                     |
+      |                                                     size_t * {aka long unsigned int *}
+---
+ src/hurd_pci.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/hurd_pci.c b/src/hurd_pci.c
+index 8653e1b..9ac3813 100644
+--- a/src/hurd_pci.c
++++ b/src/hurd_pci.c
+@@ -82,7 +82,7 @@ pci_device_hurd_probe(struct pci_device *dev)
+     struct pci_bar regions[6];
+     struct pci_xrom_bar rom;
+     struct pci_device_private *d;
+-    size_t size;
++    mach_msg_type_number_t size;
+     char *buf;
+ 
+     /* Many of the fields were filled in during initial device enumeration.
+@@ -323,7 +323,7 @@ pciclient_cfg_read(mach_port_t device_port, int reg, char *buf,
+                    size_t * nbytes)
+ {
+     int err;
+-    size_t nread;
++    mach_msg_type_number_t nread;
+     char *data;
+ 
+     data = buf;
+@@ -473,7 +473,7 @@ simple_readdir(mach_port_t port, uint32_t *first_entry)
+ {
+     char *data;
+     int nentries = 0;
+-    vm_size_t size;
++    mach_msg_type_number_t size;
+ 
+     dir_readdir (port, &data, &size, *first_entry, 1, 0, &nentries);
+ 
+-- 
+Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
+Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
+
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 0de08a4ad1..b106a604a7 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -36,7 +36,7 @@
 ;;; Copyright © 2021 Lu Hui <luhux76@gmail.com>
 ;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
 ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
-;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2023, 2024 John Kehayias <john.kehayias@protonmail.com>
 ;;; Copyright © 2023, 2024 Kaelyn Takata <kaelyn.alexi@protonmail.com>
 ;;;
@@ -1157,16 +1157,17 @@ (define-public libpciaccess
             "12glp4w1kgvmqn89lk19cgr6jccd3awxra4dxisp7pagi06rsk11"))))
     (build-system gnu-build-system)
     (arguments
-     '(;; Make sure libpciaccess can read compressed 'pci.ids' files as
-       ;; provided by pciutils.
-       #:configure-flags
-       (list "--with-zlib"
+     (list
+      ;; Make sure libpciaccess can read compressed 'pci.ids' files as
+      ;; provided by pciutils.
+      #:configure-flags
+      #~(list "--with-zlib"
              (string-append "--with-pciids-path="
                             (assoc-ref %build-inputs "pciutils")
                             "/share/hwdata"))
 
        #:phases
-       (modify-phases %standard-phases
+       #~(modify-phases %standard-phases
          (add-after 'install 'add-L-zlib
            (lambda* (#:key inputs outputs #:allow-other-keys)
              ;; Provide '-LZLIB/lib' next to '-lz' in the .la file.
@@ -1175,7 +1176,15 @@ (define-public libpciaccess
                (substitute* (string-append out "/lib/libpciaccess.la")
                  (("-lz")
                   (string-append "-L" zlib "/lib -lz")))
-               #t))))))
+               #t)))
+         #$@(if (target-hurd64?)
+                #~((add-after 'unpack 'apply-hurd64-patch
+                     (lambda _
+                       (let ((patch-file
+                              #$(local-file
+                                 (search-patch "libpciaccess-hurd64.patch"))))
+                         (invoke "patch" "--force" "-p1" "-i" patch-file)))))
+                #~()))))
     (inputs
      (list zlib pciutils))                   ;for 'pci.ids.gz'
     (native-inputs
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 22/31] gnu: netdde: Update to c0ef248dc7c5ccc1273e2a796f3ece30c5b645df.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (20 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 21/31] gnu: libpciaccess: " Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 23/31] gnu: netdde: Support the 64bit Hurd Janneke Nieuwenhuizen
                   ` (10 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290

* gnu/packages/hurd.scm (netdde): Update to
c0ef248dc7c5ccc1273e2a796f3ece30c5b645df.
(dde-sources): Update to b6c8526c703f3ba76294d9002f195c63897ec661.

Change-Id: Id03f5c5124f16e9ffd6a77cbb2507d274e0f325a
---
 gnu/packages/hurd.scm | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 06fae1bd3b..f9d8b28b8c 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -294,7 +294,7 @@ (define unifont
 
 (define dde-sources
   ;; This is the current tip of the dde branch
-  (let ((commit "066797b576ebf8364ad157f50bef2a655597deeb"))
+  (let ((commit "b6c8526c703f3ba76294d9002f195c63897ec661"))
     (origin
       (method git-fetch)
       (uri (git-reference
@@ -302,7 +302,7 @@ (define dde-sources
             (commit commit)))
       (sha256
        (base32
-        "19f2awlfnar5gyhi0w5zawla5brzck2s88iv0f20022pd1l5v9hl"))
+        "0k1ilj8ghli8x43xaksbc4y419pqh0w16k374914c07svq419bbr"))
       (file-name (git-file-name "dde" (string-take commit 7))))))
 
 (define %import-from-dde
@@ -561,8 +561,8 @@ (define-public hurd
     (license gpl2+)))
 
 (define-public netdde
-  (let ((commit "e67c284ac113d939b10b4578334f27dab29d5b08")
-        (revision "2"))
+  (let ((commit "c0ef248dc7c5ccc1273e2a796f3ece30c5b645df")
+        (revision "3"))
     (package
       (name "netdde")
       ;; The version prefix corresponds to the version of Linux from which the
@@ -576,7 +576,7 @@ (define-public netdde
                 (patches (list (search-patch "netdde-build-fix.patch")))
                 (sha256
                  (base32
-                  "0vnkls7sr7srzib5mnw6gybzl5qa8c5a4zf3h08w6gdr7zqbndh0"))
+                  "070fpmd4nvn3mp8dj9w4if63iwz7j2m0h6ywq888znw70wlrc6sh"))
                 (file-name (git-file-name name commit))))
       (build-system gnu-build-system)
       (arguments
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 23/31] gnu: netdde: Support the 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (21 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 22/31] gnu: netdde: Update to c0ef248dc7c5ccc1273e2a796f3ece30c5b645df Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 24/31] gnu: rumpkernel: Update to f1ffd6405f225336e595a0f99f01095ed7438337 Janneke Nieuwenhuizen
                   ` (9 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290

* gnu/packages/patches/netdde-csum.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/hurd.scm (netdde)[source]: Use it.
[arguments]: Do not assume x86, rather use actual ARCH in #:make-flags,
disable -Wstrict-prototypes and -Wint-conversion, and follow upstream's
"amd64" symlinking voodoo.

Change-Id: Ie825e56779dae2f489066569dc3c4405bac778c1
---
 gnu/local.mk                           |  1 +
 gnu/packages/hurd.scm                  | 22 ++++++++++++++++++++--
 gnu/packages/patches/netdde-csum.patch | 18 ++++++++++++++++++
 3 files changed, 39 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/netdde-csum.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 1e81c16979..9a4715df86 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1816,6 +1816,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/ncftp-reproducible.patch			\
   %D%/packages/patches/netcdf-date-time.patch			\
   %D%/packages/patches/netdde-build-fix.patch			\
+  %D%/packages/patches/netdde-csum.patch			\
   %D%/packages/patches/netpbm-CVE-2017-2586.patch		\
   %D%/packages/patches/netpbm-CVE-2017-2587.patch		\
   %D%/packages/patches/netsurf-message-timestamp.patch		\
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index f9d8b28b8c..973564ee33 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -573,7 +573,8 @@ (define-public netdde
                 (uri (git-reference
                       (url "https://git.savannah.gnu.org/git/hurd/incubator.git")
                       (commit commit)))
-                (patches (list (search-patch "netdde-build-fix.patch")))
+                (patches (search-patches "netdde-build-fix.patch"
+                                         "netdde-csum.patch"))
                 (sha256
                  (base32
                   "070fpmd4nvn3mp8dj9w4if63iwz7j2m0h6ywq888znw70wlrc6sh"))
@@ -586,7 +587,13 @@ (define-public netdde
                               (search-input-file %build-inputs "/bin/bash"))
                "PKGDIR=libdde_linux26"
                (string-append "CC=" ,(cc-for-target))
-               "ARCH=x86")
+               (let ((arch ,(match (or (%current-target-system)
+                                       (%current-system))
+                              ((? target-x86-32?)
+                               "x86")
+                              ((? target-x86-64?)
+                               "amd64"))))
+                 (string-append "ARCH=" arch)))
          #:configure-flags
          ,#~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
          #:phases
@@ -604,8 +611,19 @@ (define-public netdde
                  (("/bin/bash") (which "bash")))))
            (add-after 'patch-generated-file-shebangs 'build-libdde-linux26
              (lambda* (#:key make-flags #:allow-other-keys)
+               (when ,(target-hurd64?)
+                 (let ((dir "libdde_linux26/build/include"))
+                   (mkdir-p (string-append dir "/x86"))
+                   (format #t "symlink ~a -> ~a\n"
+                           (string-append dir "/x86/amd64") "x86")
+                   (symlink "x86" (string-append dir "/amd64"))
+                   (format #t "symlink ~a -> ~a\n"
+                           (string-append dir "/amd64/asm-x86_64") "asm-x86")
+                   (symlink "asm-x86" (string-append dir "/amd64/asm-x86_64"))))
                (with-directory-excursion "libdde_linux26"
                  (apply invoke "make"
+                        (string-append "WARNINGS=-Wno-strict-prototypes"
+                                       " -Wno-int-conversion")
                         (delete "PKGDIR=libdde_linux26" make-flags)))))
            (add-after 'build-libdde-linux26 'convert
              (lambda* (#:key make-flags #:allow-other-keys)
diff --git a/gnu/packages/patches/netdde-csum.patch b/gnu/packages/patches/netdde-csum.patch
new file mode 100644
index 0000000000..4fdd004898
--- /dev/null
+++ b/gnu/packages/patches/netdde-csum.patch
@@ -0,0 +1,18 @@
+Upstream-status: Taken from debian.
+
+<https://salsa.debian.org/hurd-team/netdde/raw/master/debian/patches/csum>.
+
+---
+ linux/drivers/net/vmxnet3/vmxnet3_drv.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/linux/drivers/net/vmxnet3/vmxnet3_drv.c
++++ b/linux/drivers/net/vmxnet3/vmxnet3_drv.c
+@@ -25,6 +25,7 @@
+  */
+ 
+ #include "vmxnet3_int.h"
++#include <net/ip6_checksum.h>
+ 
+ char vmxnet3_driver_name[] = "vmxnet3";
+ #define VMXNET3_DRIVER_DESC "VMware vmxnet3 virtual NIC driver"
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 24/31] gnu: rumpkernel: Update to f1ffd6405f225336e595a0f99f01095ed7438337.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (22 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 23/31] gnu: netdde: Support the 64bit Hurd Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 25/31] gnu: rumpkernel: Support the 64bit Hurd Janneke Nieuwenhuizen
                   ` (8 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290

* gnu/packages/hurd.scm (rumpkernel): Update to
f1ffd6405f225336e595a0f99f01095ed7438337.
[arguments]: In stage "build", add "-Wno-error=sign-compare" to CWARNFLAGS.

Change-Id: I8936377da726681b748cc010e1fbae3fb19dee05
---
 gnu/packages/hurd.scm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 973564ee33..b156fcea4c 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -665,8 +665,8 @@ (define-public netdde
       (license gpl2))))
 
 (define-public rumpkernel
-  (let ((commit "81043d42fabda9baed7ac9ca36e3f3f5ed11ba81")
-        (revision "3"))
+  (let ((commit "f1ffd6405f225336e595a0f99f01095ed7438337")
+        (revision "0"))
     (package
       (name "rumpkernel")
       (version (git-version "0-20211031" revision commit))
@@ -680,7 +680,7 @@ (define-public rumpkernel
                       (commit commit)))
                 (sha256
                  (base32
-                  "0fv0k52qqcg3nq9012hibgsamvsd7mnvn2ikdasmzjhsp8qh5q3r"))
+                  "1ygn3ysji06ik3k44sf906fjpdmabznkspw70llldbk2zkrcdw7i"))
                 (file-name (git-file-name name version))))
       (build-system gnu-build-system)
       (arguments
@@ -800,7 +800,8 @@ (define-public rumpkernel
                            " -Wno-error=stack-protector"
                            " -Wno-error=array-parameter"
                            " -Wno-error=array-bounds"
-                           " -Wno-error=stringop-overflow")
+                           " -Wno-error=stringop-overflow"
+                           " -Wno-error=sign-compare")
                      "-V" "LIBCRTBEGIN="
                      "-V" "LIBCRTEND="
                      "-V" "LIBCRT0="
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 25/31] gnu: rumpkernel: Support the 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (23 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 24/31] gnu: rumpkernel: Update to f1ffd6405f225336e595a0f99f01095ed7438337 Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 26/31] gnu: hurd: Build fixes for " Janneke Nieuwenhuizen
                   ` (7 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290

* gnu/packages/hurd.scm (rumpkernel)[argument]: In stage "build", follow
Debian upstream to use -DPAE disable the DTRACE and ZFS builds.

Change-Id: I534da31eefb378c72b4896d64a51a73109e38aa6
---
 gnu/packages/hurd.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index b156fcea4c..d29ec22cd7 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -781,6 +781,9 @@ (define-public rumpkernel
                      "-V" "MKBINUTILS=no"
                      "-V" "MKGDB=no"
                      "-V" "MKGROFF=no"
+                     "-V" "MKDTRACE=no"
+                     "-V" "MKZFS=no"
+
                      "-V" (string-append "TOPRUMP=" toprump)
                      "-V" "BUILDRUMP_CPPFLAGS=-Wno-error=stringop-overread"
                      "-V" "RUMPUSER_EXTERNAL_DPLIBS=pthread"
@@ -791,7 +794,8 @@ (define-public rumpkernel
                            " -DRUMP_REGISTER_T=int"
                            " -DRUMPUSER_CONFIG=yes"
                            " -DNO_PCI_MSI_MSIX=yes"
-                           " -DNUSB_DMA=1")
+                           " -DNUSB_DMA=1"
+                           " -DPAE")
                      "-V" (string-append
                            "CWARNFLAGS="
                            " -Wno-error=maybe-uninitialized"
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 26/31] gnu: hurd: Build fixes for the 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (24 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 25/31] gnu: rumpkernel: Support the 64bit Hurd Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 27/31] gnu: git-minimal: Support " Janneke Nieuwenhuizen
                   ` (6 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290

* gnu/packages/patches/hurd-64bit.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/hurd.scm (hurd)[source]: Use it.
[arguments]: When building for the 64bit Hurd, add "create-machine-symlink"
phase.  In phases "build-libdde-linux" and "install-goodies", do not assume
x86, rather use actual ARCH, disable -Wstrict-prototypes and -Wint-conversion,
and follow upstream's "amd64" symlinking voodoo.

Change-Id: If264a91b2433add13f9121c482f0abe67ae5f1e9
---
 gnu/local.mk                          |   1 +
 gnu/packages/hurd.scm                 | 115 +++++++++++++++++---------
 gnu/packages/patches/hurd-64bit.patch |  56 +++++++++++++
 3 files changed, 131 insertions(+), 41 deletions(-)
 create mode 100644 gnu/packages/patches/hurd-64bit.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 9a4715df86..cf0de3d92e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1545,6 +1545,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/htslib-for-stringtie.patch		\
   %D%/packages/patches/hubbub-sort-entities.patch		\
   %D%/packages/patches/hueplusplus-mbedtls.patch		\
+  %D%/packages/patches/hurd-64bit.patch				\
   %D%/packages/patches/hurd-rumpdisk-no-hd.patch		\
   %D%/packages/patches/hurd-startup.patch			\
   %D%/packages/patches/hwloc-1-test-btrfs.patch			\
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index d29ec22cd7..7aed0ebe1d 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -317,7 +317,8 @@ (define-public hurd
     (source (origin
               (inherit (package-source hurd-headers))
               (patches (search-patches "hurd-rumpdisk-no-hd.patch"
-                                       "hurd-startup.patch"))))
+                                       "hurd-startup.patch"
+                                       "hurd-64bit.patch"))))
     (version (package-version hurd-headers))
     (arguments
      `(#:tests? #f                      ;no "check" target
@@ -467,48 +468,80 @@ (define-public hurd
                          (find-files (string-append out "/libexec")))
                #t)))
          (add-after 'build 'build-libdde-linux
-           (lambda* (#:key inputs native-inputs #:allow-other-keys)
-             (invoke (string-append (assoc-ref (or native-inputs inputs) "make")
-                                    "/bin/make")
-                     ;; XXX There can be a race condition because subdirs
-                     ;; aren't interdependent targets in the Makefile.
-                     "-j1" "-C" "libdde_linux26"
-                     (string-append "SHELL="
-                                    (assoc-ref (or native-inputs inputs) "bash")
-                                    "/bin/bash")
-                     (string-append "CC="
-                                    ,(cc-for-target))
-                     "ARCH=x86")))
+          (lambda* (#:key inputs native-inputs #:allow-other-keys)
+            (let ((arch ,(match (or (%current-target-system)
+                                    (%current-system))
+                           ((? target-x86-32?)
+                            "x86")
+                           ((? target-x86-64?)
+                            "amd64"))))
+              (when ,(target-hurd64?)
+                (let ((dir "libdde_linux26/build/include"))
+                  (mkdir-p (string-append dir "/x86"))
+                  (format #t "symlink ~a -> ~a\n"
+                          (string-append dir "/x86/amd64") "x86")
+                  (symlink "x86" (string-append dir "/amd64"))
+                  (format #t "symlink ~a -> ~a\n"
+                          (string-append dir "/amd64/asm-x86_64") "asm-x86")
+                  (symlink "asm-x86" (string-append dir "/amd64/asm-x86_64"))))
+              (invoke (string-append (assoc-ref (or native-inputs inputs) "make")
+                                     "/bin/make")
+                      ;; XXX There can be a race condition because subdirs
+                      ;; aren't interdependent targets in the Makefile.
+                      "-j1" "-C" "libdde_linux26"
+                      (string-append "SHELL="
+                                     (assoc-ref (or native-inputs inputs) "bash")
+                                     "/bin/bash")
+                      (string-append "CC="
+                                     ,(cc-for-target))
+                      (string-append "WARNINGS=-Wno-int-conversion"
+                                     " -Wno-strict-prototypes")
+                      (string-append "ARCH=" arch)))))
          (add-after 'install 'install-goodies
-           (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
-             ;; Install additional goodies.
-             ;; TODO: Build & install *.msgids for rpctrace.
-             (let* ((out (assoc-ref outputs "out"))
-                    (datadir (string-append out "/share/hurd")))
-               ;; Install libdde_linux26.
-               (invoke (string-append (assoc-ref (or native-inputs inputs) "make")
-                                      "/bin/make")
-                       "-C" "libdde_linux26" "install"
-                       (string-append "SHELL="
-                                      (assoc-ref (or native-inputs inputs) "bash")
-                                      "/bin/bash")
-                       (string-append "INSTALLDIR="
-                                      out
-                                      "/share/libdde_linux26/build/include")
-                       "ARCH=x86")
-               ;; Install the fancy UTF-8 motd.
-               (mkdir-p (string-append out "/etc"))
-               (copy-file "console/motd.UTF8"
-                          (string-append out "/etc/motd"))
+          (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
+            ;; Install additional goodies.
+            ;; TODO: Build & install *.msgids for rpctrace.
+            (let* ((out (assoc-ref outputs "out"))
+                   (datadir (string-append out "/share/hurd"))
+                   (arch ,(match (or (%current-target-system)
+                                     (%current-system))
+                            ((? target-x86-32?)
+                             "x86")
+                            ((? target-x86-64?)
+                             "amd64")))
+                   (dir (string-append out "/share/libdde_linux26/build/include")))
+              (mkdir-p dir)
+              (when ,(target-hurd64?)
+                (mkdir-p (string-append dir "/amd64"))
+                (format #t "symlink ~a -> ~a\n"
+                        (string-append dir "/amd64/asm-x86_64")
+                        "x86")
+                (symlink "x86" (string-append dir "/amd46")))
+              (invoke (string-append (assoc-ref (or native-inputs inputs) "make")
+                                     "/bin/make")
+                      "-C" "libdde_linux26" "install"
+                      (string-append "SHELL="
+                                     (assoc-ref (or native-inputs inputs) "bash")
+                                     "/bin/bash")
+                      (string-append "INSTALLDIR=" dir)
+                      (string-append "ARCH=" arch))
+              (when ,(target-hurd64?)
+                (format #t "symlink ~a -> ~a\n"
+                        (string-append dir "/amd64/asm-x86_64")
+                        "asm-x86")
+                (symlink "asm-x86" (string-append dir "/amd64/asm-x86_64")))
+              ;; Install the fancy UTF-8 motd.
+              (mkdir-p (string-append out "/etc"))
+              (copy-file "console/motd.UTF8"
+                         (string-append out "/etc/motd"))
 
-               ;; Install the BDF font for use by the console client.
-               (copy-file (assoc-ref inputs "unifont")
-                          "unifont.gz")
-               (invoke "gunzip" "unifont.gz")
-               (mkdir-p datadir)
-               (copy-file "unifont"
-                          (string-append datadir "/vga-system.bdf"))
-               #t))))
+              ;; Install the BDF font for use by the console client.
+              (copy-file (assoc-ref inputs "unifont")
+                         "unifont.gz")
+              (invoke "gunzip" "unifont.gz")
+              (mkdir-p datadir)
+              (copy-file "unifont"
+                         (string-append datadir "/vga-system.bdf"))))))
        #:configure-flags
        ,#~(list (string-append "LDFLAGS=-Wl,-rpath="
                                #$output "/lib")
diff --git a/gnu/packages/patches/hurd-64bit.patch b/gnu/packages/patches/hurd-64bit.patch
new file mode 100644
index 0000000000..643550ad68
--- /dev/null
+++ b/gnu/packages/patches/hurd-64bit.patch
@@ -0,0 +1,56 @@
+Upstream-status: Taken from upstream:
+    <https://git.savannah.gnu.org/cgit/hurd/hurd.git/commit/?id=d494333e7607ea03819adcfb69d89f8248ec2044>.
+
+From d494333e7607ea03819adcfb69d89f8248ec2044 Mon Sep 17 00:00:00 2001
+From: Flavio Cruz <flaviocruz@gmail.com>
+Date: Sun, 21 Jul 2024 17:20:55 -0400
+Subject: [PATCH] nfsd: fix -Werror=incompatible-pointer-types issues for
+ x86_64
+Content-Transfer-Encoding: 8bit
+Content-Type: text/plain; charset=UTF-8
+
+Message-ID: <3pmgbk2myx4phdb6wcso54solmybulrvbytols5md3nri2p2qp@xjmfmpvwjp6t>
+---
+ nfsd/cache.c | 2 +-
+ nfsd/ops.c   | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/nfsd/cache.c b/nfsd/cache.c
+index cd5524af..864739c0 100644
+--- a/nfsd/cache.c
++++ b/nfsd/cache.c
+@@ -387,7 +387,7 @@ create_cached_handle (int fs, struct cache_handle *credc, file_t userport)
+   struct cache_handle *c;
+   int hash;
+   char *bp = fhandle.array + sizeof (int);
+-  size_t handlelen = NFS2_FHSIZE - sizeof (int);
++  mach_msg_type_number_t handlelen = NFS2_FHSIZE - sizeof (int);
+   mach_port_t newport, ref;
+ 
+   /* Authenticate USERPORT so that we can call file_getfh on it.  */
+diff --git a/nfsd/ops.c b/nfsd/ops.c
+index 463a9c87..64e94b93 100644
+--- a/nfsd/ops.c
++++ b/nfsd/ops.c
+@@ -292,7 +292,7 @@ op_write (struct cache_handle *c,
+   off_t offset;
+   size_t count;
+   error_t err;
+-  mach_msg_type_number_t amt;
++  vm_size_t amt;
+   char *bp;
+   struct stat st;
+ 
+@@ -583,7 +583,7 @@ op_readdir (struct cache_handle *c,
+   error_t err;
+   char *buf;
+   struct dirent *dp;
+-  size_t bufsize;
++  mach_msg_type_number_t bufsize;
+   int nentries;
+   int i;
+   int *replystart;
+-- 
+Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
+Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
+
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 27/31] gnu: git-minimal: Support the 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (25 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 26/31] gnu: hurd: Build fixes for " Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 28/31] gnu: inetutils: Fix build for " Janneke Nieuwenhuizen
                   ` (5 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290

* gnu/packages/version-control.scm (git-minimal)[arguments]: When using gcc >=
14, use "-Wno-implicit-function-declaration" in #:make-flags.
Use target-hurd? instead of comparing with "i586-pc-gnu" in "use-host-uname_S"
phase.

Change-Id: Ib9836be8a1e389a82c8a89adf22aaeac0d85bd14
---
 gnu/packages/version-control.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 6bd37fee82..136d52af51 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -111,6 +111,7 @@ (define-module (gnu packages version-control)
   #:use-module (gnu packages file)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
@@ -292,7 +293,10 @@ (define-public git-minimal
               ;; By default 'make install' creates hard links for
               ;; things in 'libexec/git-core', which leads to huge
               ;; nars; see <https://bugs.gnu.org/21949>.
-              "NO_INSTALL_HARDLINKS=indeed")
+              "NO_INSTALL_HARDLINKS=indeed"
+              #$@(if (version>=? (package-version (current-gcc)) "14")
+                     #~("-Wno-implicit-function-declaration")
+                     #~()))
       #:phases
       #~(modify-phases %standard-phases
           #$@(if (%current-target-system)
@@ -301,7 +305,7 @@ (define-public git-minimal
                       (lambda _
                         (substitute* "config.mak.uname"
                           (("uname_S := .*" all)
-                           (if (equal? #$(%current-target-system) "i586-pc-gnu")
+                           (if #$(target-hurd?)
                                "uname_S := GNU\n"
                                all))))))
                  ;; We do not have a full bash when cross-compiling.
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 28/31] gnu: inetutils: Fix build for the 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (26 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 27/31] gnu: git-minimal: Support " Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 29/31] gnu: grub: " Janneke Nieuwenhuizen
                   ` (4 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290

* gnu/packages/patches/inetutils-hurd64.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/admin.scm (inetutils)[arguments]: When building for the 64bit
Hurd, use it in new "apply-hurd64-patch" stage.

Change-Id: I780f6a92418b49e5fe0d23eb1c90e155216f1428
---
 gnu/local.mk                                |  1 +
 gnu/packages/admin.scm                      | 14 ++++-
 gnu/packages/patches/inetutils-hurd64.patch | 65 +++++++++++++++++++++
 3 files changed, 78 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/inetutils-hurd64.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index cf0de3d92e..6a46241e5f 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1568,6 +1568,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/ilmbase-fix-tests.patch			\
   %D%/packages/patches/instead-use-games-path.patch		\
   %D%/packages/patches/intltool-perl-compatibility.patch	\
+  %D%/packages/patches/inetutils-hurd64.patch			\
   %D%/packages/patches/irrlicht-use-system-libs.patch		\
   %D%/packages/patches/irrlicht-link-against-needed-libs.patch	\
   %D%/packages/patches/isl-0.11.1-aarch64-support.patch	\
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index db9aea31a5..f0dde60d6a 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -31,7 +31,7 @@
 ;;; Copyright © 2019, 2021, 2022 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2019, 2020, 2021 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
-;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2020, 2021, 2022 Michael Rohleder <mike@rohleder.de>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
@@ -1000,7 +1000,17 @@ (define-public inetutils
                              "\\\""))
       ;; On some systems, 'libls.sh' may fail with an error such as:
       ;; "Failed to tell switch -a apart from -A".
-      #:parallel-tests? #f))
+      #:parallel-tests? #f
+      #:phases (if (target-hurd64?)
+                   #~(modify-phases %standard-phases
+                       (add-after 'unpack 'apply-hurd64-patch
+                         (lambda _
+                           (let ((patch
+                                  #$(local-file
+                                     (search-patch
+                                      "inetutils-hurd64.patch"))))
+                             (invoke "patch" "--force" "-p1" "-i" patch)))))
+                   #~%standard-phases)))
     (inputs
      (list coreutils
            shadow                     ;for login (used in telnetd and rlogind)
diff --git a/gnu/packages/patches/inetutils-hurd64.patch b/gnu/packages/patches/inetutils-hurd64.patch
new file mode 100644
index 0000000000..3fb238bcdc
--- /dev/null
+++ b/gnu/packages/patches/inetutils-hurd64.patch
@@ -0,0 +1,65 @@
+Upstream-status: Not presented upstream.
+
+From 0804e655a7abfd22dc3a053f03fab8f811405f84 Mon Sep 17 00:00:00 2001
+From: Janneke Nieuwenhuizen <janneke@gnu.org>
+Date: Fri, 8 Nov 2024 11:07:56 +0100
+Subject: [PATCH] ifconfig hurd: Build fix for the 64bit HUrd.
+Content-Transfer-Encoding: 8bit
+Content-Type: text/plain; charset=UTF-8
+
+* ifconfig/system/hurd.c (check_driving): Use mach_msg_type_number_t
+instead of size_t for file_get_fs_options.
+---
+ ifconfig/system/hurd.c | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/ifconfig/system/hurd.c b/ifconfig/system/hurd.c
+index 70b2ed27..86fe6375 100644
+--- a/ifconfig/system/hurd.c
++++ b/ifconfig/system/hurd.c
+@@ -47,7 +47,7 @@ check_driving (const char *name)
+   error_t err;
+ 
+   char *argz = 0, *new_argz = 0;
+-  size_t argz_len = 0;
++  mach_msg_type_number_t argz_len = 0;
+   char *entry = 0;
+   const char *socket = _SERVERS_SOCKET "/2";
+ 
+@@ -106,7 +106,9 @@ check_driving (const char *name)
+   new_argz = malloc (argz_len);
+   memcpy (new_argz, argz, argz_len);
+ 
+-  err = argz_insert (&new_argz, &argz_len, new_argz, name);
++  size_t new_argz_len = 0;
++
++  err = argz_insert (&new_argz, &new_argz_len, new_argz, name);
+   if (err)
+     {
+       error (0, err, "Could not prepend name %s to '%s' for %s", name,
+@@ -114,7 +116,7 @@ check_driving (const char *name)
+       goto out;
+     }
+ 
+-  err = argz_insert (&new_argz, &argz_len, new_argz, "-i");
++  err = argz_insert (&new_argz, &new_argz_len, new_argz, "-i");
+   if (err)
+     {
+       argz_stringify (new_argz, argz_len, ' ');
+@@ -122,10 +124,10 @@ check_driving (const char *name)
+       goto out;
+     }
+ 
+-  err = fsys_set_options (fsys, new_argz, argz_len, 1);
++  err = fsys_set_options (fsys, new_argz, new_argz_len, 1);
+   if (err)
+     {
+-      argz_stringify (new_argz, argz_len, ' ');
++      argz_stringify (new_argz, new_argz_len, ' ');
+       error (0, err, "Could not make pfinet %s drive %s with '%s'", socket,
+ 	     name, new_argz);
+       goto out;
+-- 
+Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
+Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
+
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 29/31] gnu: grub: Fix build for the 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (27 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 28/31] gnu: inetutils: Fix build for " Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 30/31] gnu: guile-fibers: " Janneke Nieuwenhuizen
                   ` (3 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290; +Cc: Efraim Flashner, Vagrant Cascadian

* gnu/packages/patches/grub-hurd64.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/bootloaders.scm (grub)[arguments]: When building for the 64bit
Hurd, use it in new "apply-hurd64-patch" stage.

Change-Id: I780f6a92418b49e5fe0d23eb1c90e155216f1428
---
 gnu/local.mk                           |  1 +
 gnu/packages/bootloaders.scm           |  8 +++++++
 gnu/packages/patches/grub-hurd64.patch | 32 ++++++++++++++++++++++++++
 3 files changed, 41 insertions(+)
 create mode 100644 gnu/packages/patches/grub-hurd64.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 6a46241e5f..11955c7a49 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1487,6 +1487,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gromacs-tinyxml2.patch			\
   %D%/packages/patches/groovy-add-exceptionutilsgenerator.patch	\
   %D%/packages/patches/grub-efi-fat-serial-number.patch		\
+  %D%/packages/patches/grub-hurd64.patch			\
   %D%/packages/patches/grub-setup-root.patch			\
   %D%/packages/patches/guile-1.8-cpp-4.5.patch			\
   %D%/packages/patches/guile-2.2-skip-oom-test.patch            \
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 8ae9621e5b..781000af1b 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -192,6 +192,14 @@ (define-public grub
                        (setenv "BUILD_FREETYPE_CFLAGS"
                                (string-append "-I" freetype
                                               "/include/freetype2"))))))
+               #$@(if (target-hurd64?)
+                      #~((add-after 'unpack 'apply-hurd64-patch
+                           (lambda _
+                             (let ((patch
+                                    #$(local-file
+                                       (search-patch "grub-hurd64.patch"))))
+                               (invoke "patch" "--force" "-p1" "-i" patch)))))
+                      #~())
                (add-before 'check 'disable-flaky-test
                  (lambda _
                    ;; This test is unreliable. For more information, see:
diff --git a/gnu/packages/patches/grub-hurd64.patch b/gnu/packages/patches/grub-hurd64.patch
new file mode 100644
index 0000000000..d5acd99eb8
--- /dev/null
+++ b/gnu/packages/patches/grub-hurd64.patch
@@ -0,0 +1,32 @@
+Upstream-status: Not presented upstream.
+
+From a4eb7d1f2cbd02132a9f5512f1294182576d4653 Mon Sep 17 00:00:00 2001
+From: Janneke Nieuwenhuizen <janneke@gnu.org>
+Date: Fri, 8 Nov 2024 11:47:49 +0100
+Subject: [PATCH] osdep/hurd: Support the 64bit Hurd.
+Content-Transfer-Encoding: 8bit
+Content-Type: text/plain; charset=UTF-8
+
+* grub-core/osdep/hurd/getroot.c (grub_util_find_hurd_root_device):
+Use mach_msg_type_number_t instead of size_t.
+---
+ grub-core/osdep/hurd/getroot.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/grub-core/osdep/hurd/getroot.c b/grub-core/osdep/hurd/getroot.c
+index 0efefdab4..b849700e6 100644
+--- a/grub-core/osdep/hurd/getroot.c
++++ b/grub-core/osdep/hurd/getroot.c
+@@ -58,7 +58,7 @@ grub_util_find_hurd_root_device (const char *path)
+   file_t file;
+   error_t err;
+   char *argz = NULL, *name = NULL, *ret;
+-  size_t argz_len = 0;
++  mach_msg_type_number_t argz_len = 0;
+   int i;
+ 
+   file = file_name_lookup (path, 0, 0);
+-- 
+Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
+Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
+
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 30/31] gnu: guile-fibers: Fix build for the 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (28 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 29/31] gnu: grub: " Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 10:38 ` [bug#74290] [PATCH 31/31] system: hurd: Use 64bit gnumach " Janneke Nieuwenhuizen
                   ` (2 subsequent siblings)
  32 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290

* gnu/packages/guile-xyz.scm (guile-fibers)[arguments]: Also modify phases for
the 64bit Hurd.

Change-Id: I780f6a92418b49e5fe0d23eb1c90e155216f1428
---
 gnu/packages/guile-xyz.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index ea192c2c03..a874ab908d 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -855,7 +855,7 @@ (define-public guile-fibers
      (list #:make-flags
            #~(list "GUILE_AUTO_COMPILE=0")
            #:phases
-           (if (target-x86-64?)
+           (if (and (target-x86-64?) (not (target-hurd?)))
                #~%standard-phases
                #~(modify-phases %standard-phases
                    (add-before 'check 'disable-some-tests
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 31/31] system: hurd: Use 64bit gnumach for the 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (29 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 30/31] gnu: guile-fibers: " Janneke Nieuwenhuizen
@ 2024-11-10 10:38 ` Janneke Nieuwenhuizen
  2024-11-10 14:40   ` janneke
  2024-11-10 14:15 ` [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka " janneke
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
  32 siblings, 1 reply; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-10 10:38 UTC (permalink / raw)
  To: 74290

* gnu/system/hurd.scm (%hurd-default-operating-system-kernel): Use
actual (%current-target-system) to specify (%current-system) instead of using
hardcoded "i686-linux".

Change-Id: Ifc179bce221b1a54461860c24ba400cf6932ec86
---
 gnu/system/hurd.scm | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm
index 9a351529e8..58e41959f4 100644
--- a/gnu/system/hurd.scm
+++ b/gnu/system/hurd.scm
@@ -18,6 +18,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu system hurd)
+  #:use-module (ice-9 match)
   #:use-module (guix gexp)
   #:use-module (guix profiles)
   #:use-module (guix utils)
@@ -64,9 +65,13 @@ (define %hurd-default-operating-system-kernel
   (if (system-hurd?)
       gnumach
       ;; A cross-built GNUmach does not work
-      (with-parameters ((%current-system "i686-linux")
-                        (%current-target-system #f))
-        gnumach)))
+      (let ((system (match (%current-system)
+                      ((? target-x86-32?) "i686-linux")
+                      ((? target-x86-64?) "x86_64-linux")
+                      (_  "i686-linux"))))
+        (with-parameters ((%current-system system)
+                          (%current-target-system #f))
+          gnumach))))
 
 (define %base-packages/hurd
   ;; Note: the Shepherd comes before the Hurd, not just because its duty is to
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 02/31] gnu: gnumach: Update to v1.8+git20240714.
  2024-11-10 10:37 ` [bug#74290] [PATCH 02/31] gnu: gnumach: Update to v1.8+git20240714 Janneke Nieuwenhuizen
@ 2024-11-10 11:45   ` janneke
  0 siblings, 0 replies; 78+ messages in thread
From: janneke @ 2024-11-10 11:45 UTC (permalink / raw)
  To: 74290

[-- Attachment #1: Type: text/plain, Size: 973 bytes --]

Janneke Nieuwenhuizen writes:

> * gnu/packages/patches/gnumach-version.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Register it.
> * gnu/packages/hurd.scm (gnumach-headers): Update to v1.8+git20240714 and use
> it.

Err, this needs

--8<---------------cut here---------------start------------->8---
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 682deb89cf..a000cbfdc5 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2640,6 +2640,7 @@ (define gnumach-headers-boot0
      (source
       (origin
         (inherit (package-source gnumach-headers))
+        (patches '())
         (method
          (git-fetch-from-tarball
           (origin

--8<---------------cut here---------------end--------------->8---

in order for `guix build --system=x86_64-gnu' (checking bootstrap
hashes) not to hang.

Oops, caused by a last minute adding of "nice cosmetic" version number
patch from Debian.

Janneke


[-- Attachment #2: 0001-squash-gnu-gnumach-Update-to-v1.8-git20240714.patch --]
[-- Type: text/x-patch, Size: 1247 bytes --]

From efb58c8deb6693aaa9dcec6d616289d36c3967b3 Mon Sep 17 00:00:00 2001
Message-ID: <efb58c8deb6693aaa9dcec6d616289d36c3967b3.1731238981.git.janneke@gnu.org>
From: Janneke Nieuwenhuizen <janneke@gnu.org>
Date: Sun, 10 Nov 2024 12:31:13 +0100
Subject: [PATCH] squash! gnu: gnumach: Update to v1.8+git20240714.
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=UTF-8

* gnu/packages/commencement.scm (gnumach-headers-boot0)[origin]: Reset
patches.

Change-Id: I5186c6c0e4f8df6ea55a74943b919bd13530d4d3
---
 gnu/packages/commencement.scm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 682deb89cf..a000cbfdc5 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2640,6 +2640,7 @@ (define gnumach-headers-boot0
      (source
       (origin
         (inherit (package-source gnumach-headers))
+        (patches '())
         (method
          (git-fetch-from-tarball
           (origin

base-commit: 52f615e031e134f37d20b5bda18e24391c6654c0
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com


[-- Attachment #3: Type: text/plain, Size: 164 bytes --]


-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com

^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (30 preceding siblings ...)
  2024-11-10 10:38 ` [bug#74290] [PATCH 31/31] system: hurd: Use 64bit gnumach " Janneke Nieuwenhuizen
@ 2024-11-10 14:15 ` janneke
  2024-11-12  1:17   ` Maxim Cournoyer
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
  32 siblings, 1 reply; 78+ messages in thread
From: janneke @ 2024-11-10 14:15 UTC (permalink / raw)
  To: 74290
  Cc: Vagrant Cascadian, Josselin Poiret, Tobias Geerinckx-Rice,
	Sharlatan Hellseher, Maxim Cournoyer, Ekaitz Zarraga,
	Simon Tournier, Guillaume Le Vaillant, Mathieu Othacehe,
	Ludovic Courtès, Katherine Cox-Buday, Efraim Flashner,
	Munyoki Kilyungi, Andreas Enge, jgart, Christopher Baines

Janneke Nieuwenhuizen writes:

From running etc/teams.scm by hand I found that you should have been
CC'd on this patch series, sorry.  Working from a backup laptop that
missed the ../etc/git/gitconfig teams include.

> Hi,
>
> Lo and behold, the 64bit Hurd boots!  Again, thanks to the help from the
> kind folks over at libera #hurd and their excellent work.  Do something like:
>
> ./pre-inst-env guix system image --image-type=hurd64-qcow2 \
>   gnu/system/examples/bare-hurd.tmpl
>
>
> producing something like: /gnu/store/...-disk-image.
>
> Run the image in QEMU:
>
> guix shell qemu@7 -- qemu-system-x86_64                 \
> --machine q35                                           \
> -m 4096                                                 \
> --enable-kvm                                            \
> --device rtl8139,netdev=net0                            \
> --netdev user,id=net0,hostfwd=tcp:0.0.0.0:11022-:2222   \
> --snapshot                                              \
> --hda /gnu/store/...-disk-image
>
>
> and login
>
> 11:03:20 janneke@dundal:~/src/guix/hurd-team 
> $ ssh -p 11022 root@localhost
> Last login: Sun Nov 10 10:09:00 2024 from 10.0.2.2
> 
> 
>   This is the GNU Hurd.  Welcome.
>
> root@guixygnu ~# uname -a
> GNU guixygnu 0.9 GNU-Mach 1.8/Hurd-0.9 x86_64 GNU
>
> Most notably, besides the expected updates, this series adds an indirection
> for gcc and gcc-toolchain, (current-gcc) and (current-gcc-toolchain)
> respectively, as the 64bit Hurd needs gcc-14.  We may also want to think about
> image names hurd64-qcow2 etc. and their defaults, vs hurd-qcow2/hurd32-qcow2.
> We'll probably also want a 64bit childhurd service, etc, etc...
>
> This series builds on/waits for #73927, which I intend to rebase and push
> later this weekend if there are no further comments.  And I guess that the
> pending blog post will also need an update :)
>
> For your hacking convenience I have reset and updated the `hurd-team' branch.
>
> Greetings,
> Janneke
>
> Janneke Nieuwenhuizen (31):
>   gnu: mig: Update to v1.8+git20231217.
>   gnu: gnumach: Update to v1.8+git20240714.
>   gnu: hurd: Update to v0.9.git20240714.
>   gnu: gcc: Add indirections current-gcc, current-gcc-toolchain.
>   gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd.
>   gnu: cross-libc: Support cross-building for the 64bit Hurd.
>   gnu: bash-minimal: Fix build for 64bit Hurd.
>   gnu: elfutils: Fix build for 64bit Hurd.
>   gnu: grep: Fix build for the 64bit Hurd.
>   gnu: patch: Fix build for the 64bit Hurd.
>   gnu: libxcrypt: Support the 64bit Hurd.
>   gnu: libstdc++: Support the 64bit Hurd.
>   gnu: gcc-13, gcc-14: Support being used as parent for gcc-static.
>   DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd.
>   system: image: Add hurd64 image types.
>   gnu: Add libgpg-error-1.50.
>   gnu: libgcrypt: Use libgpg-error-1.50 for the 64bit Hurd.
>   gnu: perl: Support cross-building for the 64bit Hurd.
>   gnu: openssl-3.0: Support the 64bit Hurd.
>   gnu: pciutils: Support the 64bit Hurd.
>   gnu: libpciaccess: Support the 64bit Hurd.
>   gnu: netdde: Update to c0ef248dc7c5ccc1273e2a796f3ece30c5b645df.
>   gnu: netdde: Support the 64bit Hurd.
>   gnu: rumpkernel: Update to f1ffd6405f225336e595a0f99f01095ed7438337.
>   gnu: rumpkernel: Support the 64bit Hurd.
>   gnu: hurd: Build fixes for the 64bit Hurd.
>   gnu: git-minimal: Support the 64bit Hurd.
>   gnu: inetutils: Fix build for the 64bit Hurd.
>   gnu: grub: Fix build for the 64bit Hurd.
>   gnu: guile-fibers: Fix build for the 64bit Hurd.
>   system: hurd: Use 64bit gnumach for the 64bit Hurd.
>
>  doc/guix.texi                                 |   9 +-
>  gnu/ci.scm                                    |   4 +-
>  gnu/local.mk                                  |   9 +
>  gnu/packages/admin.scm                        |  14 +-
>  gnu/packages/avr.scm                          |   7 +-
>  gnu/packages/base.scm                         |  74 ++++---
>  gnu/packages/bash.scm                         |   9 +
>  gnu/packages/benchmark.scm                    |   6 +-
>  gnu/packages/bootloaders.scm                  |  10 +-
>  gnu/packages/bootstrap.scm                    |  46 ++++-
>  gnu/packages/c.scm                            |   4 +-
>  gnu/packages/chicken.scm                      |   7 +-
>  gnu/packages/commencement.scm                 |  35 ++--
>  gnu/packages/containers.scm                   |   5 +-
>  gnu/packages/cross-base.scm                   |  27 +--
>  gnu/packages/crypto.scm                       |  15 ++
>  gnu/packages/dlang.scm                        |   3 +-
>  gnu/packages/elf.scm                          |   6 +-
>  gnu/packages/engineering.scm                  |   4 +-
>  gnu/packages/gawk.scm                         |   3 +-
>  gnu/packages/gcc.scm                          |  69 ++++---
>  gnu/packages/gnupg.scm                        |  19 +-
>  gnu/packages/golang.scm                       |   3 +-
>  gnu/packages/guile-xyz.scm                    |   2 +-
>  gnu/packages/hurd.scm                         | 187 ++++++++++++------
>  gnu/packages/julia-xyz.scm                    |   3 +-
>  gnu/packages/lisp.scm                         |   3 +-
>  gnu/packages/llvm.scm                         |   7 +-
>  gnu/packages/make-bootstrap.scm               |  60 +++---
>  gnu/packages/mpi.scm                          |   3 +-
>  gnu/packages/parallel.scm                     |   5 +-
>  gnu/packages/patches/gnumach-version.patch    |  23 +++
>  gnu/packages/patches/grub-hurd64.patch        |  32 +++
>  gnu/packages/patches/hurd-64bit.patch         |  56 ++++++
>  gnu/packages/patches/inetutils-hurd64.patch   |  65 ++++++
>  .../patches/libpciaccess-hurd64.patch         |  58 ++++++
>  gnu/packages/patches/libxcrypt-hurd64.patch   |  38 ++++
>  gnu/packages/patches/netdde-csum.patch        |  18 ++
>  gnu/packages/patches/openssl-hurd64.patch     |  99 ++++++++++
>  gnu/packages/patches/pciutils-hurd64.patch    |  31 +++
>  gnu/packages/pciutils.scm                     |  25 ++-
>  gnu/packages/perl.scm                         |  20 +-
>  gnu/packages/rocm.scm                         |   3 +-
>  gnu/packages/tls.scm                          |   9 +
>  gnu/packages/version-control.scm              |   8 +-
>  gnu/packages/xorg.scm                         |  23 ++-
>  gnu/system.scm                                |   1 -
>  gnu/system/hurd.scm                           |  11 +-
>  gnu/system/images/hurd.scm                    |  47 ++++-
>  guix/packages.scm                             |   8 +-
>  guix/platforms/x86.scm                        |  11 +-
>  guix/utils.scm                                |  15 +-
>  m4/guix.m4                                    |  12 +-
>  53 files changed, 1025 insertions(+), 246 deletions(-)
>  create mode 100644 gnu/packages/patches/gnumach-version.patch
>  create mode 100644 gnu/packages/patches/grub-hurd64.patch
>  create mode 100644 gnu/packages/patches/hurd-64bit.patch
>  create mode 100644 gnu/packages/patches/inetutils-hurd64.patch
>  create mode 100644 gnu/packages/patches/libpciaccess-hurd64.patch
>  create mode 100644 gnu/packages/patches/libxcrypt-hurd64.patch
>  create mode 100644 gnu/packages/patches/netdde-csum.patch
>  create mode 100644 gnu/packages/patches/openssl-hurd64.patch
>  create mode 100644 gnu/packages/patches/pciutils-hurd64.patch
>
>
> base-commit: 7105e7125882be35e334448eafd6d81b37b627f0

-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 31/31] system: hurd: Use 64bit gnumach for the 64bit Hurd.
  2024-11-10 10:38 ` [bug#74290] [PATCH 31/31] system: hurd: Use 64bit gnumach " Janneke Nieuwenhuizen
@ 2024-11-10 14:40   ` janneke
  0 siblings, 0 replies; 78+ messages in thread
From: janneke @ 2024-11-10 14:40 UTC (permalink / raw)
  To: 74290

Janneke Nieuwenhuizen writes:

> * gnu/system/hurd.scm (%hurd-default-operating-system-kernel): Use
> actual (%current-target-system) to specify (%current-system) instead of using
> hardcoded "i686-linux".
>
> Change-Id: Ifc179bce221b1a54461860c24ba400cf6932ec86
> ---
>  gnu/system/hurd.scm | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm
> index 9a351529e8..58e41959f4 100644
> --- a/gnu/system/hurd.scm
> +++ b/gnu/system/hurd.scm
> @@ -18,6 +18,7 @@
>  ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
>  
>  (define-module (gnu system hurd)
> +  #:use-module (ice-9 match)
>    #:use-module (guix gexp)
>    #:use-module (guix profiles)
>    #:use-module (guix utils)
> @@ -64,9 +65,13 @@ (define %hurd-default-operating-system-kernel
>    (if (system-hurd?)
>        gnumach
>        ;; A cross-built GNUmach does not work
> -      (with-parameters ((%current-system "i686-linux")
> -                        (%current-target-system #f))
> -        gnumach)))
> +      (let ((system (match (%current-system)
> +                      ((? target-x86-32?) "i686-linux")
> +                      ((? target-x86-64?) "x86_64-linux")
> +                      (_  "i686-linux"))))
> +        (with-parameters ((%current-system system)
> +                          (%current-target-system #f))
> +          gnumach))))

This is obviously wrong; the idea was to do something like

--8<---------------cut here---------------start------------->8---
      (let ((system (match (or (%current-target-system)
                               (%current-system))
                      ((? target-x86-32?) "i686-linux")
                      ((? target-x86-64?) "x86_64-linux")
                      (_  "i686-linux"))))
        (with-parameters ((%current-system system)
                          (%current-target-system #f))
          gnumach))))
--8<---------------cut here---------------end--------------->8---

...but as %hurd-default-operating-system-kernel is a variable that is
evaluated at toplevel/too early, this also doesn't work.  Ideas?

Janneke

-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com




^ permalink raw reply	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 14/31] DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd.
  2024-11-10 10:38 ` [bug#74290] [PATCH 14/31] DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
@ 2024-11-11 18:05   ` janneke
  0 siblings, 0 replies; 78+ messages in thread
From: janneke @ 2024-11-11 18:05 UTC (permalink / raw)
  To: 74290

[-- Attachment #1: Type: text/plain, Size: 1538 bytes --]

Janneke Nieuwenhuizen writes:

Oops! This inadvertedly changed i586-gnu-pc hashes:

> diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
> index c4640b62e1..eb6a4f1917 100644
> --- a/gnu/packages/bootstrap.scm
> +++ b/gnu/packages/bootstrap.scm
> @@ -118,13 +118,22 @@ (define %bootstrap-executables
>        ,(base32 "0i9kxdi17bm5gxfi2xzm0y73p3ii0cqxli1sbljm6rh2fjgyn90k")))
>      ("i586-gnu"
>       ("bash"
> -      ,(base32 "1as8649aqaibahhhrvkj10ci8shpi4hq5n7gnik8rhhy0dc1jarg"))
> +      ,(base32 "0nb8ga2j7a4kf6j7pnavq8zf68mj8mhqh26nwkilz1ykj86vg9ml"))
>       ("mkdir"
> -      ,(base32 "1snqgpfrl00hfn82lm29jqylzjsfb9jd6ha74dp12phwb8fpbmb9"))
> +      ,(base32 "0ldsx9pwan40fx2hf4s9d10sfkhvkljvl20hksvm4192p7jb4shp"))
>       ("tar"
> -      ,(base32 "0nq2c1zb3wv5bf7kd83sziaashydazrn7xgq6kijlk0zj2syzc2m"))
> +      ,(base32 "1z6kfvpwhy14vc52i61v1vzzk3gzxka3db5rlg1jsq6kli35s2ab"))
>       ("xz"
> -      ,(base32 "033rhpk6zrpxpd6ffjyg5y2zwq9x9cnq0zljb7k8jlncbalsayq5")))
> +      ,(base32 "1f7g40sk5a6k6qf65k58vlybnnmhyyzczdxy60m3jgcsp674wfcr")))

and did not use "-r" in guix hash -r (I thought that meant "recursive"):

> +    ("x86_64-gnu"
> +     ("bash"
> +      ,(base32 "0l0dnighcipvdfbk14q834n57q859i2b9ssiq4bnbh0jpxvvqp1l"))
> +     ("mkdir"
> +      ,(base32 "1nd17k8pwwi7zsqi685w4rn1p2cvfcalrzdhfgwpsk1ilxnmdvsq"))
> +     ("tar"
> +      ,(base32 "0lf94y22ngmxdwhsp0cvj33m23p33r999xnlrff0s1yvlf20w3ks"))
> +     ("xz"
> +      ,(base32 "145aq65rx7w0qk1sw9239888id5ri60ha0xp1kyp6ir3pvizh6by")))



[-- Attachment #2: 0001-squash-DRAFT-gnu-bootstrap-Add-support-for-x86_64-gn.patch --]
[-- Type: text/x-patch, Size: 9069 bytes --]

From 59a6dcd5f4ca63aa17c83366fc5b74cf4c93d61d Mon Sep 17 00:00:00 2001
Message-ID: <59a6dcd5f4ca63aa17c83366fc5b74cf4c93d61d.1731348265.git.janneke@gnu.org>
From: Janneke Nieuwenhuizen <janneke@gnu.org>
Date: Mon, 11 Nov 2024 08:27:41 +0100
Subject: [PATCH] squash! DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka
 the 64bit Hurd.
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=UTF-8

Oops: Leave i586-pc-gnu alone and use guix hash -r.

Change-Id: Id96715cee07572cd0635594d3b1aa6756fa8a822
---
 gnu/packages/bootstrap.scm | 38 +++++++++++++++++++-------------------
 1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index eb6a4f1917..066eef5cc8 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -118,22 +118,22 @@ (define %bootstrap-executables
       ,(base32 "0i9kxdi17bm5gxfi2xzm0y73p3ii0cqxli1sbljm6rh2fjgyn90k")))
     ("i586-gnu"
      ("bash"
-      ,(base32 "0nb8ga2j7a4kf6j7pnavq8zf68mj8mhqh26nwkilz1ykj86vg9ml"))
+      ,(base32 "1as8649aqaibahhhrvkj10ci8shpi4hq5n7gnik8rhhy0dc1jarg"))
      ("mkdir"
-      ,(base32 "0ldsx9pwan40fx2hf4s9d10sfkhvkljvl20hksvm4192p7jb4shp"))
+      ,(base32 "1snqgpfrl00hfn82lm29jqylzjsfb9jd6ha74dp12phwb8fpbmb9"))
      ("tar"
-      ,(base32 "1z6kfvpwhy14vc52i61v1vzzk3gzxka3db5rlg1jsq6kli35s2ab"))
+      ,(base32 "0nq2c1zb3wv5bf7kd83sziaashydazrn7xgq6kijlk0zj2syzc2m"))
      ("xz"
-      ,(base32 "1f7g40sk5a6k6qf65k58vlybnnmhyyzczdxy60m3jgcsp674wfcr")))
+      ,(base32 "033rhpk6zrpxpd6ffjyg5y2zwq9x9cnq0zljb7k8jlncbalsayq5")))
     ("x86_64-gnu"
      ("bash"
-      ,(base32 "0l0dnighcipvdfbk14q834n57q859i2b9ssiq4bnbh0jpxvvqp1l"))
+      ,(base32 "1ib1kk1larki3dm46lhl756856zpjwhhlnzkgdyh9f1yf6wm431y"))
      ("mkdir"
-      ,(base32 "1nd17k8pwwi7zsqi685w4rn1p2cvfcalrzdhfgwpsk1ilxnmdvsq"))
+      ,(base32 "15cnckq4qj1nlmgqy9vq3qa3kcbfm1pc2z38pscxix11j4aqswsm"))
      ("tar"
-      ,(base32 "0lf94y22ngmxdwhsp0cvj33m23p33r999xnlrff0s1yvlf20w3ks"))
+      ,(base32 "1m8v7ddmn42wym2kl9mf7csnwsw6c3jdglg7d7kp7yaa16h5fbck"))
      ("xz"
-      ,(base32 "145aq65rx7w0qk1sw9239888id5ri60ha0xp1kyp6ir3pvizh6by")))
+      ,(base32 "16cnr7vr0zawrwcnhshms3v5kyzb2vz1rp4kxmx507cs6rivd05b")))
     ("mips64el-linux"
      ("bash"
       ,(base32 "1aw046dhda240k9pb9iaj5aqkm23gkvxa9j82n4k7fk87nbrixw6"))
@@ -174,7 +174,7 @@ (define (bootstrap-executable-file-name system program)
   (match system
     ("powerpc64le-linux" (string-append system "/20210106/" program))
     ("i586-gnu" (string-append system "/20200326/" program))
-    ("x86_64-gnu" (string-append system "/20241110/" program))
+    ("x86_64-gnu" (string-append system "/20241111/" program))
     ("powerpc-linux" (string-append system "/20200923/bin/" program))
     ("riscv64-linux" (string-append system "/20210725/bin/" program))
     (_ (string-append system "/" program
@@ -377,7 +377,7 @@ (define (bootstrap-guile-url-path system)
                    ("i586-gnu"
                     "/20200326/guile-static-stripped-2.0.14-i586-pc-gnu.tar.xz")
                    ("x86_64-gnu"
-                    "/20241110/guile-static-stripped-3.0.9-x86_64-pc-gnu.tar.xz")
+                    "/20241111/guile-static-stripped-3.0.9-x86_64-pc-gnu.tar.xz")
                    ("powerpc64le-linux"
                     "/20210106/guile-static-stripped-2.0.14-powerpc64le-linux-gnu.tar.xz")
                    ("riscv64-linux"
@@ -403,7 +403,7 @@ (define (bootstrap-guile-hash system)
     ("i586-gnu"
      (base32 "0wgqpsmvg25rnqn49ap7kwd2qxccd8dr4lllzp7i3rjvgav27vac"))
     ("x86_64-gnu"
-     (base32 "0fgasmbidp584ibr5fbirmp3wr8qchv84a50i4bichysp00gg26p"))
+     (base32 "0s2r8pwy8jcp1m8qdyiwvnv6f4wmcjq9a8g8jcbm974dd63ym2y3"))
     ("powerpc-linux"
      (base32 "1by2p7s27fbyjzfkcw8h65h4kkqh7d23kv4sgg5jppjn2qx7swq4"))
     ("riscv64-linux"
@@ -613,7 +613,7 @@ (define %bootstrap-coreutils&co
                                             ("i586-gnu"
                                              "/20200326/static-binaries-0-i586-pc-gnu.tar.xz")
                                             ("x86_64-gnu"
-                                             "/20241110/static-binaries-0-x86_64-pc-gnu.tar.xz")
+                                             "/20241111/static-binaries-0-x86_64-pc-gnu.tar.xz")
                                             ("powerpc-linux"
                                              "/20200923/static-binaries.tar.xz")
                                             ("riscv64-linux"
@@ -643,7 +643,7 @@ (define %bootstrap-coreutils&co
                                 "17kllqnf3fg79gzy9ansgi801c46yh9c23h4d923plvb0nfm1cfn"))
                               ("x86_64-gnu"
                                (base32
-                                "118s161df8hgrdfph2w5spnrms02rh1dk7mzfvx1k1prvgngpm9p"))
+                                "05lacv0zx80798wmri6d7aag5vkpfm7q0xsrp1fm0vldwdm1v39v"))
                               ("powerpc-linux"
                                (base32
                                 "0kspxy0yczan2vlih6aa9hailr2inz000fqa0gn5x9d1fxxa5y8m"))
@@ -701,7 +701,7 @@ (define %bootstrap-binutils
                                             ("i586-gnu"
                                              "/20200326/binutils-static-stripped-2.34-i586-pc-gnu.tar.xz")
                                             ("x86_64-gnu"
-                                             "/20241110/binutils-static-stripped-2.41-x86_64-pc-gnu.tar.xz")
+                                             "/20241111/binutils-static-stripped-2.41-x86_64-pc-gnu.tar.xz")
                                             ("powerpc-linux"
                                              "/20200923/binutils-2.35.1.tar.xz")
                                             ("riscv64-linux"
@@ -734,7 +734,7 @@ (define %bootstrap-binutils
                                 "11kykv1kmqc5wln57rs4klaqa13hm952smkc57qcsyss21kfjprs"))
                               ("x86_64-gnu"
                                (base32
-                                "07r74sa7341frhf5a7h1p3pklsrmfpfrf5s8dxm3yz2kqzhish48"))
+                                "0rzdn8357g4gias3k29bc6nhwv23bx029r83k7y4lfnq6w86b1wz"))
                               ("powerpc-linux"
                                (base32
                                 "0asbg1c4avkrvh057mx0942xwddd136jni382zqsxzn79ls42yq8"))
@@ -796,7 +796,7 @@ (define %bootstrap-glibc
                                       ("i586-gnu"
                                        "/20240816/glibc-stripped-2.39-i586-pc-gnu.tar.xz")
                                       ("x86_64-gnu"
-                                       "/20241110/glibc-stripped-2.39-x86_64-pc-gnu.tar.xz")
+                                       "/20241111/glibc-stripped-2.39-x86_64-pc-gnu.tar.xz")
                                       ("powerpc-linux"
                                        "/20200923/glibc-2.32.tar.xz")
                                       ("riscv64-linux"
@@ -829,7 +829,7 @@ (define %bootstrap-glibc
                           "0x2x6w611k6v9qdabacawamw2475p04hm3s0q95xcg063wjq4ig2"))
                         ("x86_64-gnu"
                          (base32
-                          "1dcgrnlxbsdic0xmmrjbr8gl6ra5y2xbj8f8jr6y0zvpdyi12ldd"))
+                          "0fbmh8aa7lva4xm6a8n49pfsgw4gzai00c4ylvggvgryscm65qr7"))
                         ("powerpc-linux"
                          (base32
                           "0smmssyjrlk5cvx49586smmk81gkwff0i6r91n4rir4jm6ba25sb"))
@@ -907,7 +907,7 @@ (define %bootstrap-gcc
                                        ("i586-gnu"
                                         "/20200326/gcc-stripped-5.5.0-i586-pc-gnu.tar.xz")
                                        ("x86_64-gnu"
-                                        "/20241110/gcc-stripped-14.2.0-x86_64-pc-gnu.tar.xz")
+                                        "/20241111/gcc-stripped-14.2.0-x86_64-pc-gnu.tar.xz")
                                        ("powerpc-linux"
                                         "/20200923/gcc-5.5.0.tar.xz")
                                        ("riscv64-linux"
@@ -940,7 +940,7 @@ (define %bootstrap-gcc
                            "1j2zc58wzil71a34h7c70sd68dmqvcscrw3rmn2whq79vd70zvv5"))
                          ("x86_64-gnu"
                           (base32
-                           "0vqvjvw6xi16lihiqz4mhisfwx3dgs15y60q07ksdkgvi1wdli2w"))
+                           "1z9fiwrmknz8x3kcw0p6hdqq176bi43dg4andk40sid0vh34qc0n"))
                          ("powerpc-linux"
                           (base32
                            "1p7df3yixhm87dw5sccc6yn1i9db1r9hnmsg87wq5xi4rfmirq7w"))

base-commit: bf9b13cd1c109adbc372e15d9f17bf1ebe580446
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com


[-- Attachment #3: Type: text/plain, Size: 164 bytes --]


-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com

^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd.
  2024-11-10 14:15 ` [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka " janneke
@ 2024-11-12  1:17   ` Maxim Cournoyer
  0 siblings, 0 replies; 78+ messages in thread
From: Maxim Cournoyer @ 2024-11-12  1:17 UTC (permalink / raw)
  To: janneke
  Cc: 74290, Josselin Poiret, Tobias Geerinckx-Rice,
	Sharlatan Hellseher, Vagrant Cascadian, Ekaitz Zarraga,
	Simon Tournier, Guillaume Le Vaillant, Mathieu Othacehe,
	Ludovic Courtès, Katherine Cox-Buday, Efraim Flashner,
	Munyoki Kilyungi, Andreas Enge, jgart, Christopher Baines

Hi Janneke!

<janneke@gnu.org> writes:

> Janneke Nieuwenhuizen writes:
>
> From running etc/teams.scm by hand I found that you should have been
> CC'd on this patch series, sorry.  Working from a backup laptop that
> missed the ../etc/git/gitconfig teams include.

No worries.  Note that the git configuration should self-heal/update
itself on every 'make' invocation, IIRC.

-- 
Thanks,
Maxim




^ permalink raw reply	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 00/40] Add support for x86_64-gnu, aka the 64bit Hurd.
  2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                   ` (31 preceding siblings ...)
  2024-11-10 14:15 ` [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka " janneke
@ 2024-11-12 16:25 ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 01/40] gnu: gnumach: Update to v1.8+git20240714 Janneke Nieuwenhuizen
                     ` (39 more replies)
  32 siblings, 40 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290; +Cc: Janneke Nieuwenhuizen

From: "Janneke Nieuwenhuizen" <janneke@gnu.org>

New in V2:

Add 64bit native compilation/development support:
  * commencement: update of gnumach-headers-boot0, mig-boot0, hurd-headers-boot0,
  * more 64bit Hurd/gcc-14 build fixes: m4, texinfo-4, flex,
  * cross build fix: gettext-[minimal],
  * rebased on latest master (NOTE: u-boot-tools tests must be disabled in
    order to build a VM, see <https://issues.guix.gnu.org/74270>).

Fixes:
  * guile-static now actually has (convinced libtool to create) a static guile,
  * guile-static-stripped-tarball is now packaged in a guile v3 bag,
  * binutils-static now actually has (convinced libtool to create) static binaries,
  * the hashes for bin/{bash,mkdir,tar,xz} now use guix hash _-r_,
  * the 32bit childhurd uses a 32bit gnumach again (and boots),
  * gnumach-headers-boot0 resets patches, resolving native i586-pc-gnu builds hanging,
  * a new bare-hurd64.tmpl (and devel-hurd64.tmpl) now work around this
    terrible "cannot-cross-build-gnumach-so-let's-guess-an-arch" issue,
    using NOIDE needed for the 64bit hurd to boot, and with better suggestions,

This is about the extent of what it can do right now: 

--8<---------------cut here---------------start------------->8---
15:07:14 janneke@dundal:~/var/geert 
$ ssh root@childhurd1


  This is the GNU Hurd.  Welcome.
root@guixygnu64 ~# uname -a
GNU guixygnu64 0.9 GNU-Mach 1.8/Hurd-0.9 x86_64 GNU
root@guixygnu64 ~# guix shell --bootstrap -D --expression='(@@ (gnu packages commencement) gnu-make-boot0)'
hint: Consider passing the `--check' option once to make sure your shell does not
clobber environment variables.

substitute: updating substitutes from 'http://dezyne.org:8181'... 100.0%
substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0%
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
The following derivations will be built:
  /gnu/store/w8y6ksif8m5x5340nc1f7chdmnidhsza-profile.drv
  /gnu/store/8kqnvyf9i8qgizq69314xa576fj4idy5-gcc-bootstrap-0.drv
  /gnu/store/kxi3vim4rl018vrg8gqchn84vda33dwy-bash.drv
  /gnu/store/mx6bmgkli4m404d9mzl4is9nsgycibw4-gcc-stripped-14.2.0-x86_64-pc-gnu.tar.xz.drv
  /gnu/store/mydw2x1m3nwxl2yz8p7kgr043mgzn1vd-tar.drv
  /gnu/store/ps0shilnqwpm40886dnqg4bkazw8pq7i-glibc-bootstrap-0.drv
  /gnu/store/fyk1fklwccp9m0g4x10rsgi6bw2nz3y5-glibc-stripped-2.39-x86_64-pc-gnu.tar.xz.drv
  /gnu/store/q4y6c1xk2vzfm5qff4kxw6skakkdz5mx-module-import-compiled.drv
  /gnu/store/z8bbhrwjlcrb1why3ahz1dk4x1xnwf0j-guile-bootstrap-2.0.drv
  /gnu/store/av844016j5sh8zy7y4h4wxkrs10a2rwd-guile-static-stripped-3.0.9-x86_64-pc-gnu.tar.xz.drv
  /gnu/store/rs264sapynb56fapyrklb5plsn0gsk49-xz.drv
  /gnu/store/zw7x3ln4wl3b0hvrzgjjvywx5bdiffaz-mkdir.drv
  /gnu/store/8llks4si3nqiw0n6sb3nc70nhpnfzw9j-module-import-compiled.drv
  /gnu/store/h0i9912383rhczlxca6pv5d6w9np9ici-bootstrap-binaries-0.drv
  /gnu/store/pllyzbxxbg249x6ckn4hb67g3q4v7xk5-static-binaries-0-x86_64-pc-gnu.tar.xz.drv
  /gnu/store/pa9pzpm6blxiasz5wz98lxdbvlz1a2wn-binutils-bootstrap-0.drv
  /gnu/store/6cg3h8i0mrsizrg1y06gnj491ydhdj9v-binutils-static-stripped-2.41-x86_64-pc-gnu.tar.xz.drv

building /gnu/store/kxi3vim4rl018vrg8gqchn84vda33dwy-bash.drv...
building /gnu/store/6cg3h8i0mrsizrg1y06gnj491ydhdj9v-binutils-static-stripped-2.41-x86_64-pc-gnu.tar.xz.drv...
building /gnu/store/mx6bmgkli4m404d9mzl4is9nsgycibw4-gcc-stripped-14.2.0-x86_64-pc-gnu.tar.xz.drv...
building /gnu/store/fyk1fklwccp9m0g4x10rsgi6bw2nz3y5-glibc-stripped-2.39-x86_64-pc-gnu.tar.xz.drv...
building /gnu/store/av844016j5sh8zy7y4h4wxkrs10a2rwd-guile-static-stripped-3.0.9-x86_64-pc-gnu.tar.xz.drv...
building /gnu/store/zw7x3ln4wl3b0hvrzgjjvywx5bdiffaz-mkdir.drv...
building /gnu/store/pllyzbxxbg249x6ckn4hb67g3q4v7xk5-static-binaries-0-x86_64-pc-gnu.tar.xz.drv...
building /gnu/store/mydw2x1m3nwxl2yz8p7kgr043mgzn1vd-tar.drv...
building /gnu/store/rs264sapynb56fapyrklb5plsn0gsk49-xz.drv...
building /gnu/store/z8bbhrwjlcrb1why3ahz1dk4x1xnwf0j-guile-bootstrap-2.0.drv...
building /gnu/store/8llks4si3nqiw0n6sb3nc70nhpnfzw9j-module-import-compiled.drv...
building /gnu/store/q4y6c1xk2vzfm5qff4kxw6skakkdz5mx-module-import-compiled.drv...
building /gnu/store/pa9pzpm6blxiasz5wz98lxdbvlz1a2wn-binutils-bootstrap-0.drv...
building /gnu/store/h0i9912383rhczlxca6pv5d6w9np9ici-bootstrap-binaries-0.drv...
building /gnu/store/ps0shilnqwpm40886dnqg4bkazw8pq7i-glibc-bootstrap-0.drv...
building /gnu/store/8kqnvyf9i8qgizq69314xa576fj4idy5-gcc-bootstrap-0.drv...
building profile with 4 packages...
bash-5.1# 
--8<---------------cut here---------------end--------------->8---

Reset and updated the hurd-team branch.

Greetings,
Janneke

Janneke Nieuwenhuizen (40):
  gnu: gnumach: Update to v1.8+git20240714.
  gnu: mig: Update to 1.8+git20231217.
  gnu: hurd: Update to 0.9.git20240714.
  gnu: gcc: Add indirections current-gcc, current-gcc-toolchain.
  gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd.
  gnu: cross-libc: Support cross-building for the 64bit Hurd.
  gnu: bash-minimal: Fix build for 64bit Hurd.
  gnu: elfutils: Fix build for 64bit Hurd.
  gnu: grep: Fix build for the 64bit Hurd.
  gnu: patch: Fix build for the 64bit Hurd.
  gnu: libxcrypt: Support the 64bit Hurd.
  gnu: libstdc++: Support the 64bit Hurd.
  gnu: gcc-13, gcc-14: Support being used as parent for gcc-static.
  DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd.
  system: image: Add hurd64 image types.
  gnu: Add libgpg-error-1.50.
  gnu: libgcrypt: Use libgpg-error-1.50 for the 64bit Hurd.
  gnu: perl: Support cross-building for the 64bit Hurd.
  gnu: openssl-3.0: Support the 64bit Hurd.
  gnu: pciutils: Support the 64bit Hurd.
  gnu: libpciaccess: Support the 64bit Hurd.
  gnu: netdde: Update to c0ef248dc7c5ccc1273e2a796f3ece30c5b645df.
  gnu: netdde: Support the 64bit Hurd.
  gnu: rumpkernel: Update to f1ffd6405f225336e595a0f99f01095ed7438337.
  gnu: rumpkernel: Support the 64bit Hurd.
  gnu: hurd: Build fixes for the 64bit Hurd.
  gnu: git-minimal: Support the 64bit Hurd.
  gnu: inetutils: Fix build for the 64bit Hurd.
  gnu: grub: Fix build for the 64bit Hurd.
  gnu: guile-fibers: Fix build for the 64bit Hurd.
  gnu: m4: Fix build for the 64bit Hurd.
  gnu: commencement: gnumach-headers-boot0: Update to 1.8+git20240714.
  gnu: commencement: mig-boot0: Update to 1.8+git20231217..
  gnu: commencement: hurd-headers-boot0: Update to 0.9.git20240714.
  gnu: commencement: libstdc++-boot0-gcc7: Replace by
    make-libstdc++-boot0.
  gnu: gettext: Fix cross-build shebangs.
  gnu: texinfo-4: Fix build for the 64bit Hurd.
  gnu: flex: Fix build for the 64bit Hurd.
  system: examples: Add bare-hurd64.tmpl.
  system: examples: Add devel-hurd64.tmpl.

 doc/guix.texi                                 |   9 +-
 gnu/ci.scm                                    |   4 +-
 gnu/local.mk                                  |   9 +
 gnu/packages/admin.scm                        |  14 +-
 gnu/packages/avr.scm                          |   7 +-
 gnu/packages/base.scm                         |  74 ++++---
 gnu/packages/bash.scm                         |   9 +
 gnu/packages/benchmark.scm                    |   6 +-
 gnu/packages/bootloaders.scm                  |  10 +-
 gnu/packages/bootstrap.scm                    |  41 +++-
 gnu/packages/c.scm                            |   4 +-
 gnu/packages/chicken.scm                      |   7 +-
 gnu/packages/commencement.scm                 |  55 +++---
 gnu/packages/containers.scm                   |   5 +-
 gnu/packages/cross-base.scm                   |  27 +--
 gnu/packages/crypto.scm                       |  15 ++
 gnu/packages/dlang.scm                        |   3 +-
 gnu/packages/elf.scm                          |   6 +-
 gnu/packages/engineering.scm                  |   4 +-
 gnu/packages/flex.scm                         |   8 +
 gnu/packages/gawk.scm                         |   3 +-
 gnu/packages/gcc.scm                          |  69 ++++---
 gnu/packages/gettext.scm                      |  16 +-
 gnu/packages/gnupg.scm                        |  19 +-
 gnu/packages/golang.scm                       |   3 +-
 gnu/packages/guile-xyz.scm                    |   2 +-
 gnu/packages/hurd.scm                         | 187 ++++++++++++------
 gnu/packages/julia-xyz.scm                    |   3 +-
 gnu/packages/lisp.scm                         |   3 +-
 gnu/packages/llvm.scm                         |   7 +-
 gnu/packages/m4.scm                           |   9 +-
 gnu/packages/make-bootstrap.scm               |  76 ++++---
 gnu/packages/mpi.scm                          |   3 +-
 gnu/packages/parallel.scm                     |   5 +-
 gnu/packages/patches/gnumach-version.patch    |  23 +++
 gnu/packages/patches/grub-hurd64.patch        |  32 +++
 gnu/packages/patches/hurd-64bit.patch         |  56 ++++++
 gnu/packages/patches/inetutils-hurd64.patch   |  65 ++++++
 .../patches/libpciaccess-hurd64.patch         |  58 ++++++
 gnu/packages/patches/libxcrypt-hurd64.patch   |  38 ++++
 gnu/packages/patches/netdde-csum.patch        |  18 ++
 gnu/packages/patches/openssl-hurd64.patch     |  99 ++++++++++
 gnu/packages/patches/pciutils-hurd64.patch    |  31 +++
 gnu/packages/pciutils.scm                     |  25 ++-
 gnu/packages/perl.scm                         |  20 +-
 gnu/packages/rocm.scm                         |   3 +-
 gnu/packages/texinfo.scm                      |  50 ++---
 gnu/packages/tls.scm                          |   9 +
 gnu/packages/version-control.scm              |   8 +-
 gnu/packages/xorg.scm                         |  23 ++-
 gnu/system.scm                                |   1 -
 gnu/system/examples/bare-hurd.tmpl            |  21 +-
 gnu/system/examples/bare-hurd64.tmpl          |  70 +++++++
 gnu/system/examples/devel-hurd.tmpl           |  70 +++----
 gnu/system/examples/devel-hurd64.tmpl         |  65 ++++++
 gnu/system/hurd.scm                           |  17 ++
 gnu/system/images/hurd.scm                    |  72 ++++++-
 guix/packages.scm                             |   8 +-
 guix/platforms/x86.scm                        |  11 +-
 guix/utils.scm                                |  15 +-
 m4/guix.m4                                    |  12 +-
 61 files changed, 1312 insertions(+), 330 deletions(-)
 create mode 100644 gnu/packages/patches/gnumach-version.patch
 create mode 100644 gnu/packages/patches/grub-hurd64.patch
 create mode 100644 gnu/packages/patches/hurd-64bit.patch
 create mode 100644 gnu/packages/patches/inetutils-hurd64.patch
 create mode 100644 gnu/packages/patches/libpciaccess-hurd64.patch
 create mode 100644 gnu/packages/patches/libxcrypt-hurd64.patch
 create mode 100644 gnu/packages/patches/netdde-csum.patch
 create mode 100644 gnu/packages/patches/openssl-hurd64.patch
 create mode 100644 gnu/packages/patches/pciutils-hurd64.patch
 create mode 100644 gnu/system/examples/bare-hurd64.tmpl
 create mode 100644 gnu/system/examples/devel-hurd64.tmpl


base-commit: b10ce47d8be5b6c15987f4e1d93b3bd71b1eb220
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 01/40] gnu: gnumach: Update to v1.8+git20240714.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 02/40] gnu: mig: Update to 1.8+git20231217 Janneke Nieuwenhuizen
                     ` (38 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290; +Cc: Andreas Enge, Efraim Flashner, Ekaitz Zarraga,
	Ludovic Courtès

* gnu/packages/patches/gnumach-version.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/hurd.scm (gnumach-headers): Update to v1.8+git20240714 and use
it.
* gnu/packages/commencement.scm (gnumach-headers-boot0)[origin]: Reset
patches.

Change-Id: I147c64021c2ee79dfc4cd4fd9a29529eef8890c5
---
 gnu/local.mk                               |  1 +
 gnu/packages/commencement.scm              |  1 +
 gnu/packages/hurd.scm                      |  9 ++++-----
 gnu/packages/patches/gnumach-version.patch | 23 ++++++++++++++++++++++
 4 files changed, 29 insertions(+), 5 deletions(-)
 create mode 100644 gnu/packages/patches/gnumach-version.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 1f48fddc9e..2bd857e7ac 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1460,6 +1460,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gnome-session-support-elogind.patch	\
   %D%/packages/patches/gnome-tweaks-search-paths.patch		\
   %D%/packages/patches/gnulib-bootstrap.patch			\
+  %D%/packages/patches/gnumach-version.patch			\
   %D%/packages/patches/gnupg-default-pinentry.patch		\
   %D%/packages/patches/gnupg-1-build-with-gcc10.patch		\
   %D%/packages/patches/gnutls-skip-trust-store-test.patch	\
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index ce40f0cea6..1cfaaae1e7 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2639,6 +2639,7 @@ (define gnumach-headers-boot0
      (source
       (origin
         (inherit (package-source gnumach-headers))
+        (patches '())
         (method
          (git-fetch-from-tarball
           (origin
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 9c1681f236..a22d0cadce 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -57,21 +57,20 @@ (define (hurd-source-url version)
                  version ".tar.gz"))
 
 (define-public gnumach-headers
-  (let ((revision "0")
-        (commit "2556fdece900d67529d5eda01f1bdaae4ffe96b0"))
+  (let ((commit "v1.8+git20240714"))
     (package
       (name "gnumach-headers")
-      (version (git-version "1.8" revision commit))
+      (version (string-drop commit 1))
       (source
        (origin
          (method git-fetch)
          (uri (git-reference
                (url "https://git.savannah.gnu.org/git/hurd/gnumach.git")
                (commit commit)))
+         (patches (search-patches "gnumach-version.patch"))
          (file-name (git-file-name "gnumach" version))
          (sha256
-          (base32
-           "1lzsbix0l4jhab38pvwnmk7ip1lsn7m5smhnrciqajsqnadsnlzs"))))
+          (base32 "0ykav1kx0bgxcxw04bpcsh5s4531fzdkahjgrlsfs2h3w3vfkga0"))))
       (build-system gnu-build-system)
       (arguments
        `(#:phases
diff --git a/gnu/packages/patches/gnumach-version.patch b/gnu/packages/patches/gnumach-version.patch
new file mode 100644
index 0000000000..aec3c86a16
--- /dev/null
+++ b/gnu/packages/patches/gnumach-version.patch
@@ -0,0 +1,23 @@
+Upstream-status: Taken from Debian upstream:
+    <https://salsa.debian.org/hurd-team/gnumach/-/raw/master/debian/patches/12_version_suffix.patch>
+
+Index: gnumach/configure.ac
+===================================================================
+--- gnumach.orig/configure.ac
++++ gnumach/configure.ac
+@@ -19,6 +19,7 @@ AC_PREREQ([2.57])
+ m4_include([version.m4])
+ AC_INIT([AC_PACKAGE_NAME], [AC_PACKAGE_VERSION], [AC_PACKAGE_BUGREPORT],
+   [AC_PACKAGE_TARNAME])
++AC_SUBST([PACKAGE_VERSION_SUFFIX])
+ AC_CONFIG_SRCDIR([kern/ipc_kobject.c])
+ 
+ if test -z "${CFLAGS+set}"; then
+Index: gnumach/version.c.in
+===================================================================
+--- gnumach.orig/version.c.in
++++ gnumach/version.c.in
+@@ -1,2 +1,2 @@
+ /* @configure_input@ */
+-const char version[] = "@PACKAGE_NAME@ @PACKAGE_VERSION@";
++const char version[] = "@PACKAGE_NAME@ @PACKAGE_VERSION@@PACKAGE_VERSION_SUFFIX@";
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 02/40] gnu: mig: Update to 1.8+git20231217.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 01/40] gnu: gnumach: Update to v1.8+git20240714 Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 03/40] gnu: hurd: Update to 0.9.git20240714 Janneke Nieuwenhuizen
                     ` (37 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/packages/hurd.scm (mig): Update to 1.8+git20231217.

Change-Id: I0e531ecc7fdcfbefe2e0e24d7b2fb5e0fe8a3ae2
---
 gnu/packages/hurd.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index a22d0cadce..28f39cc448 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -92,7 +92,7 @@ (define-public gnumach-headers
 (define-public mig
   (package
     (name "mig")
-    (version "1.8+git20230520")
+    (version "1.8+git20231217")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -101,7 +101,7 @@ (define-public mig
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "10r0fdjqjzqsy6ajb21rifvhw0wpjvrw6a1zdyliqlzqny5k0qlz"))))
+                "1mx7w5vzw5ws0zplm1y6s679jb1g2hjkiwl3dlk5lxys0dxs5g4g"))))
     (build-system gnu-build-system)
     ;; Flex is needed both at build and run time.
     (inputs (list gnumach-headers flex))
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 03/40] gnu: hurd: Update to 0.9.git20240714.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 01/40] gnu: gnumach: Update to v1.8+git20240714 Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 02/40] gnu: mig: Update to 1.8+git20231217 Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 04/40] gnu: gcc: Add indirections current-gcc, current-gcc-toolchain Janneke Nieuwenhuizen
                     ` (36 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/packages/hurd.scm (hurd-headers): Update to 0.9.git20240714.
(hurd)[arguments]: Remove rumpdisk build hack from "prepare-addons" stage.
Instead, when cross-compiling, add stage "fixup-cross-configure" to enable
rumpdisk.
* gnu/system.scm (hurd-multiboot-modules): Remove
"--x-xattr-translator-records" option that has been removed and is now the
default.

Change-Id: I4609b5a959c1ece98e2fe1aedbb1d31d6edadcca
---
 gnu/packages/hurd.scm | 12 +++++++++---
 gnu/system.scm        |  1 -
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 28f39cc448..06fae1bd3b 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -132,7 +132,7 @@ (define-public mig
 
 (define-public hurd-headers
   (let ((revision "3")
-        (commit "v0.9.git20231217"))
+        (commit "v0.9.git20240714"))
     (package
       (name "hurd-headers")
       (version (string-drop commit 1))
@@ -143,7 +143,7 @@ (define-public hurd-headers
                       (commit commit)))
                 (sha256
                  (base32
-                  "1d138kzhil6s5gf9di8grpz1iziakyfv037wkc8s7qyd61imm31d"))
+                  "0wvzil3llmrjg7ymwqs86d11bm5fl771jwncv7kk679lsvqca0ll"))
                 (file-name (git-file-name name version))))
       (build-system gnu-build-system)
       (native-inputs
@@ -336,7 +336,7 @@ (define-public hurd
              ;; Makefile. libdde_linux26 is built later in its own phase.
              (substitute* "Makefile"
                (("libbpf ")
-                "libbpf libmachdevdde libddekit rumpdisk"))))
+                "libbpf libmachdevdde libddekit "))))
          (add-after 'unpack 'find-tirpc
            (lambda* (#:key inputs #:allow-other-keys)
              (for-each (lambda (var)
@@ -362,6 +362,12 @@ (define-public hurd
                (("#include <rpc/pmap_prot.h>" m)
                 (string-append "#include <rpc/types.h>\n#include <rpc/xdr.h>\n" m)))
              #t))
+         ,@(if (%current-target-system)
+               '((add-after 'configure 'fixup-cross-configure
+                   (lambda _
+                     (substitute* "config.make"
+                       (("HAVE_LIBRUMP = no") "HAVE_LIBRUMP = yes")))))
+               '())
          (add-before 'build 'pre-build
            (lambda _
              ;; Don't change the ownership of any file at this time.
diff --git a/gnu/system.scm b/gnu/system.scm
index 074cd04a0e..dfcb8fb279 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -1539,7 +1539,6 @@ (define (hurd-multiboot-modules os)
                 "--multiboot-command-line='${kernel-command-line}'"
                 "--exec-server-task='${exec-task}'"
                 "--store-type=typed"
-                "--x-xattr-translator-records"
                 "'${root}'"
                 "'$(fs-task=task-create)'"))
          (target (%current-target-system))
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 04/40] gnu: gcc: Add indirections current-gcc, current-gcc-toolchain.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (2 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 03/40] gnu: hurd: Update to 0.9.git20240714 Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 05/40] gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd Janneke Nieuwenhuizen
                     ` (35 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290
  Cc: Andreas Enge, Efraim Flashner, Ekaitz Zarraga,
	Guillaume Le Vaillant, Katherine Cox-Buday, Ludovic Courtès,
	Munyoki Kilyungi, Sharlatan Hellseher, Simon Tournier,
	Vagrant Cascadian, jgart

Throughout: use (current-gcc) and (current-gcc-toolchain) instead of gcc and
gcc-toolchain.

* gnu/packages/gcc.scm (current-gcc): New procedure.
(gcc): Deprecate.
* gnu/packages/commencement.scm (current-gcc-toolchain): New procedure.
(gcc-toolchain): Deprecate.

Change-Id: I538897e53e2c9956abdc53c67621bb52cbd78a50
---
 gnu/packages/avr.scm            |  7 ++++---
 gnu/packages/benchmark.scm      |  6 ++++--
 gnu/packages/bootloaders.scm    |  2 +-
 gnu/packages/bootstrap.scm      |  4 ++--
 gnu/packages/c.scm              |  4 ++--
 gnu/packages/chicken.scm        |  7 ++++---
 gnu/packages/commencement.scm   | 33 +++++++++++++++++++--------------
 gnu/packages/containers.scm     |  5 +++--
 gnu/packages/cross-base.scm     |  4 ++--
 gnu/packages/dlang.scm          |  3 ++-
 gnu/packages/engineering.scm    |  4 ++--
 gnu/packages/gawk.scm           |  3 ++-
 gnu/packages/gcc.scm            | 21 ++++++++++++++-------
 gnu/packages/golang.scm         |  3 ++-
 gnu/packages/julia-xyz.scm      |  3 ++-
 gnu/packages/lisp.scm           |  3 ++-
 gnu/packages/llvm.scm           |  7 ++++---
 gnu/packages/make-bootstrap.scm | 20 ++++++++++----------
 gnu/packages/mpi.scm            |  3 ++-
 gnu/packages/parallel.scm       |  5 +++--
 gnu/packages/rocm.scm           |  3 ++-
 21 files changed, 88 insertions(+), 62 deletions(-)

diff --git a/gnu/packages/avr.scm b/gnu/packages/avr.scm
index 6042c1bd55..00dc124aa9 100644
--- a/gnu/packages/avr.scm
+++ b/gnu/packages/avr.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2020 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -53,7 +54,7 @@ (define make-avr-binutils
       (inherit (cross-binutils "avr"))
       (name "avr-binutils"))))
 
-(define* (make-avr-gcc/implementation #:key (xgcc gcc))
+(define* (make-avr-gcc/implementation #:key (xgcc (current-gcc)))
   "Return a XGCC-base cross-compiler for the AVR target."
   (let ((xgcc (cross-gcc "avr" #:xgcc xgcc #:xbinutils (make-avr-binutils))))
     (package
@@ -96,7 +97,7 @@ (define* (make-avr-gcc/implementation #:key (xgcc gcc))
               (variable "CROSS_LIBRARY_PATH")
               (files '("avr/lib")))))
       (native-inputs
-       `(("gcc" ,gcc)
+       `(("gcc" ,(current-gcc))
          ,@(package-native-inputs xgcc))))))
 
 (define make-avr-gcc
@@ -136,7 +137,7 @@ (define* (make-avr-libc/implementation #:key
 (define make-avr-libc
   (memoize make-avr-libc/implementation))
 
-(define* (make-avr-toolchain/implementation #:key (xgcc gcc))
+(define* (make-avr-toolchain/implementation #:key (xgcc (current-gcc)))
   (let ((avr-binutils (make-avr-binutils))
         (avr-libc (make-avr-libc #:xgcc (cross-gcc "avr" #:xgcc xgcc)))
         (avr-gcc (make-avr-gcc #:xgcc xgcc)))
diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm
index 326bbc99b4..c802e105ed 100644
--- a/gnu/packages/benchmark.scm
+++ b/gnu/packages/benchmark.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2022 Tomasz Jeneralczyk <tj@schwi.pl>
 ;;; Copyright © 2024 Nicolas Graves <ngraves@ngraves.fr>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -75,8 +76,8 @@ (define-module (gnu packages benchmark)
 
 ;; Lazily resolve the gcc-toolchain to avoid a circular dependency.
 (define gcc-toolchain*
-  (delay (module-ref (resolve-interface '(gnu packages commencement))
-                     'gcc-toolchain)))
+  (delay ((module-ref (resolve-interface '(gnu packages commencement))
+                      'current-gcc-toolchain))))
 
 (define-public fio
   (package
@@ -379,6 +380,7 @@ (define-public phoronix-test-suite
      (list bash
            coreutils
            (force gcc-toolchain*)
+           gcc-toolchain*
            gnu-make
            gzip
            php
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 52a077ecea..e188553910 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -1710,7 +1710,7 @@ (define u-boot-ts-mx6
               (add-before 'build 'adjust-for-current-gcc
                 (lambda _
                   (let ((gcc-major-version #$(version-major
-                                              (package-version gcc))))
+                                              (package-version (current-gcc)))))
                     (copy-file "include/linux/compiler-gcc6.h"
                                (string-append "include/linux/compiler-gcc"
                                               gcc-major-version ".h")))
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 3743abf9fe..c4640b62e1 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2012-2020, 2024 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2018, 2019 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2017, 2020, 2024 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2018, 2020, 2022 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2018, 2020, 2022, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2019 Carl Dong <contact@carldong.me>
 ;;; Copyright © 2019 Léo Le Bouter <lle-bout@zaclys.net>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
@@ -311,7 +311,7 @@ (define* (glibc-dynamic-linker
                                         gnu-triplet->nix-system)
                                  (%current-system))))
   "Return the name of Glibc's dynamic linker for SYSTEM."
-  ;; See the 'SYSDEP_KNOWN_INTERPRETER_NAMES' cpp macro in libc.
+  ;; See the appropriate 'shlib-versions' file in libc.
   (let ((platform (false-if-platform-not-found
                    (lookup-platform-by-system system))))
     (cond
diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm
index 13fdb99424..f52a7c603e 100644
--- a/gnu/packages/c.scm
+++ b/gnu/packages/c.scm
@@ -6,7 +6,7 @@
 ;;; Copyright © 2019, 2020, 2022-2024 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2019, 2021 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2019 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2020 Katherine Cox-Buday <cox.katherine.e@gmail.com>
 ;;; Copyright © 2020, 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
@@ -178,7 +178,7 @@ (define-public cproc
                           (string-append "--with-ld=" #$(ld-for-target))
                           (string-append "--with-gcc-libdir=" gcc-lib))))))))
       (inputs `(("qbe" ,qbe)
-                ("gcc:lib" ,gcc "lib")))
+                ("gcc:lib" ,(current-gcc) "lib")))
       (supported-systems (list "x86_64-linux" "aarch64-linux"))
       (synopsis "Simple C11 compiler backed by QBE")
       (description "@code{cproc} is a C compiler using QBE as a backend,
diff --git a/gnu/packages/chicken.scm b/gnu/packages/chicken.scm
index a499c5d9ee..02674577ed 100644
--- a/gnu/packages/chicken.scm
+++ b/gnu/packages/chicken.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
 ;;; Copyright © 2020 Evan Hanson <evhan@foldling.org>
 ;;; Copyright © 2020 raingloom <raingloom@riseup.net>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -69,9 +70,9 @@ (define-public chicken
             (files (list "var/lib/chicken/11")))))
     ;; Reference gcc-toolchain lazily to avoid circular module dependency
     ;; problems.
-    (propagated-inputs (list (module-ref (resolve-interface
-                                          '(gnu packages commencement))
-                                         'gcc-toolchain)))
+    (propagated-inputs (list ((module-ref (resolve-interface
+                                           '(gnu packages commencement))
+                                          'current-gcc-toolchain))))
     (home-page "https://www.call-cc.org/")
     (synopsis "R5RS Scheme implementation that compiles native code via C")
     (description
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 1cfaaae1e7..70641267a8 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -73,7 +73,8 @@ (define-module (gnu packages commencement)
   #:use-module (guix utils)
   #:use-module (srfi srfi-1)
   #:use-module (ice-9 vlist)
-  #:use-module (ice-9 match))
+  #:use-module (ice-9 match)
+  #:export (current-gcc-toolchain))
 
 ;;; Commentary:
 ;;;
@@ -908,7 +909,7 @@ (define gcc-core-mesboot0
   ;; with gcc-2.95.3, binutils (2.14.0, 2.20.1a) and glibc-2.2.5 we found a
   ;; GNU toolchain triplet "that works".
   (package
-    (inherit gcc)
+    (inherit (current-gcc))
     (name "gcc-core-mesboot0")
     (version "2.95.3")
     (source (origin
@@ -2319,19 +2320,19 @@ (define libstdc++-boot0-gcc7
 
 (define gcc-boot0
   (package
-    (inherit gcc)
+    (inherit (current-gcc))
     (name "gcc-cross-boot0")
-    (outputs (delete "debug" (package-outputs gcc)))
+    (outputs (delete "debug" (package-outputs (current-gcc))))
     (source
      (bootstrap-origin
       (origin
-        (inherit (package-source gcc))
+        (inherit (package-source (current-gcc)))
         (snippet
          #~(begin
              ;; XXX: The GCC test suite contains files with non-ASCII file
              ;; names, which cannot be repacked by BOOTSTRAP-ORIGIN.  Nor
              ;; can it be deleted from Guile, so resort to this evil hack.
-             #$(origin-snippet (package-source gcc))
+             #$(origin-snippet (package-source (current-gcc)))
              (system* #$(file-append (let-system system
                                        ;; 'coreutils-boot0' is Linux-only.
                                        (if (target-hurd? system)
@@ -2348,7 +2349,7 @@ (define gcc-boot0
                   (ice-9 regex)
                   (srfi srfi-1)
                   (srfi srfi-26))
-      (substitute-keyword-arguments (package-arguments gcc)
+      (substitute-keyword-arguments (package-arguments (current-gcc))
         ((#:configure-flags flags)
          #~(append (list #$(string-append "--target=" (boot-triplet))
 
@@ -2436,7 +2437,7 @@ (define gcc-boot0
                    (with-directory-excursion
                        (string-append out "/lib/gcc/"
                                       #$(boot-triplet)
-                                      "/" #$(package-version gcc))
+                                      "/" #$(package-version (current-gcc)))
                      (symlink "libgcc.a" "libgcc_eh.a"))))))))))
 
     (inputs `(("gmp-source" ,(bootstrap-origin (package-source gmp-6.0)))
@@ -2952,7 +2953,7 @@ (define/system-dependent glibc-final-with-bootstrap-bash
 (define (cross-gcc-wrapper gcc binutils glibc bash)
   "Return a wrapper for the pseudo-cross toolchain GCC/BINUTILS/GLIBC
 that makes it available under the native tool names."
-  (package (inherit gcc)
+  (package (inherit (current-gcc))
     (name (string-append (package-name gcc) "-wrapped"))
     (source #f)
     (build-system trivial-build-system)
@@ -3219,7 +3220,7 @@ (define gcc-final
                   (srfi srfi-26)
                   ,@%default-gnu-modules)
 
-      (substitute-keyword-arguments (package-arguments gcc)
+      (substitute-keyword-arguments (package-arguments (current-gcc))
         ((#:make-flags flags)
          ;; Since $LIBRARY_PATH is not honored, add the relevant flags.
          #~(let ((zlib (assoc-ref %build-inputs "zlib")))
@@ -3542,8 +3543,8 @@ (define* (make-gcc-toolchain gcc
   (let ((gcc (if libc (make-gcc-libc gcc libc) gcc))
         (libc (if libc libc glibc-final)))
     (package
-      (name (string-append (package-name gcc) "-toolchain"))
-      (version (package-version gcc))
+      (name (string-append (package-name (current-gcc)) "-toolchain"))
+      (version (package-version (current-gcc)))
       (source #f)
       (build-system trivial-build-system)
       (arguments
@@ -3640,13 +3641,17 @@ (define-public gcc-toolchain-14
   (make-gcc-toolchain gcc-14))
 
 ;; The default GCC
-(define-public gcc-toolchain
+(define (current-gcc-toolchain)
+  "The current default gcc-toolchain version."
   gcc-toolchain-11)
 
+(define-public gcc-toolchain
+  (deprecated-package "gcc-toolchain" gcc-toolchain-11))
+
 (define-public gcc-toolchain-aka-gcc
   ;; It's natural for users to try "guix install gcc".  This package
   ;; automatically "redirects" them to 'gcc-toolchain'.
-  (deprecated-package "gcc" gcc-toolchain))
+  (deprecated-package "gcc" (current-gcc-toolchain)))
 
 
 (define-public gdc-toolchain-10
diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm
index adae2f5bfc..80b9c6e03d 100644
--- a/gnu/packages/containers.scm
+++ b/gnu/packages/containers.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz>
 ;;; Copyright © 2024 Foundation Devices, Inc. <hello@foundation.xyz>
 ;;; Copyright © 2024 Jean-Pierre De Jesus DIAZ <jean@foundation.xyz>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -533,7 +534,7 @@ (define-public podman
                   (,(string-append #$catatonit      "/bin")
                    ,(string-append #$conmon         "/bin")
                    ,(string-append #$crun           "/bin")
-                   ,(string-append #$gcc            "/bin") ; cpp
+                   ,(string-append #$(current-gcc)  "/bin") ; cpp
                    ,(string-append #$iptables       "/sbin")
                    ,(string-append #$passt          "/bin")
                    ,(string-append #$procps         "/bin") ; ps
@@ -667,7 +668,7 @@ (define-public buildah
                   (,(string-append #$output "/_guix")))
                 `("PATH" suffix
                   (,(string-append #$crun           "/bin")
-                   ,(string-append #$gcc            "/bin") ; cpp
+                   ,(string-append #$(current-gcc)  "/bin") ; cpp
                    ,(string-append #$passt          "/bin")
                    "/run/privileged/bin")))))
           (add-after 'install 'install-completions
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index cecc21083e..9c701efae8 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2013-2018, 2020, 2023-2024 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2016, 2019, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2016, 2019, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
@@ -61,7 +61,7 @@ (define-syntax %xgcc
   ;;
   ;; Note: This is a macro so that we do not refer to 'gcc' from the top
   ;; level, which would lead to circular-dependency issues.
-  (identifier-syntax gcc))
+  (identifier-syntax (current-gcc)))
 
 (define %gcc-include-paths
   ;; Environment variables for header search paths.
diff --git a/gnu/packages/dlang.scm b/gnu/packages/dlang.scm
index 8bf0ee685e..654d5b2281 100644
--- a/gnu/packages/dlang.scm
+++ b/gnu/packages/dlang.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2021, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2022 ( <paren@disroot.org>
 ;;; Copyright © 2022 Esther Flashner <esther@flashner.co.il>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -426,7 +427,7 @@ (define dmd-bootstrap
     (build-system gnu-build-system)
     (arguments
      (list
-      #:disallowed-references (list (gexp-input (canonical-package gcc)
+      #:disallowed-references (list (gexp-input (canonical-package (current-gcc))
                                                 "lib"))
       ;; Disable tests, as gdmd cannot cope with some arguments used such as
       ;; '-conf'.
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 3ceeb4425a..5abca92ebf 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -2340,8 +2340,8 @@ (define-public freehdl
            coreutils
 
            ;; Lazily resolve the gcc-toolchain to avoid a circular dependency.
-           (module-ref (resolve-interface '(gnu packages commencement))
-                       'gcc-toolchain)
+           ((module-ref (resolve-interface '(gnu packages commencement))
+                        'current-gcc-toolchain))
 
            guile-2.2
            perl
diff --git a/gnu/packages/gawk.scm b/gnu/packages/gawk.scm
index 6a77a692f5..a8b8369d7b 100644
--- a/gnu/packages/gawk.scm
+++ b/gnu/packages/gawk.scm
@@ -4,6 +4,7 @@
 ;;; Copyright © 2018, 2022-2024 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2021, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2022 Paul A. Patience <paul@apatience.com>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -227,7 +228,7 @@ (define-public cppawk
     (inputs
      (list coreutils                    ; For dirname, mktemp, printf, rm
            gawk-mpfr                    ; Default variant, but supports others
-           gcc                          ; For cpp
+           (current-gcc)                ; For cpp
            sed))
     (home-page "https://www.kylheku.com/cgit/cppawk/")
     (synopsis "Wrapper script that adds C preprocessing to Awk")
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index c9e475b676..3b5d05b9a9 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
 ;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2024 Nguyễn Gia Phong <mcsinyx@disroot.org>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -57,7 +58,8 @@ (define-module (gnu packages gcc)
   #:use-module (guix utils)
   #:use-module (srfi srfi-1)
   #:use-module (ice-9 match)
-  #:use-module (ice-9 regex))
+  #:use-module (ice-9 regex)
+  #:export (current-gcc))
 
 (define %gcc-infrastructure
   ;; Base URL for GCC's infrastructure.
@@ -857,7 +859,12 @@ (define-public gcc-14
 
 ;; Note: When changing the default gcc version, update
 ;;       the gcc-toolchain-* definitions.
-(define-public gcc gcc-11)
+(define (current-gcc)
+  "The current default gcc version."
+  gcc-11)
+
+(define-public gcc
+  (deprecated-package "gcc" gcc-11))
 
 \f
 ;;;
@@ -868,7 +875,7 @@ (define-public gcc-2.95
   ;; Note: 'gcc-core-mesboot0' in commencement.scm provides 2.95 as well, but
   ;; with additional tricks to support compilation with TinyCC and Mes-libc.
   (package
-    (inherit gcc)
+    (inherit (current-gcc))
     (version "2.95.3")
     (source (origin
               (method url-fetch)
@@ -1045,7 +1052,7 @@ (define-public (make-libstdc++ gcc)
 
 (define libstdc++
   ;; Libstdc++ matching the default GCC.
-  (make-libstdc++ gcc))
+  (make-libstdc++ (current-gcc)))
 
 (define libstdc++-headers
   ;; XXX: This package is for internal use to work around
@@ -1100,7 +1107,7 @@ (define (make-libiberty gcc)
     (synopsis "Collection of subroutines used by various GNU programs")))
 
 (define-public libiberty
-  (make-libiberty gcc))
+  (make-libiberty (current-gcc)))
 
 (define* (custom-gcc gcc name languages
                      #:optional
@@ -1157,7 +1164,7 @@ (define-public gfortran-13
 
 (define-public gfortran
   (hidden-package
-   (custom-gcc gcc
+   (custom-gcc (current-gcc)
                "gfortran" '("fortran")
                %generic-search-paths)))
 
@@ -1186,7 +1193,7 @@ (define-public gdc-11
 ;;; Alias tracking the latest GDC version.
 (define-public gdc
   (hidden-package
-   (custom-gcc gcc "gdc" '("d")
+   (custom-gcc (current-gcc) "gdc" '("d")
                %generic-search-paths)))
 
 (define-public (make-libgccjit gcc)
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 894e878cf2..244e85f17c 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -47,6 +47,7 @@
 ;;; Copyright © 2024 Greg Hogan <code@greghogan.com>
 ;;; Copyright © 2024 Brennan Vincent <brennan@umanwizard.com>
 ;;; Copyright © 2024 André Batista <nandre@riseup.net>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -253,7 +254,7 @@ (define-public go-1.4
     (inputs
      `(("tzdata" ,tzdata)
        ("pcre" ,pcre)
-       ("gcc:lib" ,(canonical-package gcc) "lib")))
+       ("gcc:lib" ,(canonical-package (current-gcc)) "lib")))
     (native-inputs
      (list pkg-config which net-base perl))
 
diff --git a/gnu/packages/julia-xyz.scm b/gnu/packages/julia-xyz.scm
index 77385ee6e0..3860da608e 100644
--- a/gnu/packages/julia-xyz.scm
+++ b/gnu/packages/julia-xyz.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2021 jgart <jgart@dismail.de>
 ;;; Copyright © 2023 Sharlatan Hellseher <sharlatanus@gmail.com>
 ;;; Copyright © 2024 Spencer King <spencer.king@geneoscopy.com>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -5170,7 +5171,7 @@ (define-public julia-quadmath
     (propagated-inputs
      (list julia-requires))
     (inputs
-     `(("gcc:lib" ,gcc "lib")))
+     `(("gcc:lib" ,(current-gcc) "lib")))
     (native-inputs
      (list julia-specialfunctions))
     (home-page "https://github.com/JuliaMath/Quadmath.jl")
diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm
index 6c16d8ab71..8dc3208327 100644
--- a/gnu/packages/lisp.scm
+++ b/gnu/packages/lisp.scm
@@ -29,6 +29,7 @@
 ;;; Copyright © 2024 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2024 bigbug <bigbookofbug@proton.me>
 ;;; Copyright © 2024 Ashish SHUKLA <ashish.is@lostca.se>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -388,7 +389,7 @@ (define-public clasp-cl
         (base32 "10jjhcid6qp64gx29iyy5rqqijwy8hrvx66f0xabdj8w3007ky39"))))
     (build-system gnu-build-system)
     (inputs
-     (list boost clang-15 fmt `(,gcc "lib") gmp libelf libunwind llvm-15))
+     (list boost clang-15 fmt `(,(current-gcc) "lib") gmp libelf libunwind llvm-15))
     (native-inputs
      (list binutils-gold ninja pkg-config sbcl))
     (arguments
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index c6566a3339..1d4a7f5277 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -27,6 +27,7 @@
 ;;; Copyright © 2022 Zhu Zihao <all_but_last@163.com>
 ;;; Copyright © 2023 Hilton Chain <hako@ultrarare.space>
 ;;; Copyright © 2023, 2024 Zheng Junjie <873216071@qq.com>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -89,8 +90,8 @@ (define-module (gnu packages llvm)
 
 ;; Lazily resolve the gcc-toolchain to avoid a circular dependency.
 (define gcc-toolchain*
-  (delay (module-ref (resolve-interface '(gnu packages commencement))
-                     'gcc-toolchain)))
+  (delay ((module-ref (resolve-interface '(gnu packages commencement))
+                      'current-gcc-toolchain))))
 
 (define* (system->llvm-target #:optional
                               (system (or (and=> (%current-target-system)
@@ -250,7 +251,7 @@ (define* (clang-from-llvm llvm clang-runtime
     (native-inputs (package-native-inputs llvm))
     (inputs
      `(("libxml2" ,libxml2)
-       ("gcc-lib" ,gcc "lib")
+       ("gcc-lib" ,(current-gcc) "lib")
        ,@(package-inputs llvm)
        ,@(if tools-extra
              `(("clang-tools-extra" ,tools-extra))
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index edc536bff4..c6293b9a38 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2017, 2021 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018, 2019 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2018, 2019, 2021, 2022, 2023 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2018, 2019, 2021, 2022, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2019, 2020, 2022 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2021 Pierre Langlois <pierre.langlois@gmx.com>
@@ -108,13 +108,13 @@ (define gcc-for-bootstrap
   (mlambdaq (glibc)
     "Return a variant of GCC that uses the bootstrap variant of GLIBC."
     (package
-      (inherit gcc)
+      (inherit (current-gcc))
       (outputs '("out")) ;all in one so libgcc_s is easily found
       (inputs
        `( ;; Distinguish the name so we can refer to it below.
          ("bootstrap-libc" ,(glibc-for-bootstrap glibc))
          ("libc:static" ,(glibc-for-bootstrap glibc) "static")
-         ,@(package-inputs gcc))))))
+         ,@(package-inputs (current-gcc)))))))
 
 (define (package-with-relocatable-glibc p)
   "Return a variant of P that uses the libc as defined by
@@ -153,7 +153,7 @@ (define (package-with-relocatable-glibc p)
                              (cons (search-path-specification
                                     (variable "CROSS_CPLUS_INCLUDE_PATH")
                                     (files '("include")))
-                                   (package-search-paths gcc)))))
+                                   (package-search-paths (current-gcc))))))
             ("cross-binutils" ,(cross-binutils target))
             ,@(%final-inputs)))
         `(("libc" ,(glibc-for-bootstrap glibc))
@@ -481,11 +481,11 @@ (define (%glibc-stripped)
 (define %gcc-static
   ;; A statically-linked GCC, with stripped-down functionality.
   (package-with-relocatable-glibc
-   (package (inherit gcc)
+   (package (inherit (current-gcc))
      (name "gcc-static")
      (outputs '("out"))                           ; all in one
      (arguments
-      (substitute-keyword-arguments (package-arguments gcc)
+      (substitute-keyword-arguments (package-arguments (current-gcc))
         ((#:modules modules %default-gnu-modules)
          `((srfi srfi-1)
            (srfi srfi-26)
@@ -536,7 +536,7 @@ (define %gcc-static
      (inputs
       `(("zlib:static" ,zlib "static")
         ("isl:static" ,isl "static")
-        ,@(package-inputs gcc)))
+        ,@(package-inputs (current-gcc))))
      (native-inputs
       (if (%current-target-system)
           `(;; When doing a Canadian cross, we need GMP/MPFR/MPC both
@@ -549,13 +549,13 @@ (define %gcc-static
             ("gmp-native" ,gmp)
             ("mpfr-native" ,mpfr)
             ("mpc-native" ,mpc)
-            ,@(package-native-inputs gcc))
-          (package-native-inputs gcc))))))
+            ,@(package-native-inputs (current-gcc)))
+          (package-native-inputs (current-gcc)))))))
 
 (define %gcc-stripped
   ;; The subset of GCC files needed for bootstrap.
   (package
-    (inherit gcc)
+    (inherit (current-gcc))
     (name "gcc-stripped")
     (build-system trivial-build-system)
     (source #f)
diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm
index bc1fd797d6..e956167137 100644
--- a/gnu/packages/mpi.scm
+++ b/gnu/packages/mpi.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2018 Paul Garlick <pgarlick@tourbillion-technology.com>
 ;;; Copyright © 2019, 2021 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2024 Romain Garbage <romain.garbage@inria.fr>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -378,7 +379,7 @@ (define-public openmpi-5
                                   "ompi/tools/ompi_info/param.c")
                      (("_ABSOLUTE") "")))))
 
-           #:disallowed-references (list (canonical-package gcc))))))
+           #:disallowed-references (list (canonical-package (current-gcc)))))))
 
 (define-public openmpi-c++
   (package/inherit openmpi
diff --git a/gnu/packages/parallel.scm b/gnu/packages/parallel.scm
index 7459a6a02c..e13bf04277 100644
--- a/gnu/packages/parallel.scm
+++ b/gnu/packages/parallel.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
 ;;; Copyright © 2024 David Elsing <david.elsing@posteo.net>
 ;;; Copyright © 2024 Romain Garbage <romain.garbage@inria.fr>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -666,7 +667,7 @@ (define-public openpmix
 
           ;; Don't keep a reference to GCC.
           #:disallowed-references (and (not (%current-target-system))
-                                       (list (canonical-package gcc)))
+                                       (list (canonical-package (current-gcc))))
 
           #:phases
           #~(modify-phases %standard-phases
@@ -738,7 +739,7 @@ (define-public prrte
                      (string-append "prte_launch_agent = \""
                                     #$output "/bin/prted\";\n"))))))
 
-          #:disallowed-references (list (canonical-package gcc))))
+          #:disallowed-references (list (canonical-package (current-gcc)))))
    (inputs (list libevent
                  `(,hwloc "lib")
                  openpmix))
diff --git a/gnu/packages/rocm.scm b/gnu/packages/rocm.scm
index e883371928..2f315e3985 100644
--- a/gnu/packages/rocm.scm
+++ b/gnu/packages/rocm.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2021 Lars-Dominik Braun <lars@6xq.net>
 ;;; Copyright © 2022, 2023 John Kehayias <john.kehayias@protonmail.com>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This program is free software; you can redistribute it and/or modify it
 ;;; under the terms of the GNU General Public License as published by
@@ -131,7 +132,7 @@ (define-public roct-thunk-interface
     (build-system cmake-build-system)
     (arguments `(#:tests? #f)) ; Not sure how to run tests.
     (inputs (list libdrm numactl))
-    (native-inputs (list `(,gcc "lib") pkg-config))
+    (native-inputs (list `(,(current-gcc) "lib") pkg-config))
     (home-page "https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface")
     (synopsis "Radeon Open Compute Thunk Interface")
     (description "User-mode API interfaces used to interact with the ROCk
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 05/40] gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (3 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 04/40] gnu: gcc: Add indirections current-gcc, current-gcc-toolchain Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 06/40] gnu: cross-libc: Support cross-building for the " Janneke Nieuwenhuizen
                     ` (34 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290
  Cc: Andreas Enge, Christopher Baines, Efraim Flashner, Ekaitz Zarraga,
	Josselin Poiret, Ludovic Courtès, Mathieu Othacehe,
	Simon Tournier, Tobias Geerinckx-Rice

* gnu/packages/bootstrap.scm (glibc-dynamic-linker): Update comment on where
to find shared linker name.
(make-raw-bag): Also use raw-build-guile3 when building for the 64bit Hurd.
* guix/platforms/x86.scm (x86_64-gnu): New exported variable.
* guix/utils.scm (target-hurd64? system-hurd64?): New procedures.
* gnu/packages/gcc.scm: (current-gcc): Use target-hurd64? in new procedure to
select gcc-14 on 64bit Hurd.
(libstdc++): Change to procedure.
(libstdc++-headers): Update accordingly.
* gnu/packages/commencement.scm (current-gcc-toolchain): Likewise, to select
gcc-toolchain-14 on 64bit Hurd.
* gnu/packages/cross-base.scm (%xgcc): Use current-gcc.
(cross-kernel-headers*): Use target-hurd? instead of custom "i586..."
matching to also use xhurd-core-headers for target-hurd64.
* gnu/packages/make-bootstrap.scm (package-with-relocatable-glibc):
Capture (current-gcc) before resetting %current-target-system.
[native-inputs]:  Move final-inputs before cross-packages.
(%glibc-stripped): Likewise.
(%gcc-static): Change to procedure.
(%gcc-stripped): Likewise, update accordingly.
(%gcc-bootstrap-tarball): Likewise, update accordingly.
(make-guile-static)[arguments]: When building for the 64bit Hurd, add
"lt_cv_prog_compiler_static_works=yes" to #:configure-flags to convince
libtool to actually link guile statically.
(%binutils-static)[arguments]: When building for the 64bit Hurd, add
"lt_cv_prog_compiler_static_works=yes", "lt_cv_prog_compiler_static_works_CXX=yes"
to #:make-flags to convince to actually link the binaries statically.
* gnu/ci.scm (%core-packages): Update accordingly.
* gnu/packages/patches/gcc-14-cross-without-bootstrap.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/cross-base.scm (cross-gcc)[origin]: Use it when
cross-building gcc >= 14.

Change-Id: I4ae189e7e5188ced91744b89fe9d753b6a1fca78
---
 gnu/ci.scm                      |  4 +--
 gnu/packages/bootstrap.scm      |  3 +-
 gnu/packages/commencement.scm   |  6 ++--
 gnu/packages/cross-base.scm     |  6 ++--
 gnu/packages/gcc.scm            | 32 ++++++++++---------
 gnu/packages/make-bootstrap.scm | 56 ++++++++++++++++++++++-----------
 guix/platforms/x86.scm          | 11 ++++++-
 guix/utils.scm                  | 15 ++++++++-
 8 files changed, 90 insertions(+), 43 deletions(-)

diff --git a/gnu/ci.scm b/gnu/ci.scm
index 4e282d197f..e7e839d968 100644
--- a/gnu/ci.scm
+++ b/gnu/ci.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012-2024 Ludovic Courtès <ludo@gnu.org>
-;;; Copyright © 2017, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2017, 2020, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2020 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2020, 2021 Mathieu Othacehe <othacehe@gnu.org>
@@ -146,7 +146,7 @@ (define %core-packages
         %bootstrap-binaries-tarball
         %binutils-bootstrap-tarball
         (%glibc-bootstrap-tarball)
-        %gcc-bootstrap-tarball
+        (%gcc-bootstrap-tarball)
         %guile-bootstrap-tarball
         %bootstrap-tarballs))
 
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index c4640b62e1..234d001fc1 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -558,7 +558,8 @@ (define* (make-raw-bag name
     (name name)
     (system system)
     (build-inputs inputs)
-    (build (cond ((target-riscv64?)
+    (build (cond ((or (target-riscv64?)
+                      (target-hurd64?))
                   raw-build-guile3)
                  (else raw-build)))))
 
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 70641267a8..a000cbfdc5 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3643,10 +3643,12 @@ (define-public gcc-toolchain-14
 ;; The default GCC
 (define (current-gcc-toolchain)
   "The current default gcc-toolchain version."
-  gcc-toolchain-11)
+  (if (target-hurd64?)
+      gcc-toolchain-14
+      gcc-toolchain-11))
 
 (define-public gcc-toolchain
-  (deprecated-package "gcc-toolchain" gcc-toolchain-11))
+  (deprecated-package "gcc-toolchain" (current-gcc-toolchain)))
 
 (define-public gcc-toolchain-aka-gcc
   ;; It's natural for users to try "guix install gcc".  This package
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 9c701efae8..7b32a6b64e 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -641,9 +641,9 @@ (define* (cross-kernel-headers* target
                 ("hurd-headers" ,xhurd-headers)
                 ("hurd-minimal" ,xhurd-minimal)))))
 
-  (match target
-    ((or "i586-pc-gnu" "i586-gnu") xhurd-core-headers)
-    (_ xlinux-headers)))
+  (if (target-hurd? target)
+      xhurd-core-headers
+      xlinux-headers))
 
 (define* (cross-libc . args)
   (if (or (= (length args) 1) (contains-keyword? args))
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 3b5d05b9a9..fc3746fb05 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -861,10 +861,12 @@ (define-public gcc-14
 ;;       the gcc-toolchain-* definitions.
 (define (current-gcc)
   "The current default gcc version."
-  gcc-11)
+  (if (target-hurd64?)
+      gcc-14
+      gcc-11))
 
 (define-public gcc
-  (deprecated-package "gcc" gcc-11))
+  (deprecated-package "gcc" (current-gcc)))
 
 \f
 ;;;
@@ -903,15 +905,15 @@ (define-public gcc-2.95
     (outputs '("out"))
     (arguments
      (let ((matching-system
-             (match (%current-system)
-               ;; This package predates our 64-bit architectures.
-               ;; Force a 32-bit build targeting a similar architecture.
-               ("aarch64-linux"
-                "armhf-linux")
-               ("x86_64-linux"
-                "i686-linux")
-               (_
-                (%current-system)))))
+            (match (%current-system)
+              ;; This package predates our 64-bit architectures.
+              ;; Force a 32-bit build targeting a similar architecture.
+              ("aarch64-linux"
+               "armhf-linux")
+              ("x86_64-linux"
+               "i686-linux")
+              (_
+               (%current-system)))))
        (list #:system matching-system
              #:configure-flags #~'("--disable-werror")
 
@@ -1050,8 +1052,8 @@ (define-public (make-libstdc++ gcc)
     (propagated-inputs '())
     (synopsis "GNU C++ standard library")))
 
-(define libstdc++
-  ;; Libstdc++ matching the default GCC.
+(define (current-libstdc++)
+  ;; Libstdc++ matching the CURRENT-GCC.
   (make-libstdc++ (current-gcc)))
 
 (define libstdc++-headers
@@ -1061,7 +1063,7 @@ (define libstdc++-headers
   ;; is right under include/c++ and not under
   ;; include/c++/x86_64-unknown-linux-gnu (aka. GPLUSPLUS_TOOL_INCLUDE_DIR).
   (package
-    (inherit libstdc++)
+    (inherit (current-libstdc++))
     (name "libstdc++-headers")
     (outputs '("out"))
     (build-system trivial-build-system)
@@ -1072,7 +1074,7 @@ (define libstdc++-headers
                    (mkdir (string-append out "/include"))
                    (symlink (string-append libstdc++ "/include")
                             (string-append out "/include/c++")))))
-    (inputs `(("libstdc++" ,libstdc++)))
+    (inputs `(("libstdc++" ,(current-libstdc++))))
     (synopsis "Headers of GNU libstdc++")))
 
 (define-public libstdc++-4.9
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index c6293b9a38..f4165178fe 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -124,8 +124,11 @@ (define (package-with-relocatable-glibc p)
     (glibc-for-bootstrap
      ;; `cross-libc' already returns a cross libc, so clear
      ;; %CURRENT-TARGET-SYSTEM.
-     (parameterize ((%current-target-system #f))
-       (cross-libc target))))
+     (let ((xgcc (cross-gcc target #:xgcc (current-gcc))))
+       (parameterize ((%current-target-system #f))
+         (cross-libc target #:xgcc xgcc
+                     #:xheaders (cross-kernel-headers
+                                 target #:xgcc xgcc))))))
 
   ;; Standard inputs with the above libc and corresponding GCC.
 
@@ -145,7 +148,10 @@ (define (package-with-relocatable-glibc p)
                       target
                       #:xbinutils (cross-binutils target)
                       #:libc (cross-bootstrap-libc target))))
-          `(("cross-gcc" ,(package
+          `(,@(%final-inputs)
+            ;; As versions for gcc and cross-gcc can differ, make sure to have
+            ;; cross-gcc behind gcc in CPLUS_INCLUDE_PATH.
+            ("cross-gcc" ,(package
                             (inherit xgcc)
                             (search-paths
                              ;; Ensure the cross libc headers appears on the
@@ -154,8 +160,7 @@ (define (package-with-relocatable-glibc p)
                                     (variable "CROSS_CPLUS_INCLUDE_PATH")
                                     (files '("include")))
                                    (package-search-paths (current-gcc))))))
-            ("cross-binutils" ,(cross-binutils target))
-            ,@(%final-inputs)))
+            ("cross-binutils" ,(cross-binutils target))))
         `(("libc" ,(glibc-for-bootstrap glibc))
           ("libc:static" ,(glibc-for-bootstrap glibc) "static")
           ("gcc" ,(gcc-for-bootstrap glibc))
@@ -395,10 +400,15 @@ (define %binutils-static
                        ((#:configure-flags flags _ ...)
                         flags)))
            #:make-flags
-           (match (memq #:make-flags (package-arguments binutils))
-             ((#:make-flags flags _ ...)
-              flags)
-             (_ #~'()))
+           #~(append
+              #$(if (target-hurd64?)
+                    #~'("lt_cv_prog_compiler_static_works=yes"
+                        "lt_cv_prog_compiler_static_works_CXX=yes")
+                    #~'())
+              #$(match (memq #:make-flags (package-arguments binutils))
+                  ((#:make-flags flags _ ...)
+                   flags)
+                  (_ #~'())))
            #:strip-flags #~'("--strip-all")
            #:phases
            #~(modify-phases %standard-phases
@@ -446,7 +456,8 @@ (define (%glibc-stripped)
   ;; GNU libc's essential shared libraries, dynamic linker, and headers,
   ;; with all references to store directories stripped.  As a result,
   ;; libc.so is unusable and need to be patched for proper relocation.
-  (let ((glibc (glibc-for-bootstrap glibc)))
+  (let ((glibc (glibc-for-bootstrap glibc))
+        (gcc (current-gcc)))
     (package (inherit glibc)
       (name "glibc-stripped")
       (build-system trivial-build-system)
@@ -463,8 +474,13 @@ (define (%glibc-stripped)
        `(("libc" ,(let ((target (%current-target-system)))
                     (if target
                         (glibc-for-bootstrap
-                         (parameterize ((%current-target-system #f))
-                           (cross-libc target)))
+                         (let* ((xgcc (cross-gcc target #:xgcc gcc))
+                                (xheaders (cross-kernel-headers target
+                                                                #:xgcc xgcc)))
+                           (parameterize ((%current-target-system #f))
+                             (cross-libc target
+                                         #:xgcc xgcc
+                                         #:xheaders xheaders))))
                         glibc)))))
       (inputs
        `(("kernel-headers"
@@ -478,11 +494,12 @@ (define (%glibc-stripped)
       ;; Only one output.
       (outputs '("out")))))
 
-(define %gcc-static
+(define (%gcc-static)
   ;; A statically-linked GCC, with stripped-down functionality.
   (package-with-relocatable-glibc
    (package (inherit (current-gcc))
      (name "gcc-static")
+     (source (package-source (current-gcc)))
      (outputs '("out"))                           ; all in one
      (arguments
       (substitute-keyword-arguments (package-arguments (current-gcc))
@@ -552,7 +569,7 @@ (define %gcc-static
             ,@(package-native-inputs (current-gcc)))
           (package-native-inputs (current-gcc)))))))
 
-(define %gcc-stripped
+(define (%gcc-stripped)
   ;; The subset of GCC files needed for bootstrap.
   (package
     (inherit (current-gcc))
@@ -575,7 +592,7 @@ (define %gcc-stripped
                       (libdir     (string-append out "/lib"))
                       (includedir (string-append out "/include"))
                       (libexecdir (string-append out "/libexec"))
-                      (gcc        #$%gcc-static))
+                      (gcc        #$(%gcc-static)))
                  (copy-recursively (string-append gcc "/bin") bindir)
                  (for-each remove-store-references
                            (find-files bindir ".*"))
@@ -642,6 +659,9 @@ (define* (make-guile-static guile patches)
 
                   #$@(if (target-hurd?)
                          #~("--disable-jit")
+                         #~())
+                  #$@(if (target-hurd64?)
+                         #~("lt_cv_prog_compiler_static_works=yes")
                          #~())))
          ((#:phases phases '%standard-phases)
           #~(modify-phases #$phases
@@ -813,9 +833,9 @@ (define (%glibc-bootstrap-tarball)
   ;; A tarball with GNU libc's shared libraries, dynamic linker, and headers.
   (tarball-package (%glibc-stripped)))
 
-(define %gcc-bootstrap-tarball
+(define (%gcc-bootstrap-tarball)
   ;; A tarball with a dynamic-linked GCC and its headers.
-  (tarball-package %gcc-stripped))
+  (tarball-package (%gcc-stripped)))
 
 (define %guile-bootstrap-tarball
   ;; A tarball with the statically-linked, relocatable Guile.
@@ -856,7 +876,7 @@ (define %bootstrap-tarballs
            ((or "i686-linux" "x86_64-linux")
             (list %linux-libre-headers-bootstrap-tarball))
            (_
-            (list %gcc-bootstrap-tarball
+            (list (%gcc-bootstrap-tarball)
                   %binutils-bootstrap-tarball
                   (%glibc-bootstrap-tarball)
                   %bootstrap-binaries-tarball)))))
diff --git a/guix/platforms/x86.scm b/guix/platforms/x86.scm
index 0c8fc7296c..5617e6dd68 100644
--- a/guix/platforms/x86.scm
+++ b/guix/platforms/x86.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2022 Mathieu Othacehe <othacehe@gnu.org>
 ;;; Copyright © 2023, 2024 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -25,7 +26,8 @@ (define-module (guix platforms x86)
             x86_64-linux-x32
             i686-mingw
             x86_64-mingw
-            i586-gnu))
+            i586-gnu
+            x86_64-gnu))
 
 (define i686-linux
   (platform
@@ -71,3 +73,10 @@ (define i586-gnu
    (system "i586-gnu")
    (rust-target "i686-unknown-hurd-gnu")
    (glibc-dynamic-linker "/lib/ld.so.1")))
+
+(define x86_64-gnu
+  (platform
+   (target "x86_64-pc-gnu")
+   (system "x86_64-gnu")
+   (rust-target "x86_64-unknown-hurd-gnu")
+   (glibc-dynamic-linker "/lib/ld-x86-64.so.1")))
diff --git a/guix/utils.scm b/guix/utils.scm
index f161cb4ef3..e100c03365 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -17,7 +17,7 @@
 ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
 ;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
 ;;; Copyright © 2023 Philip McGrath <philip@philipmcgrath.com>
-;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
 ;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
 ;;; Copyright © 2024 Herman Rimm <herman@rimm.ee>
@@ -94,6 +94,8 @@ (define-module (guix utils)
             target-linux?
             target-hurd?
             system-hurd?
+            target-hurd64?
+            system-hurd64?
             target-mingw?
             target-x86-32?
             target-x86-64?
@@ -716,6 +718,17 @@ (define* (system-hurd?)
   "Is the current system the GNU(/Hurd) system?"
   (and=> (%current-system) target-hurd?))
 
+(define* (target-hurd64? #:optional (target (or (%current-target-system)
+                                                (%current-system))))
+  "Does TARGET represent the 64bit GNU(/Hurd) system?"
+  (and (target-hurd?)
+       (target-64bit? target)))
+
+(define* (system-hurd64?)
+  "Is the current system the 64bit GNU(/Hurd) system?"
+  (and (system-hurd?)
+       (target-64bit? (%current-system))))
+
 (define* (target-mingw? #:optional (target (%current-target-system)))
   "Is the operating system of TARGET Windows?"
   (and target
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 06/40] gnu: cross-libc: Support cross-building for the 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (4 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 05/40] gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 07/40] gnu: bash-minimal: Fix build for " Janneke Nieuwenhuizen
                     ` (33 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290; +Cc: Andreas Enge, Ludovic Courtès

* gnu/packages/base.scm (glibc)[arguments]: When building for the Hurd, in
phase "create-machine-symlink", do not assume CPU is i386, also cater for
x86_64.
* gnu/packages/cross-base.scm (cross-libc*)[arguments]: Likewise.

Change-Id: Ib009b7bd301b543b8629382330cca9d963b7a812
---
 gnu/packages/base.scm       | 18 ++++++++++++------
 gnu/packages/cross-base.scm | 17 +++++++++++------
 2 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 4e8121ae2c..02ef71f20d 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1079,7 +1079,7 @@ (define-public glibc
                                (string-append locale "/C.UTF-8")))))
 
                  ,@(if (target-hurd?)
-                       '((add-after 'install 'augment-libc.so
+                       `((add-after 'install 'augment-libc.so
                            (lambda* (#:key outputs #:allow-other-keys)
                              (let ((out (assoc-ref outputs "out")))
                                (substitute* (string-append out "/lib/libc.so")
@@ -1088,11 +1088,17 @@ (define-public glibc
                                                  " libmachuser.so libhurduser.so"))))))
                          (add-after 'install 'create-machine-symlink
                            (lambda* (#:key outputs #:allow-other-keys)
-                             (let ((out (assoc-ref outputs "out"))
-                                   (cpu "i386"))
-                               (symlink cpu
-                                        (string-append out
-                                                       "/include/mach/machine"))))))
+                             (let* ((out (assoc-ref outputs "out"))
+                                    (cpu ,(match (or (%current-target-system)
+                                                     (%current-system))
+                                            ((? target-x86-32?)
+                                             "i386")
+                                            ((? target-x86-64?)
+                                             "x86_64")))
+                                    (machine (string-append
+                                              out "/include/mach/machine")))
+                               (unless (file-exists? machine)
+                                 (symlink cpu machine))))))
                        '()))))
 
    (inputs `(("static-bash" ,static-bash)))
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 7b32a6b64e..3827e87aec 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -738,7 +738,7 @@ (define* (cross-libc* target
                (delete 'install-utf8-c-locale)
 
                ,@(if (target-hurd? target)
-                     '((add-after 'install 'augment-libc.so
+                     `((add-after 'install 'augment-libc.so
                          (lambda* (#:key outputs #:allow-other-keys)
                            (let ((out (assoc-ref outputs "out")))
                              (substitute* (string-append out "/lib/libc.so")
@@ -747,11 +747,16 @@ (define* (cross-libc* target
                                                " libmachuser.so libhurduser.so"))))))
                        (add-after 'install 'create-machine-symlink
                          (lambda* (#:key outputs #:allow-other-keys)
-                           (let ((out (assoc-ref outputs "out"))
-                                 (cpu "i386"))
-                             (symlink cpu
-                                      (string-append out
-                                                     "/include/mach/machine"))))))
+                           (let* ((out (assoc-ref outputs "out"))
+                                  (cpu ,(match target
+                                          ((? target-x86-32?)
+                                           "i386")
+                                          ((? target-x86-64?)
+                                           "x86_64")))
+                                  (machine (string-append
+                                            out "/include/mach/machine")))
+                             (unless (file-exists? machine)
+                               (symlink cpu machine))))))
                      '())))))
 
       ;; Shadow the native "kernel-headers" because glibc's recipe expects the
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 07/40] gnu: bash-minimal: Fix build for 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (5 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 06/40] gnu: cross-libc: Support cross-building for the " Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 08/40] gnu: elfutils: " Janneke Nieuwenhuizen
                     ` (32 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/packages/bash-minimal.scm (bash)[arguments]: When building with gcc >=
14 use "CFLAGS=-Wno-implicit-function-declaration".

Change-Id: I3fd2da7a1d9011b155084dceadbad649dbb2a1b9
---
 gnu/packages/bash.scm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index 93641a78d5..1a3b014ad7 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2020 Zhu Zihao <all_but_last@163.com>
 ;;; Copyright © 2021 Marius Bakke <marius@gnu.org>
 ;;; Copyright © 2024 Oleg Pykhalov <go.wigust@gmail.com>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -30,6 +31,7 @@ (define-module (gnu packages bash)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bootstrap)
   #:use-module (gnu packages compression)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages readline)
@@ -251,6 +253,13 @@ (define-public bash-minimal
                ;; modules and related code.
                "ac_cv_func_dlopen=no"
 
+               ,@(if (version>=? (package-version (current-gcc)) "14")
+                     ;; gcc-14 implictly uses -Wimplicit-function-declaration
+                     ;; which together with -Werror causes:
+                     ;; ./enable.def:492:11: error: implicit declaration of function ‘dlclose’;
+                     '("CFLAGS=-Wno-implicit-function-declaration")
+                     '())
+
                ,@(if (%current-target-system)
                      '("bash_cv_job_control_missing=no"
                        "bash_cv_getcwd_malloc=yes")
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 08/40] gnu: elfutils: Fix build for 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (6 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 07/40] gnu: bash-minimal: Fix build for " Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 09/40] gnu: grep: Fix build for the " Janneke Nieuwenhuizen
                     ` (31 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/packages/elf.scm (elfutils)[arguments]: When building for a 64bit Hurd,
set #:make-flags.

Change-Id: I00abf360a7de5b1f78c1e912f0dcf27c62c1af68
---
 gnu/packages/elf.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm
index 119f8d13dd..81a753a483 100644
--- a/gnu/packages/elf.scm
+++ b/gnu/packages/elf.scm
@@ -10,7 +10,7 @@
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
 ;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
-;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -86,6 +86,10 @@ (define-public elfutils
                                "--disable-libdebuginfod"
                                "--disable-debuginfod")
 
+       ,@(if (target-hurd64?)
+             '(#:make-flags '("core-file_no_Werror=yes"))
+             '())
+
        ;; Disable tests on MIPS and PowerPC (without changing
        ;; the arguments list on other systems).
        ,@(if (any (cute string-prefix? <> (or (%current-target-system)
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 09/40] gnu: grep: Fix build for the 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (7 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 08/40] gnu: elfutils: " Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 10/40] gnu: patch: " Janneke Nieuwenhuizen
                     ` (30 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290; +Cc: Andreas Enge, Ludovic Courtès

* gnu/packages/base.scm (grep)[arguments]: When building for the 64bit Hurd,
add patch-sigsegv.h stage.

Change-Id: I795a591ef8282ee5b760fec43bd4ad849007f602
---
 gnu/packages/base.scm | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 02ef71f20d..010be631d7 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -154,6 +154,13 @@ (define-public grep
                                        (string-append bin "/fgrep"))
                       (("^exec grep")
                        (string-append "exec " bin "/grep"))))))
+              #$@(if (target-hurd64?)
+                     #~((add-after 'unpack 'patch-sigsegv
+                          (lambda _
+                            ;; Stack overflow recovery does not compile
+                            (substitute* "lib/sigsegv.in.h"
+                              (("__GNU__") "__XGNU__")))))
+                     #~())
               #$@(if (system-hurd?)
                      #~((add-before 'check 'skip-test
                           (lambda _
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 10/40] gnu: patch: Fix build for the 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (8 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 09/40] gnu: grep: Fix build for the " Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 11/40] gnu: libxcrypt: Support " Janneke Nieuwenhuizen
                     ` (29 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290; +Cc: Andreas Enge, Ludovic Courtès

* gnu/packages/base.scm (patch)[arguments]: When building for the 64bit Hurd,
set #:configure-flags.

Change-Id: I795a591ef8282ee5b760fec43bd4ad849007f602
---
 gnu/packages/base.scm | 49 ++++++++++++++++++++++++-------------------
 1 file changed, 28 insertions(+), 21 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 010be631d7..83f8c0d9e9 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -339,27 +339,34 @@ (define-public patch
                   "1bk38169c0xh01b0q0zmnrjqz8k9byz3arp4q7q66sn6xwf94nvz"))
                 (patches (search-patches "patch-hurd-path-max.patch"))))
       (arguments
-       (substitute-keyword-arguments (package-arguments base)
-         ((#:phases phases '%standard-phases)
-          #~(modify-phases #$phases
-              (add-after 'unpack 'copy-gnulib-sources
-                (lambda _
-                  ;; XXX: We copy the source instead of using 'gnulib' as a
-                  ;; native input to avoid introducing a dependency cycle.
-                  (copy-recursively #+gnulib "gnulib")
-                  (setenv "GNULIB_SRCDIR"
-                          (string-append (getcwd) "/gnulib/src/gnulib"))))
-              (add-after 'copy-gnulib-sources 'update-bootstrap-script
-                (lambda _
-                  (copy-file "gnulib/src/gnulib/build-aux/bootstrap"
-                             "bootstrap")))
-              (add-after 'unpack 'patch-configure.ac
-                (lambda _
-                  (substitute* "configure.ac"
-                    ;; The gnulib-provided git-version-gen script has a plain
-                    ;; shebang of #!/bin/sh; avoid using it.
-                    (("build-aux/git-version-gen" all)
-                     (string-append "sh " all)))))))))
+       (let ((arguments
+         (substitute-keyword-arguments (package-arguments base)
+           ((#:phases phases '%standard-phases)
+            #~(modify-phases #$phases
+                (add-after 'unpack 'copy-gnulib-sources
+                  (lambda _
+                    ;; XXX: We copy the source instead of using 'gnulib' as a
+                    ;; native input to avoid introducing a dependency cycle.
+                    (copy-recursively #+gnulib "gnulib")
+                    (setenv "GNULIB_SRCDIR"
+                            (string-append (getcwd) "/gnulib/src/gnulib"))))
+                (add-after 'copy-gnulib-sources 'update-bootstrap-script
+                  (lambda _
+                    (copy-file "gnulib/src/gnulib/build-aux/bootstrap"
+                               "bootstrap")))
+                (add-after 'unpack 'patch-configure.ac
+                  (lambda _
+                    (substitute* "configure.ac"
+                      ;; The gnulib-provided git-version-gen script has a plain
+                      ;; shebang of #!/bin/sh; avoid using it.
+                      (("build-aux/git-version-gen" all)
+                       (string-append "sh " all))))))))))
+         (if (target-hurd64?)
+             (substitute-keyword-arguments arguments
+               ((#:configure-flags flags '())
+                #~(list "--disable-threads"
+                        "gl_cv_func_working_mktime=yes")))
+             arguments)))
       (native-inputs (list autoconf automake bison ed))
       (properties '()))))
 
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 11/40] gnu: libxcrypt: Support the 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (9 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 10/40] gnu: patch: " Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 12/40] gnu: libstdc++: " Janneke Nieuwenhuizen
                     ` (28 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/packages/patches/libxcrypt-hurd64.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/crypto.scm (libxcrypt)[arguments]: When building for the 64bit
Hurd, use it in new phase `apply-patch'.

Change-Id: I795a591ef8282ee5b760fec43bd4ad849007f602
---
 gnu/local.mk                                |  1 +
 gnu/packages/crypto.scm                     | 15 ++++++++
 gnu/packages/patches/libxcrypt-hurd64.patch | 38 +++++++++++++++++++++
 3 files changed, 54 insertions(+)
 create mode 100644 gnu/packages/patches/libxcrypt-hurd64.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 2bd857e7ac..c952e090ec 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1727,6 +1727,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/libvpx-CVE-2016-2818.patch		\
   %D%/packages/patches/libvpx-CVE-2023-5217.patch		\
   %D%/packages/patches/libvpx-CVE-2023-44488.patch		\
+  %D%/packages/patches/libxcrypt-hurd64.patch			\
   %D%/packages/patches/libxml2-xpath0-Add-option-xpath0.patch	\
   %D%/packages/patches/libwpd-gcc-compat.patch			\
   %D%/packages/patches/libxslt-generated-ids.patch		\
diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 2a298c4caf..94a98bb0ad 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -27,6 +27,7 @@
 ;;; Copyright © 2022 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
 ;;; Copyright © 2023 Ivan Vilata-i-Balaguer <ivan@selidor.net>
 ;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1661,6 +1662,20 @@ (define-public libxcrypt
     (build-system gnu-build-system)
     (native-inputs
      (list perl))
+    (arguments
+     (if (target-hurd64?)
+         (list
+          #:phases
+          #~(modify-phases %standard-phases
+              (add-after 'unpack 'apply-patch
+                (lambda _
+                  (let ((patch-file
+                         #$(local-file
+                            (search-patch
+                             "libxcrypt-hurd64.patch"))))
+                    (invoke "patch" "--force" "-p1" "-i"
+                            patch-file))))))
+              '()))
     (synopsis
      "Extended crypt library for descrypt, md5crypt, bcrypt, and others")
     (description
diff --git a/gnu/packages/patches/libxcrypt-hurd64.patch b/gnu/packages/patches/libxcrypt-hurd64.patch
new file mode 100644
index 0000000000..9fc3018539
--- /dev/null
+++ b/gnu/packages/patches/libxcrypt-hurd64.patch
@@ -0,0 +1,38 @@
+Upstream-status: Taken from upstream:
+    <https://github.com/besser82/libxcrypt/commit/b2c1da2e1ce2d3e72f511f5bc94a6ffa68b70917>
+
+From b2c1da2e1ce2d3e72f511f5bc94a6ffa68b70917 Mon Sep 17 00:00:00 2001
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Sun, 14 Jul 2024 13:13:07 +0200
+Subject: [PATCH] Add binary compatibility for x86_64 GNU/Hurd
+Content-Transfer-Encoding: 8bit
+Content-Type: text/plain; charset=UTF-8
+
+
+diff --git a/lib/libcrypt.map.in b/lib/libcrypt.map.in
+index 88ea911..a56b7bf 100644
+--- a/lib/libcrypt.map.in
++++ b/lib/libcrypt.map.in
+@@ -43,5 +43,5 @@ fcrypt			-		GLIBC_2.0
+ %chain GLIBC_2.0 GLIBC_2.2 GLIBC_2.2.1 GLIBC_2.2.2 GLIBC_2.2.5 GLIBC_2.2.6
+ %chain GLIBC_2.3 GLIBC_2.4 GLIBC_2.12 GLIBC_2.16 GLIBC_2.17 GLIBC_2.18
+ %chain GLIBC_2.21 GLIBC_2.27 GLIBC_2.29 GLIBC_2.32 GLIBC_2.33 GLIBC_2.35
+-%chain GLIBC_2.36
++%chain GLIBC_2.36 GLIBC_2.38
+ %chain OW_CRYPT_1.0 XCRYPT_2.0 XCRYPT_4.3 XCRYPT_4.4
+diff --git a/lib/libcrypt.minver b/lib/libcrypt.minver
+index 8478077..c5a5bf2 100644
+--- a/lib/libcrypt.minver
++++ b/lib/libcrypt.minver
+@@ -51,6 +51,7 @@
+ #VERSION     SYSTEM          CPU_FAMILY    PREPROCESSOR_CHECK
+ 
+ # GNU Hurd
++GLIBC_2.38   gnu             x86_64
+ GLIBC_2.2.6  gnu             i[3-9]86
+ ERROR        gnu             .
+ 
+-- 
+Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
+Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
+
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 12/40] gnu: libstdc++: Support the 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (10 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 11/40] gnu: libxcrypt: Support " Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 13/40] gnu: gcc-13, gcc-14: Support being used as parent for gcc-static Janneke Nieuwenhuizen
                     ` (27 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290; +Cc: Andreas Enge, Ludovic Courtès

* gnu/packages/gcc.scm (make-libstdc++)[arguments]: When building for the
64bit Hurd, add stage patch-hurd64.

Change-Id: I795a591ef8282ee5b760fec43bd4ad849007f602
---
 gnu/packages/gcc.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index fc3746fb05..850a14cb1c 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -1033,7 +1033,15 @@ (define-public (make-libstdc++ gcc)
                   (("/lib64") "/lib")))))
           (add-before 'configure 'chdir
             (lambda _
-              (chdir "libstdc++-v3"))))
+              (chdir "libstdc++-v3")))
+          #$@(let ((version (package-version gcc)))
+               (if (target-hurd64?)
+                   #~((add-after 'unpack 'patch-hurd64
+                        (lambda _
+                          (substitute* "libstdc++-v3/src/c++20/tzdb.cc"
+                            (("#if ! defined _GLIBCXX_ZONEINFO_DIR")
+                             "#if __GNU__ || ! defined _GLIBCXX_ZONEINFO_DIR")))))
+                   '())))
 
       #:configure-flags '`("--disable-libstdcxx-pch"
                            ,(string-append "--with-gxx-include-dir="
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 13/40] gnu: gcc-13, gcc-14: Support being used as parent for gcc-static.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (11 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 12/40] gnu: libstdc++: " Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 14/40] DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
                     ` (26 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290; +Cc: Andreas Enge, Ludovic Courtès

* gnu/packages/gcc.scm (gcc-13)[arguments]: Use quasiquote instead of
g-expressions.
(gcc-14)[arguments]: Likewise.

Change-Id: I22269b31d49868effe967d46247b189ed9a9d394
---
 gnu/packages/gcc.scm | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 850a14cb1c..befbbda027 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -811,10 +811,10 @@ (define-public gcc-13
               (snippet gcc-canadian-cross-objdump-snippet)))
     (arguments
      (substitute-keyword-arguments (package-arguments gcc-11)
-       ((#:phases phases #~%standard-phases)
+       ((#:phases phases '%standard-phases)
        (if (target-hurd?)
-           #~(modify-phases #$phases
-               (delete 'patch-hurd-libpthread))
+           `(modify-phases ,phases
+              (delete 'patch-hurd-libpthread))
            phases))))
     (properties
      `((compiler-cpu-architectures
@@ -841,8 +841,8 @@ (define-public gcc-14
               (modules '((guix build utils)))
               (snippet gcc-canadian-cross-objdump-snippet)))
     (arguments (substitute-keyword-arguments (package-arguments gcc-13)
-                 ((#:phases phases #~%standard-phases)
-                  #~(modify-phases #$phases
+                 ((#:phases phases '%standard-phases)
+                  `(modify-phases ,phases
                       (add-before 'configure 'pre-x86-configure
                         (lambda _
                           (substitute* "gcc/config/i386/t-linux64"
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 14/40] DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (12 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 13/40] gnu: gcc-13, gcc-14: Support being used as parent for gcc-static Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 15/40] system: image: Add hurd64 image types Janneke Nieuwenhuizen
                     ` (25 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290
  Cc: Andreas Enge, Christopher Baines, Josselin Poiret,
	Ludovic Courtès, Mathieu Othacehe, Maxim Cournoyer,
	Simon Tournier, Tobias Geerinckx-Rice

XXX TODO:

   v Boot a 64bit hurd, and
   o Guix build hello,
   o Push the commit below,
   o Re-check the bootstrap-tarballs build/hash,
   o Update this commit message with new commit hash,
   o Push it with remainder of hurd-team branch,
   o Update blog post.

On commit:
    b4c0b38776c048869626bed8aefd4efb042cea11
    gnu: gcc-13, gcc-14: Support being used as parent for gcc-static.

Run:
    ./pre-inst-env guix build --target=x86_64-gnu bootstrap-tarballs

Producing:
    /gnu/store/46ndf3vaic6cfk7a486saaa8xxnqfpxk-bootstrap-tarballs-0/

With guix hash -r:
    1w9sp8dhgpawf88qd89ykrgyrpfxr9qxxqwpbpd893rnn4cp16v2

* gnu/packages/bootstrap.scm (%bootstrap-executables): Add entries for
x86_64-gnu.
(%bootstrap-guile-hash, %bootstrap-coreutils&co, %bootstrap-binutils,
%bootstrap-glibc, %bootstrap-gcc): Add entry for x86_64-gnu.
* guix/packages.scm (%supported-systems, %hurd-systems): Add x86_64-gnu.
(%cuirass-supported-systems): Remove x86_64-gnu.
* guix/utils.scm (target-64bit?): Add x86_64-gnu.
* m4/guix.m4: Add x86_64-gnu as a supported system.
* doc/guix.texi (GNU Distribution): Add x86_64-gnu.

Change-Id: Id96715cee07572cd0635594d3b1aa6756fa8a822
---
 doc/guix.texi              |  9 ++++++++-
 gnu/packages/bootstrap.scm | 34 ++++++++++++++++++++++++++++++++++
 guix/packages.scm          |  8 +++++---
 m4/guix.m4                 | 12 +++++++++---
 4 files changed, 56 insertions(+), 7 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 8f65387e92..0f5e11a305 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -36,7 +36,7 @@
 Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Efraim Flashner@*
 Copyright @copyright{} 2016 John Darrington@*
 Copyright @copyright{} 2016, 2017 Nikita Gillmann@*
-Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Jan Nieuwenhuizen@*
+Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Janneke Nieuwenhuizen@*
 Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021 Julien Lepiller@*
 Copyright @copyright{} 2016 Alex ter Weele@*
 Copyright @copyright{} 2016, 2017, 2018, 2019, 2020, 2021 Christopher Baines@*
@@ -639,6 +639,13 @@ GNU Distribution
 (@pxref{transparent-emulation-qemu, @code{hurd-vm-service-type}}).
 @xref{Contributing}, on how to help!
 
+@item x86_64-gnu
+@uref{https://hurd.gnu.org, GNU/Hurd} on the @code{x86_64} Intel/AMD
+64-bit architecture.
+
+This configuration is even more experimental and under heavy upstream
+development.
+
 @item mips64el-linux (unsupported)
 little-endian 64-bit MIPS processors, specifically the Loongson series,
 n32 ABI, and Linux-Libre kernel.  This configuration is no longer fully
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 234d001fc1..3efb21eab3 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -125,6 +125,15 @@ (define %bootstrap-executables
       ,(base32 "0nq2c1zb3wv5bf7kd83sziaashydazrn7xgq6kijlk0zj2syzc2m"))
      ("xz"
       ,(base32 "033rhpk6zrpxpd6ffjyg5y2zwq9x9cnq0zljb7k8jlncbalsayq5")))
+    ("x86_64-gnu"
+     ("bash"
+      ,(base32 "1ib1kk1larki3dm46lhl756856zpjwhhlnzkgdyh9f1yf6wm431y"))
+     ("mkdir"
+      ,(base32 "15cnckq4qj1nlmgqy9vq3qa3kcbfm1pc2z38pscxix11j4aqswsm"))
+     ("tar"
+      ,(base32 "1m8v7ddmn42wym2kl9mf7csnwsw6c3jdglg7d7kp7yaa16h5fbck"))
+     ("xz"
+      ,(base32 "16cnr7vr0zawrwcnhshms3v5kyzb2vz1rp4kxmx507cs6rivd05b")))
     ("mips64el-linux"
      ("bash"
       ,(base32 "1aw046dhda240k9pb9iaj5aqkm23gkvxa9j82n4k7fk87nbrixw6"))
@@ -165,6 +174,7 @@ (define (bootstrap-executable-file-name system program)
   (match system
     ("powerpc64le-linux" (string-append system "/20210106/" program))
     ("i586-gnu" (string-append system "/20200326/" program))
+    ("x86_64-gnu" (string-append system "/20241112/" program))
     ("powerpc-linux" (string-append system "/20200923/bin/" program))
     ("riscv64-linux" (string-append system "/20210725/bin/" program))
     (_ (string-append system "/" program
@@ -366,6 +376,8 @@ (define (bootstrap-guile-url-path system)
                     "/20150101/guile-2.0.11.tar.xz")
                    ("i586-gnu"
                     "/20200326/guile-static-stripped-2.0.14-i586-pc-gnu.tar.xz")
+                   ("x86_64-gnu"
+                    "/20241112/guile-static-stripped-3.0.9-x86_64-pc-gnu.tar.xz")
                    ("powerpc64le-linux"
                     "/20210106/guile-static-stripped-2.0.14-powerpc64le-linux-gnu.tar.xz")
                    ("riscv64-linux"
@@ -390,6 +402,8 @@ (define (bootstrap-guile-hash system)
      (base32 "1giy2aprjmn5fp9c4s9r125fljw4wv6ixy5739i5bffw4jgr0f9r"))
     ("i586-gnu"
      (base32 "0wgqpsmvg25rnqn49ap7kwd2qxccd8dr4lllzp7i3rjvgav27vac"))
+    ("x86_64-gnu"
+     (base32 "06a26dd1r6svcxi6wk9xcdc8ldnxm0p51cnq1klghbc4djarmg6v"))
     ("powerpc-linux"
      (base32 "1by2p7s27fbyjzfkcw8h65h4kkqh7d23kv4sgg5jppjn2qx7swq4"))
     ("riscv64-linux"
@@ -599,6 +613,8 @@ (define %bootstrap-coreutils&co
                                              "/20210106/static-binaries-0-powerpc64le-linux-gnu.tar.xz")
                                             ("i586-gnu"
                                              "/20200326/static-binaries-0-i586-pc-gnu.tar.xz")
+                                            ("x86_64-gnu"
+                                             "/20241112/static-binaries-0-x86_64-pc-gnu.tar.xz")
                                             ("powerpc-linux"
                                              "/20200923/static-binaries.tar.xz")
                                             ("riscv64-linux"
@@ -626,6 +642,9 @@ (define %bootstrap-coreutils&co
                               ("i586-gnu"
                                (base32
                                 "17kllqnf3fg79gzy9ansgi801c46yh9c23h4d923plvb0nfm1cfn"))
+                              ("x86_64-gnu"
+                               (base32
+                                "118s161df8hgrdfph2w5spnrms02rh1dk7mzfvx1k1prvgngpm9p"))
                               ("powerpc-linux"
                                (base32
                                 "0kspxy0yczan2vlih6aa9hailr2inz000fqa0gn5x9d1fxxa5y8m"))
@@ -682,6 +701,8 @@ (define %bootstrap-binutils
                                              "/20210106/binutils-static-stripped-2.34-powerpc64le-linux-gnu.tar.xz")
                                             ("i586-gnu"
                                              "/20200326/binutils-static-stripped-2.34-i586-pc-gnu.tar.xz")
+                                            ("x86_64-gnu"
+                                             "/20241112/binutils-static-stripped-2.41-x86_64-pc-gnu.tar.xz")
                                             ("powerpc-linux"
                                              "/20200923/binutils-2.35.1.tar.xz")
                                             ("riscv64-linux"
@@ -712,6 +733,9 @@ (define %bootstrap-binutils
                               ("i586-gnu"
                                (base32
                                 "11kykv1kmqc5wln57rs4klaqa13hm952smkc57qcsyss21kfjprs"))
+                              ("x86_64-gnu"
+                               (base32
+                                "1nibcgqqkqvpqs9636an2ikiybz0mn6vqhl57hvfs6cxfylm5c5x"))
                               ("powerpc-linux"
                                (base32
                                 "0asbg1c4avkrvh057mx0942xwddd136jni382zqsxzn79ls42yq8"))
@@ -772,6 +796,8 @@ (define %bootstrap-glibc
                                        "/20210106/glibc-stripped-2.31-powerpc64le-linux-gnu.tar.xz")
                                       ("i586-gnu"
                                        "/20240816/glibc-stripped-2.39-i586-pc-gnu.tar.xz")
+                                      ("x86_64-gnu"
+                                       "/20241112/glibc-stripped-2.39-x86_64-pc-gnu.tar.xz")
                                       ("powerpc-linux"
                                        "/20200923/glibc-2.32.tar.xz")
                                       ("riscv64-linux"
@@ -802,6 +828,9 @@ (define %bootstrap-glibc
                         ("i586-gnu"
                          (base32
                           "0x2x6w611k6v9qdabacawamw2475p04hm3s0q95xcg063wjq4ig2"))
+                        ("x86_64-gnu"
+                         (base32
+                          "1dcgrnlxbsdic0xmmrjbr8gl6ra5y2xbj8f8jr6y0zvpdyi12ldd"))
                         ("powerpc-linux"
                          (base32
                           "0smmssyjrlk5cvx49586smmk81gkwff0i6r91n4rir4jm6ba25sb"))
@@ -878,6 +907,8 @@ (define %bootstrap-gcc
                                         "/20210106/gcc-stripped-5.5.0-powerpc64le-linux-gnu.tar.xz")
                                        ("i586-gnu"
                                         "/20200326/gcc-stripped-5.5.0-i586-pc-gnu.tar.xz")
+                                       ("x86_64-gnu"
+                                        "/20241112/gcc-stripped-14.2.0-x86_64-pc-gnu.tar.xz")
                                        ("powerpc-linux"
                                         "/20200923/gcc-5.5.0.tar.xz")
                                        ("riscv64-linux"
@@ -908,6 +939,9 @@ (define %bootstrap-gcc
                          ("i586-gnu"
                           (base32
                            "1j2zc58wzil71a34h7c70sd68dmqvcscrw3rmn2whq79vd70zvv5"))
+                         ("x86_64-gnu"
+                          (base32
+                           "0vqvjvw6xi16lihiqz4mhisfwx3dgs15y60q07ksdkgvi1wdli2w"))
                          ("powerpc-linux"
                           (base32
                            "1p7df3yixhm87dw5sccc6yn1i9db1r9hnmsg87wq5xi4rfmirq7w"))
diff --git a/guix/packages.scm b/guix/packages.scm
index f373136d22..403217d711 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -10,6 +10,7 @@
 ;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2022 jgart <jgart@dismail.de>
 ;;; Copyright © 2023 Simon Tournier <zimon.toutoune@gmail.com>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -419,7 +420,7 @@ (define %32bit-supported-systems
 (define %64bit-supported-systems
   ;; This is the list of 64-bit system types that are supported.
   '("x86_64-linux" "mips64el-linux" "aarch64-linux" "powerpc64le-linux"
-    "riscv64-linux"))
+    "riscv64-linux" "x86_64-gnu"))
 
 (define %supported-systems
   ;; This is the list of system types that are supported.  By default, we
@@ -428,14 +429,15 @@ (define %supported-systems
 
 (define %hurd-systems
   ;; The GNU/Hurd systems for which support is being developed.
-  '("i586-gnu"))
+  '("i586-gnu" "x86_64-gnu"))
 
 (define %cuirass-supported-systems
   ;; This is the list of system types for which build machines are available.
   ;;
   ;; XXX: MIPS is unavailable in CI:
   ;; <https://lists.gnu.org/archive/html/guix-devel/2017-03/msg00790.html>.
-  (fold delete %supported-systems '("mips64el-linux" "powerpc-linux" "riscv64-linux")))
+  (fold delete %supported-systems '("mips64el-linux" "powerpc-linux"
+                                    "riscv64-linux" "x86_64-gnu")))
 
 (define (maybe-add-input-labels inputs)
   "Add labels to INPUTS unless it already has them."
diff --git a/m4/guix.m4 b/m4/guix.m4
index b93daba5c3..8c2757a8b7 100644
--- a/m4/guix.m4
+++ b/m4/guix.m4
@@ -3,6 +3,7 @@ dnl Copyright © 2012, 2013, 2014, 2015, 2016, 2018, 2019, 2020, 2021 Ludovic Co
 dnl Copyright © 2014 Mark H Weaver <mhw@netris.org>
 dnl Copyright © 2017, 2020, 2021, 2023 Efraim Flashner <efraim@flashner.co.il>
 dnl Copyright © 2021 Chris Marusich <cmmarusich@gmail.com>
+dnl Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 dnl
 dnl This file is part of GNU Guix.
 dnl
@@ -61,8 +62,13 @@ AC_DEFUN([GUIX_SYSTEM_TYPE], [
        linux-musl*)
 	  guix_system="$machine_name-linux";;
        gnu*)
-          # Always use i586 for GNU/Hurd.
-          guix_system="i586-gnu";;
+          case "$machine_name" in
+            i386|i486|i586|i686)
+              # Always use i586 for 32bit GNU/Hurd.
+              guix_system="i586-gnu";;
+            *)
+	      guix_system="$machine_name-gnu";;
+          esac;;
        *)
 	  # Strip the version number from names such as `gnu0.3',
 	  # `darwin10.2.0', etc.
@@ -91,7 +97,7 @@ courageous and port the GNU System distribution to it (see
   # Currently only Linux-based systems are supported, and only on some
   # platforms.
   case "$guix_system" in
-    x86_64-linux|i686-linux|armhf-linux|aarch64-linux|powerpc64le-linux|riscv64-linux|i586-gnu)
+    x86_64-linux|i686-linux|armhf-linux|aarch64-linux|powerpc64le-linux|riscv64-linux|i586-gnu|x86_64-gnu)
       ;;
     mips64el-linux|powerpc-linux)
       AC_MSG_WARN([building Guix on `$guix_system', which is not supported])
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 15/40] system: image: Add hurd64 image types.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (13 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 14/40] DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 16/40] gnu: Add libgpg-error-1.50 Janneke Nieuwenhuizen
                     ` (24 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/system/hurd.scm (%hurd64-default-operating-system-kernel,
%hurd64-default-operating-system): New variables.
* gnu/system/images/hurd.scm (hurd64-disk-image, hurd64-image-type,
hurd64-qcow2-image-type, hurd64-barebones-disk-image,
hurd64-barebones-qcow2-image): New variables.

* gnu/system/images/hurd.scm (hurd64-barebones-os): New variable.
---
 gnu/system/hurd.scm        | 17 +++++++++
 gnu/system/images/hurd.scm | 72 ++++++++++++++++++++++++++++++++++++--
 2 files changed, 87 insertions(+), 2 deletions(-)

diff --git a/gnu/system/hurd.scm b/gnu/system/hurd.scm
index 9a351529e8..6263d3de71 100644
--- a/gnu/system/hurd.scm
+++ b/gnu/system/hurd.scm
@@ -18,6 +18,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu system hurd)
+  #:use-module (ice-9 match)
   #:use-module (guix gexp)
   #:use-module (guix profiles)
   #:use-module (guix utils)
@@ -51,6 +52,8 @@ (define-module (gnu system hurd)
             %desktop-services/hurd
             %hurd-default-operating-system
             %hurd-default-operating-system-kernel
+            %hurd64-default-operating-system
+            %hurd64-default-operating-system-kernel
             %setuid-programs/hurd))
 
 ;;; Commentary:
@@ -68,6 +71,14 @@ (define %hurd-default-operating-system-kernel
                         (%current-target-system #f))
         gnumach)))
 
+(define %hurd64-default-operating-system-kernel
+  (if (system-hurd?)
+      gnumach
+      ;; A cross-built GNUmach does not work
+      (with-parameters ((%current-system "x86_64-linux")
+                        (%current-target-system #f))
+        gnumach)))
+
 (define %base-packages/hurd
   ;; Note: the Shepherd comes before the Hurd, not just because its duty is to
   ;; shepherd the herd, but also because we want its 'halt' and 'reboot'
@@ -142,3 +153,9 @@ (define %hurd-default-operating-system
     (essential-services (hurd-default-essential-services this-operating-system))
     (privileged-programs '())
     (setuid-programs %setuid-programs/hurd)))
+
+(define %hurd64-default-operating-system
+  (operating-system
+    (inherit %hurd-default-operating-system)
+    (kernel %hurd64-default-operating-system-kernel)))
+
diff --git a/gnu/system/images/hurd.scm b/gnu/system/images/hurd.scm
index 01c422a54f..67815aeb9b 100644
--- a/gnu/system/images/hurd.scm
+++ b/gnu/system/images/hurd.scm
@@ -1,6 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
-;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -36,7 +36,14 @@ (define-module (gnu system images hurd)
             hurd-image-type
             hurd-qcow2-image-type
             hurd-barebones-disk-image
-            hurd-barebones-qcow2-image))
+            hurd-barebones-qcow2-image
+
+            hurd64-barebones-os
+            hurd64-disk-image
+            hurd6-image-type
+            hurd64-qcow2-image-type
+            hurd64-barebones-disk-image
+            hurd64-barebones-qcow2-image))
 
 (define hurd-barebones-os
   (operating-system
@@ -62,6 +69,30 @@ (define hurd-barebones-os
                               (password-authentication? #t)))
                     %base-services+qemu-networking/hurd))))
 
+(define hurd64-barebones-os
+  (operating-system
+    (inherit %hurd64-default-operating-system)
+    (bootloader (bootloader-configuration
+                 (bootloader grub-minimal-bootloader)
+                 (targets '("/dev/sdX"))))
+    (file-systems (cons (file-system
+                          (device (file-system-label "my-root"))
+                          (mount-point "/")
+                          (type "ext2"))
+                        %base-file-systems))
+    (host-name "guixygnu")
+    (timezone "Europe/Amsterdam")
+    (packages (cons openssh-sans-x %base-packages/hurd))
+    (services (cons (service openssh-service-type
+                             (openssh-configuration
+                              (openssh openssh-sans-x)
+                              (use-pam? #f)
+                              (port-number 2222)
+                              (permit-root-login #t)
+                              (allow-empty-passwords? #t)
+                              (password-authentication? #t)))
+                    %base-services+qemu-networking/hurd))))
+
 (define hurd-initialize-root-partition
   #~(lambda* (#:rest args)
       (apply initialize-root-partition
@@ -115,5 +146,42 @@ (define hurd-barebones-qcow2-image
                         #:type hurd-qcow2-image-type))
    (name 'hurd-barebones.qcow2)))
 
+\f
+;;;
+;;; 64bit Hurd
+;;;
+(define hurd64-disk-image
+  (image
+   (inherit hurd-disk-image)
+   (platform x86_64-gnu)))
+
+(define hurd64-image-type
+  (image-type
+   (name 'hurd64-raw)
+   (constructor (cut image-with-os hurd64-disk-image <>))))
+
+(define hurd64-qcow2-image-type
+  (image-type
+   (name 'hurd64-qcow2)
+   (constructor (lambda (os)
+                  (image
+                   (inherit hurd64-disk-image)
+                   (format 'compressed-qcow2)
+                   (operating-system os))))))
+
+(define hurd64-barebones-disk-image
+  (image
+   (inherit
+    (os+platform->image hurd64-barebones-os x86_64-gnu
+                        #:type hurd64-image-type))
+   (name 'hurd64-barebones-disk-image)))
+
+(define hurd64-barebones-qcow2-image
+  (image
+   (inherit
+    (os+platform->image hurd64-barebones-os x86_64-gnu
+                        #:type hurd64-qcow2-image-type))
+   (name 'hurd64-barebones.qcow2)))
+
 ;; Return the default image.
 hurd-barebones-qcow2-image
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 16/40] gnu: Add libgpg-error-1.50.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (14 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 15/40] system: image: Add hurd64 image types Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 17/40] gnu: libgcrypt: Use libgpg-error-1.50 for the 64bit Hurd Janneke Nieuwenhuizen
                     ` (23 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/packages/gnupg.scm (libgpg-error-1.50): New variable.

Change-Id: Ia34c0f339f331420d76b2c840205f29e511d1dcc
---
 gnu/packages/gnupg.scm | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 2e97c2244a..a4863542f2 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -22,7 +22,7 @@
 ;;; Copyright © 2021 Nikita Domnitskii <nikita@domnitskii.me>
 ;;; Copyright © 2021 Aleksandr Vityazev <avityazev@posteo.org>
 ;;; Copyright © 2022, 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
-;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -164,6 +164,19 @@ (define-public libgpg-error
     (properties '((ftp-server . "ftp.gnupg.org")
                   (ftp-directory . "/gcrypt/libgpg-error")))))
 
+(define-public libgpg-error-1.50
+  (package
+    (inherit libgpg-error)
+    (version "1.50")
+    (source
+     (origin
+      (method url-fetch)
+      (uri (string-append "mirror://gnupg/libgpg-error/libgpg-error-"
+                          version ".tar.bz2"))
+      (sha256
+       (base32
+        "02p2jgz95688ib28sl4aa624cj0liz73anwcl92f8cx6w14m6h39"))))))
+
 (define-public libgcrypt
   (package
     (name "libgcrypt")
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 17/40] gnu: libgcrypt: Use libgpg-error-1.50 for the 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (15 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 16/40] gnu: Add libgpg-error-1.50 Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 18/40] gnu: perl: Support cross-building " Janneke Nieuwenhuizen
                     ` (22 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/packages/gnupg.scm (libgcrypt)[propagated-inputs]: When building for the
64bit Hurd, use libgcrypt-1.50.

Change-Id: I608d283a4a307527d5b09a81fa1a53cec5d6bb76
---
 gnu/packages/gnupg.scm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index a4863542f2..6c6efff026 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -190,7 +190,9 @@ (define-public libgcrypt
                "1pp9zyx02bzgzjzldxf0mx9kp3530xgaaqcz4n2cv100ddaaw57g"))))
     (build-system gnu-build-system)
     (propagated-inputs
-     `(("libgpg-error-host" ,libgpg-error)))
+     `(("libgpg-error-host" ,(if (target-hurd64?)
+                                 libgpg-error-1.50
+                                 libgpg-error))))
     (native-inputs
      ;; Needed here for the 'gpg-error' program.
      `(("libgpg-error-native" ,libgpg-error)))
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 18/40] gnu: perl: Support cross-building for the 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (16 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 17/40] gnu: libgcrypt: Use libgpg-error-1.50 for the 64bit Hurd Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 19/40] gnu: openssl-3.0: Support " Janneke Nieuwenhuizen
                     ` (21 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/packages/cross-base.scm (perl)[native-inputs]: When cross-building for
the 64bit Hurd, use perl-cross-1.6.

Change-Id: I4a77f51a6757ad4aed9bcca8f9bbbf2cbd162e15
---
 gnu/packages/perl.scm | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index faaac13bf1..2ea7c49419 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -248,14 +248,18 @@ (define-public perl
     (native-inputs
      (if (%current-target-system)
          `(("perl-cross"
-            ,(origin
-               (method git-fetch)
-               (uri (git-reference
-                     (url "https://github.com/arsv/perl-cross")
-                     (commit "1.4")))
-               (file-name (git-file-name "perl-cross" "1.4"))
-               (sha256
-                (base32 "1ydjvlhrk06ccyj4bm8by7xk90krsll2k380mc3x1mhfrc7r9gzy")))))
+            ,(let ((version (if (target-hurd64?) "1.6" "1.4"))
+                   (hash
+                    (if (target-hurd64?)
+                        "0s06lkx5b79r9cn6pm5p6d4jbdjq7wg7rjr75nw5xdhw1z3wnl2d"
+                        "1ydjvlhrk06ccyj4bm8by7xk90krsll2k380mc3x1mhfrc7r9gzy")))
+               (origin
+                 (method git-fetch)
+                 (uri (git-reference
+                       (url "https://github.com/arsv/perl-cross")
+                       (commit version)))
+                 (file-name (git-file-name "perl-cross" version))
+                 (sha256 (base32 hash))))))
          '()))
     (native-search-paths (list (search-path-specification
                                 (variable "PERL5LIB")
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 19/40] gnu: openssl-3.0: Support the 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (17 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 18/40] gnu: perl: Support cross-building " Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 20/40] gnu: pciutils: " Janneke Nieuwenhuizen
                     ` (20 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/packages/patches/openssl-hurd64.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/tls.scm (openssl-3.0)[arguments]: When building for
the 64bit Hurd, use it in new "apply-hurd-patch" phase.

Change-Id: I8936377da726681b748cc010e1fbae3fb19dee05
---
 gnu/local.mk                              |  1 +
 gnu/packages/patches/openssl-hurd64.patch | 99 +++++++++++++++++++++++
 gnu/packages/tls.scm                      |  9 +++
 3 files changed, 109 insertions(+)
 create mode 100644 gnu/packages/patches/openssl-hurd64.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index c952e090ec..a7e5e903e3 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1893,6 +1893,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/opensles-add-license-file.patch			\
   %D%/packages/patches/openssl-1.1-c-rehash-in.patch		\
   %D%/packages/patches/openssl-3.0-c-rehash-in.patch		\
+  %D%/packages/patches/openssl-hurd64.patch			\
   %D%/packages/patches/opentaxsolver-file-browser-fix.patch     \
   %D%/packages/patches/open-zwave-hidapi.patch			\
   %D%/packages/patches/orangeduck-mpc-fix-pkg-config.patch	\
diff --git a/gnu/packages/patches/openssl-hurd64.patch b/gnu/packages/patches/openssl-hurd64.patch
new file mode 100644
index 0000000000..372fda834a
--- /dev/null
+++ b/gnu/packages/patches/openssl-hurd64.patch
@@ -0,0 +1,99 @@
+Upstream-status: Taken from upstream:
+
+<https://github.com/openssl/openssl/commit/7c729851d169f30d9e0c0ad6e7c1cf6cefb37935>.
+
+From 795699363be8f717e36802c3ac503011b74ad752 Mon Sep 17 00:00:00 2001
+From: Janneke Nieuwenhuizen <janneke@gnu.org>
+Date: Thu, 7 Nov 2024 14:08:05 +0100
+Subject: [PATCH] Add support for the 64bit Hurd.
+Content-Transfer-Encoding: 8bit
+Content-Type: text/plain; charset=UTF-8
+
+Taken from <https://salsa.debian.org/debian/openssl>.
+---
+ Configurations/10-main.conf | 45 ++++++++++++++++++++++++++++++++-----
+ util/perl/OpenSSL/config.pm |  3 ++-
+ 2 files changed, 41 insertions(+), 7 deletions(-)
+
+diff --git a/Configurations/10-main.conf b/Configurations/10-main.conf
+index b578a3c2a8..740460ebd3 100644
+--- a/Configurations/10-main.conf
++++ b/Configurations/10-main.conf
+@@ -1685,20 +1685,53 @@ my %targets = (
+     },
+ 
+ ##### GNU Hurd
+-    "hurd-x86" => {
++    "hurd-generic32" => {
+         inherit_from     => [ "BASE_unix" ],
+         CC               => "gcc",
+-        CFLAGS           => "-O3 -fomit-frame-pointer -Wall",
++        CXX              => "g++",
++        CFLAGS           => picker(default => "-Wall",
++                                   debug   => "-O0 -g",
++                                   release => "-O3"),
++        CXXFLAGS         => picker(default => "-Wall",
++                                   debug   => "-O0 -g",
++                                   release => "-O3"),
+         cflags           => threads("-pthread"),
+-        lib_cppflags     => "-DL_ENDIAN",
++        cxxflags         => combine("-std=c++11", threads("-pthread")),
+         ex_libs          => add("-ldl", threads("-pthread")),
+-        bn_ops           => "BN_LLONG",
+-        asm_arch         => 'x86',
+-        perlasm_scheme   => 'elf',
++        bn_ops           => "BN_LLONG RC4_CHAR",
+         thread_scheme    => "pthreads",
+         dso_scheme       => "dlfcn",
+         shared_target    => "linux-shared",
+         shared_cflag     => "-fPIC",
++        shared_ldflag    => sub { $disabled{pinshared} ? () : "-Wl,-znodelete" },
++    },
++
++    "hurd-generic64" => {
++        inherit_from     => [ "hurd-generic32" ],
++        bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
++    },
++
++    #### X86 / X86_64 targets
++    "hurd-x86" => {
++        inherit_from     => [ "hurd-generic32" ],
++        CFLAGS           => add(picker(release => "-fomit-frame-pointer")),
++        cflags           => add("-m32"),
++        cxxflags         => add("-m32"),
++        lib_cppflags     => add("-DL_ENDIAN"),
++        bn_ops           => "BN_LLONG",
++        asm_arch         => 'x86',
++        perlasm_scheme   => 'elf',
++    },
++
++    "hurd-x86_64" => {
++        inherit_from     => [ "hurd-generic64" ],
++        cflags           => add("-m64"),
++        cxxflags         => add("-m64"),
++        lib_cppflags     => add("-DL_ENDIAN"),
++        bn_ops           => "SIXTY_FOUR_BIT_LONG",
++        asm_arch         => 'x86_64',
++        perlasm_scheme   => 'elf',
++        multilib         => "64",
+     },
+ 
+ ##### VxWorks for various targets
+diff --git a/util/perl/OpenSSL/config.pm b/util/perl/OpenSSL/config.pm
+index 2f1edcafb6..707db71537 100755
+--- a/util/perl/OpenSSL/config.pm
++++ b/util/perl/OpenSSL/config.pm
+@@ -92,7 +92,8 @@ my $guess_patterns = [
+     [ 'IRIX64:.*',                  'mips4-sgi-irix64' ],
+     [ 'Linux:[2-9]\..*',            '${MACHINE}-whatever-linux2' ],
+     [ 'Linux:1\..*',                '${MACHINE}-whatever-linux1' ],
+-    [ 'GNU.*',                      'hurd-x86' ],
++    [ 'GNU:.*86-AT386',             'hurd-x86' ],
++    [ 'GNU:.*86_64-AT386',          'hurd-x86_64' ],
+     [ 'LynxOS:.*',                  '${MACHINE}-lynx-lynxos' ],
+     # BSD/OS always says 386
+     [ 'BSD\/OS:4\..*',              'i486-whatever-bsdi4' ],
+-- 
+Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
+Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
+
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index 43806e24da..fab88518ce 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -589,6 +589,15 @@ (define-public openssl-3.0
                                            "/bin/perl"))))
             #$@(if (target-hurd?)
                    #~((delete 'patch-configure))
+                   #~())
+            #$@(if (target-hurd64?)
+                   #~((add-after 'unpack 'apply-hurd-patch
+                        (lambda _
+                          (let ((patch-file
+                                 #$(local-file
+                                    (search-patch "openssl-hurd64.patch"))))
+                            (invoke "patch" "--force" "-p1" "-i"
+                                    patch-file)))))
                    #~())))
        ((#:configure-flags flags #~'())
         (if (system-hurd?)
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 20/40] gnu: pciutils: Support the 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (18 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 19/40] gnu: openssl-3.0: Support " Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 21/40] gnu: libpciaccess: " Janneke Nieuwenhuizen
                     ` (19 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/packages/patches/pciutils-hurd64.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/pciutils.scm (pciutils)[arguments]: Use g-expressions.  When
building for the 64bit Hurd, use it in new "apply-hurd64-patch" phase.

Change-Id: I8936377da726681b748cc010e1fbae3fb19dee05
---
 gnu/local.mk                               |  1 +
 gnu/packages/patches/pciutils-hurd64.patch | 31 ++++++++++++++++++++++
 gnu/packages/pciutils.scm                  | 25 +++++++++++------
 3 files changed, 49 insertions(+), 8 deletions(-)
 create mode 100644 gnu/packages/patches/pciutils-hurd64.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index a7e5e903e3..34023909a1 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1908,6 +1908,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/pam-krb5-CVE-2020-10595.patch		\
   %D%/packages/patches/pango-skip-libthai-test.patch		\
   %D%/packages/patches/password-store-tree-compat.patch		\
+  %D%/packages/patches/pciutils-hurd64.patch			\
   %D%/packages/patches/pdfpc-build-with-vala-0.56.patch         \
   %D%/packages/patches/petri-foo-0.1.87-fix-recent-file-not-exist.patch			\
   %D%/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch \
diff --git a/gnu/packages/patches/pciutils-hurd64.patch b/gnu/packages/patches/pciutils-hurd64.patch
new file mode 100644
index 0000000000..316f12e131
--- /dev/null
+++ b/gnu/packages/patches/pciutils-hurd64.patch
@@ -0,0 +1,31 @@
+Upstream-status: Not presented upstream.
+
+--- pciutils-3.8.0/lib/hurd.c.orig	2024-11-07 15:09:20.728973822 +0100
++++ pciutils-3.8.0/lib/hurd.c	2024-11-07 15:05:08.524682813 +0100
+@@ -213,7 +213,7 @@
+ hurd_read(struct pci_dev *d, int pos, byte * buf, int len)
+ {
+   int err;
+-  size_t nread;
++  mach_msg_type_number_t nread;
+   char *data;
+   mach_port_t device_port = device_port_lookup(d);
+ 
+@@ -266,7 +266,7 @@
+   mach_port_t device_port = device_port_lookup(d);
+   struct pci_bar regions[6];
+   char *buf = (char *) &regions;
+-  size_t size = sizeof(regions);
++  mach_msg_type_number_t size = sizeof(regions);
+ 
+   int err = pci_get_dev_regions(device_port, &buf, &size);
+   if (err)
+@@ -305,7 +305,7 @@
+   struct pci_xrom_bar rom;
+   mach_port_t device_port = device_port_lookup(d);
+   char *buf = (char *) &rom;
+-  size_t size = sizeof(rom);
++  mach_msg_type_number_t size = sizeof(rom);
+ 
+   int err = pci_get_dev_rom(device_port, &buf, &size);
+   if (err)
diff --git a/gnu/packages/pciutils.scm b/gnu/packages/pciutils.scm
index d2a352eb6b..08f1634113 100644
--- a/gnu/packages/pciutils.scm
+++ b/gnu/packages/pciutils.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
-;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2022 Brendan Tildesley <mail@brendan.scot>
 ;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
 ;;;
@@ -81,25 +81,34 @@ (define-public pciutils
                 "01aglgw9ds9qiswcbi2lx90lswncikrlyv8mmp4haix8542bvvci"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
          (add-after 'unpack 'unbundle-pci.ids
            (lambda* (#:key native-inputs inputs #:allow-other-keys)
              (copy-file (search-input-file (or native-inputs inputs)
                                            "share/hwdata/pci.ids")
                         "pci.ids")))
+         #$@(if (target-hurd64?)
+               #~((add-after 'unpack 'apply-hurd64-patch
+                    (lambda _
+                      (let ((patch-file
+                             #$(local-file
+                                (search-patch "pciutils-hurd64.patch"))))
+                        (invoke "patch" "--force" "-p1" "-i" patch-file)))))
+               #~())
          (replace 'configure
            (lambda* (#:key outputs #:allow-other-keys)
              ;; There's no 'configure' script, just a raw makefile.
              (substitute* "Makefile"
-               ,@(if (%current-target-system)
-                     `((("^CROSS_COMPILE=.*$")
+               #$@(if (%current-target-system)
+                     #~((("^CROSS_COMPILE=.*$")
                         (string-append "CROSS_COMPILE="
-                                       ,(%current-target-system) "-"
+                                       #$(%current-target-system) "-"
                                        "\n"))
                        (("^HOST=.*$")
                         (string-append "HOST="
-                                       ,(gnu-triplet->nix-system
+                                       #$(gnu-triplet->nix-system
                                          (%current-target-system)) "\n"))
                        ;; Disable 'install' strip option, that would fail when
                        ;; we are cross-compiling.
@@ -139,7 +148,7 @@ (define-public pciutils
              (invoke "make" "install" "install-lib"))))
 
        ;; Make sure programs have an RPATH so they can find libpciutils.so.
-       #:make-flags (list ,(string-append "CC="
+       #:make-flags #~(list #$(string-append "CC="
                                           (if (%current-target-system)
                                               (cc-for-target)
                                               "gcc"))
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 21/40] gnu: libpciaccess: Support the 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (19 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 20/40] gnu: pciutils: " Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 22/40] gnu: netdde: Update to c0ef248dc7c5ccc1273e2a796f3ece30c5b645df Janneke Nieuwenhuizen
                     ` (18 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/packages/patches/libpciaccess-hurd64.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/xorg.scm (libpciaccess) [arguments]: Use g-expressions.  When
building for the 64bit Hurd, use it in new "apply-hurd64-patch" phase.

Change-Id: I8936377da726681b748cc010e1fbae3fb19dee05
---
 gnu/local.mk                                  |  1 +
 .../patches/libpciaccess-hurd64.patch         | 58 +++++++++++++++++++
 gnu/packages/xorg.scm                         | 23 +++++---
 3 files changed, 75 insertions(+), 7 deletions(-)
 create mode 100644 gnu/packages/patches/libpciaccess-hurd64.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 34023909a1..8c4f052b75 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1703,6 +1703,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/libmpeg2-global-symbol-test.patch	\
   %D%/packages/patches/libmygpo-qt-fix-qt-5.11.patch		\
   %D%/packages/patches/libmygpo-qt-missing-qt5-modules.patch	\
+  %D%/packages/patches/libpciaccess-hurd64.patch		\
   %D%/packages/patches/libphonenumber-reproducible-build.patch	\
   %D%/packages/patches/libqalculate-3.8.0-libcurl-ssl-fix.patch	\
   %D%/packages/patches/libquicktime-ffmpeg.patch 		\
diff --git a/gnu/packages/patches/libpciaccess-hurd64.patch b/gnu/packages/patches/libpciaccess-hurd64.patch
new file mode 100644
index 0000000000..f7e11059b1
--- /dev/null
+++ b/gnu/packages/patches/libpciaccess-hurd64.patch
@@ -0,0 +1,58 @@
+Upstream-status: Taken from upstream:
+
+<https://gitlab.freedesktop.org/xorg/lib/libpciaccess/-/commit/6cd5a4afbb70868c7746de8d50dea59e02e9acf2>.
+
+From 6cd5a4afbb70868c7746de8d50dea59e02e9acf2 Mon Sep 17 00:00:00 2001
+From: Flavio Cruz <flaviocruz@gmail.com>
+Date: Wed, 28 Jun 2023 01:02:34 -0400
+Subject: [PATCH] Fix compilation warnings when building against hurd-amd64.
+Content-Transfer-Encoding: 8bit
+Content-Type: text/plain; charset=UTF-8
+
+Passes mach_msg_type_number_t instead of size_t which have different
+sizes. Example warning:
+
+/hurd_pci.c:101:53: warning: passing argument 3 of 'pci_get_dev_regions' from incompatible pointer type [-Wincompatible-pointer-types]
+  101 |     err = pci_get_dev_regions(d->device_port, &buf, &size);
+      |                                                     ^~~~~
+      |                                                     |
+      |                                                     size_t * {aka long unsigned int *}
+---
+ src/hurd_pci.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/hurd_pci.c b/src/hurd_pci.c
+index 8653e1b..9ac3813 100644
+--- a/src/hurd_pci.c
++++ b/src/hurd_pci.c
+@@ -82,7 +82,7 @@ pci_device_hurd_probe(struct pci_device *dev)
+     struct pci_bar regions[6];
+     struct pci_xrom_bar rom;
+     struct pci_device_private *d;
+-    size_t size;
++    mach_msg_type_number_t size;
+     char *buf;
+ 
+     /* Many of the fields were filled in during initial device enumeration.
+@@ -323,7 +323,7 @@ pciclient_cfg_read(mach_port_t device_port, int reg, char *buf,
+                    size_t * nbytes)
+ {
+     int err;
+-    size_t nread;
++    mach_msg_type_number_t nread;
+     char *data;
+ 
+     data = buf;
+@@ -473,7 +473,7 @@ simple_readdir(mach_port_t port, uint32_t *first_entry)
+ {
+     char *data;
+     int nentries = 0;
+-    vm_size_t size;
++    mach_msg_type_number_t size;
+ 
+     dir_readdir (port, &data, &size, *first_entry, 1, 0, &nentries);
+ 
+-- 
+Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
+Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
+
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 0de08a4ad1..b106a604a7 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -36,7 +36,7 @@
 ;;; Copyright © 2021 Lu Hui <luhux76@gmail.com>
 ;;; Copyright © 2022 Petr Hodina <phodina@protonmail.com>
 ;;; Copyright © 2023 Zheng Junjie <873216071@qq.com>
-;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2023, 2024 John Kehayias <john.kehayias@protonmail.com>
 ;;; Copyright © 2023, 2024 Kaelyn Takata <kaelyn.alexi@protonmail.com>
 ;;;
@@ -1157,16 +1157,17 @@ (define-public libpciaccess
             "12glp4w1kgvmqn89lk19cgr6jccd3awxra4dxisp7pagi06rsk11"))))
     (build-system gnu-build-system)
     (arguments
-     '(;; Make sure libpciaccess can read compressed 'pci.ids' files as
-       ;; provided by pciutils.
-       #:configure-flags
-       (list "--with-zlib"
+     (list
+      ;; Make sure libpciaccess can read compressed 'pci.ids' files as
+      ;; provided by pciutils.
+      #:configure-flags
+      #~(list "--with-zlib"
              (string-append "--with-pciids-path="
                             (assoc-ref %build-inputs "pciutils")
                             "/share/hwdata"))
 
        #:phases
-       (modify-phases %standard-phases
+       #~(modify-phases %standard-phases
          (add-after 'install 'add-L-zlib
            (lambda* (#:key inputs outputs #:allow-other-keys)
              ;; Provide '-LZLIB/lib' next to '-lz' in the .la file.
@@ -1175,7 +1176,15 @@ (define-public libpciaccess
                (substitute* (string-append out "/lib/libpciaccess.la")
                  (("-lz")
                   (string-append "-L" zlib "/lib -lz")))
-               #t))))))
+               #t)))
+         #$@(if (target-hurd64?)
+                #~((add-after 'unpack 'apply-hurd64-patch
+                     (lambda _
+                       (let ((patch-file
+                              #$(local-file
+                                 (search-patch "libpciaccess-hurd64.patch"))))
+                         (invoke "patch" "--force" "-p1" "-i" patch-file)))))
+                #~()))))
     (inputs
      (list zlib pciutils))                   ;for 'pci.ids.gz'
     (native-inputs
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 22/40] gnu: netdde: Update to c0ef248dc7c5ccc1273e2a796f3ece30c5b645df.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (20 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 21/40] gnu: libpciaccess: " Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 23/40] gnu: netdde: Support the 64bit Hurd Janneke Nieuwenhuizen
                     ` (17 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/packages/hurd.scm (netdde): Update to
c0ef248dc7c5ccc1273e2a796f3ece30c5b645df.
(dde-sources): Update to b6c8526c703f3ba76294d9002f195c63897ec661.

Change-Id: Id03f5c5124f16e9ffd6a77cbb2507d274e0f325a
---
 gnu/packages/hurd.scm | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 06fae1bd3b..f9d8b28b8c 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -294,7 +294,7 @@ (define unifont
 
 (define dde-sources
   ;; This is the current tip of the dde branch
-  (let ((commit "066797b576ebf8364ad157f50bef2a655597deeb"))
+  (let ((commit "b6c8526c703f3ba76294d9002f195c63897ec661"))
     (origin
       (method git-fetch)
       (uri (git-reference
@@ -302,7 +302,7 @@ (define dde-sources
             (commit commit)))
       (sha256
        (base32
-        "19f2awlfnar5gyhi0w5zawla5brzck2s88iv0f20022pd1l5v9hl"))
+        "0k1ilj8ghli8x43xaksbc4y419pqh0w16k374914c07svq419bbr"))
       (file-name (git-file-name "dde" (string-take commit 7))))))
 
 (define %import-from-dde
@@ -561,8 +561,8 @@ (define-public hurd
     (license gpl2+)))
 
 (define-public netdde
-  (let ((commit "e67c284ac113d939b10b4578334f27dab29d5b08")
-        (revision "2"))
+  (let ((commit "c0ef248dc7c5ccc1273e2a796f3ece30c5b645df")
+        (revision "3"))
     (package
       (name "netdde")
       ;; The version prefix corresponds to the version of Linux from which the
@@ -576,7 +576,7 @@ (define-public netdde
                 (patches (list (search-patch "netdde-build-fix.patch")))
                 (sha256
                  (base32
-                  "0vnkls7sr7srzib5mnw6gybzl5qa8c5a4zf3h08w6gdr7zqbndh0"))
+                  "070fpmd4nvn3mp8dj9w4if63iwz7j2m0h6ywq888znw70wlrc6sh"))
                 (file-name (git-file-name name commit))))
       (build-system gnu-build-system)
       (arguments
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 23/40] gnu: netdde: Support the 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (21 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 22/40] gnu: netdde: Update to c0ef248dc7c5ccc1273e2a796f3ece30c5b645df Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 24/40] gnu: rumpkernel: Update to f1ffd6405f225336e595a0f99f01095ed7438337 Janneke Nieuwenhuizen
                     ` (16 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/packages/patches/netdde-csum.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/hurd.scm (netdde)[source]: Use it.
[arguments]: Do not assume x86, rather use actual ARCH in #:make-flags,
disable -Wstrict-prototypes and -Wint-conversion, and follow upstream's
"amd64" symlinking voodoo.

Change-Id: Ie825e56779dae2f489066569dc3c4405bac778c1
---
 gnu/local.mk                           |  1 +
 gnu/packages/hurd.scm                  | 22 ++++++++++++++++++++--
 gnu/packages/patches/netdde-csum.patch | 18 ++++++++++++++++++
 3 files changed, 39 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/netdde-csum.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 8c4f052b75..073a95a556 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1818,6 +1818,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/ncftp-reproducible.patch			\
   %D%/packages/patches/netcdf-date-time.patch			\
   %D%/packages/patches/netdde-build-fix.patch			\
+  %D%/packages/patches/netdde-csum.patch			\
   %D%/packages/patches/netpbm-CVE-2017-2586.patch		\
   %D%/packages/patches/netpbm-CVE-2017-2587.patch		\
   %D%/packages/patches/netsurf-message-timestamp.patch		\
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index f9d8b28b8c..973564ee33 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -573,7 +573,8 @@ (define-public netdde
                 (uri (git-reference
                       (url "https://git.savannah.gnu.org/git/hurd/incubator.git")
                       (commit commit)))
-                (patches (list (search-patch "netdde-build-fix.patch")))
+                (patches (search-patches "netdde-build-fix.patch"
+                                         "netdde-csum.patch"))
                 (sha256
                  (base32
                   "070fpmd4nvn3mp8dj9w4if63iwz7j2m0h6ywq888znw70wlrc6sh"))
@@ -586,7 +587,13 @@ (define-public netdde
                               (search-input-file %build-inputs "/bin/bash"))
                "PKGDIR=libdde_linux26"
                (string-append "CC=" ,(cc-for-target))
-               "ARCH=x86")
+               (let ((arch ,(match (or (%current-target-system)
+                                       (%current-system))
+                              ((? target-x86-32?)
+                               "x86")
+                              ((? target-x86-64?)
+                               "amd64"))))
+                 (string-append "ARCH=" arch)))
          #:configure-flags
          ,#~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
          #:phases
@@ -604,8 +611,19 @@ (define-public netdde
                  (("/bin/bash") (which "bash")))))
            (add-after 'patch-generated-file-shebangs 'build-libdde-linux26
              (lambda* (#:key make-flags #:allow-other-keys)
+               (when ,(target-hurd64?)
+                 (let ((dir "libdde_linux26/build/include"))
+                   (mkdir-p (string-append dir "/x86"))
+                   (format #t "symlink ~a -> ~a\n"
+                           (string-append dir "/x86/amd64") "x86")
+                   (symlink "x86" (string-append dir "/amd64"))
+                   (format #t "symlink ~a -> ~a\n"
+                           (string-append dir "/amd64/asm-x86_64") "asm-x86")
+                   (symlink "asm-x86" (string-append dir "/amd64/asm-x86_64"))))
                (with-directory-excursion "libdde_linux26"
                  (apply invoke "make"
+                        (string-append "WARNINGS=-Wno-strict-prototypes"
+                                       " -Wno-int-conversion")
                         (delete "PKGDIR=libdde_linux26" make-flags)))))
            (add-after 'build-libdde-linux26 'convert
              (lambda* (#:key make-flags #:allow-other-keys)
diff --git a/gnu/packages/patches/netdde-csum.patch b/gnu/packages/patches/netdde-csum.patch
new file mode 100644
index 0000000000..4fdd004898
--- /dev/null
+++ b/gnu/packages/patches/netdde-csum.patch
@@ -0,0 +1,18 @@
+Upstream-status: Taken from debian.
+
+<https://salsa.debian.org/hurd-team/netdde/raw/master/debian/patches/csum>.
+
+---
+ linux/drivers/net/vmxnet3/vmxnet3_drv.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/linux/drivers/net/vmxnet3/vmxnet3_drv.c
++++ b/linux/drivers/net/vmxnet3/vmxnet3_drv.c
+@@ -25,6 +25,7 @@
+  */
+ 
+ #include "vmxnet3_int.h"
++#include <net/ip6_checksum.h>
+ 
+ char vmxnet3_driver_name[] = "vmxnet3";
+ #define VMXNET3_DRIVER_DESC "VMware vmxnet3 virtual NIC driver"
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 24/40] gnu: rumpkernel: Update to f1ffd6405f225336e595a0f99f01095ed7438337.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (22 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 23/40] gnu: netdde: Support the 64bit Hurd Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 25/40] gnu: rumpkernel: Support the 64bit Hurd Janneke Nieuwenhuizen
                     ` (15 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/packages/hurd.scm (rumpkernel): Update to
f1ffd6405f225336e595a0f99f01095ed7438337.
[arguments]: In stage "build", add "-Wno-error=sign-compare" to CWARNFLAGS.

Change-Id: I8936377da726681b748cc010e1fbae3fb19dee05
---
 gnu/packages/hurd.scm | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 973564ee33..b156fcea4c 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -665,8 +665,8 @@ (define-public netdde
       (license gpl2))))
 
 (define-public rumpkernel
-  (let ((commit "81043d42fabda9baed7ac9ca36e3f3f5ed11ba81")
-        (revision "3"))
+  (let ((commit "f1ffd6405f225336e595a0f99f01095ed7438337")
+        (revision "0"))
     (package
       (name "rumpkernel")
       (version (git-version "0-20211031" revision commit))
@@ -680,7 +680,7 @@ (define-public rumpkernel
                       (commit commit)))
                 (sha256
                  (base32
-                  "0fv0k52qqcg3nq9012hibgsamvsd7mnvn2ikdasmzjhsp8qh5q3r"))
+                  "1ygn3ysji06ik3k44sf906fjpdmabznkspw70llldbk2zkrcdw7i"))
                 (file-name (git-file-name name version))))
       (build-system gnu-build-system)
       (arguments
@@ -800,7 +800,8 @@ (define-public rumpkernel
                            " -Wno-error=stack-protector"
                            " -Wno-error=array-parameter"
                            " -Wno-error=array-bounds"
-                           " -Wno-error=stringop-overflow")
+                           " -Wno-error=stringop-overflow"
+                           " -Wno-error=sign-compare")
                      "-V" "LIBCRTBEGIN="
                      "-V" "LIBCRTEND="
                      "-V" "LIBCRT0="
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 25/40] gnu: rumpkernel: Support the 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (23 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 24/40] gnu: rumpkernel: Update to f1ffd6405f225336e595a0f99f01095ed7438337 Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 26/40] gnu: hurd: Build fixes for " Janneke Nieuwenhuizen
                     ` (14 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/packages/hurd.scm (rumpkernel)[argument]: In stage "build", follow
Debian upstream to use -DPAE disable the DTRACE and ZFS builds.

Change-Id: I534da31eefb378c72b4896d64a51a73109e38aa6
---
 gnu/packages/hurd.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index b156fcea4c..d29ec22cd7 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -781,6 +781,9 @@ (define-public rumpkernel
                      "-V" "MKBINUTILS=no"
                      "-V" "MKGDB=no"
                      "-V" "MKGROFF=no"
+                     "-V" "MKDTRACE=no"
+                     "-V" "MKZFS=no"
+
                      "-V" (string-append "TOPRUMP=" toprump)
                      "-V" "BUILDRUMP_CPPFLAGS=-Wno-error=stringop-overread"
                      "-V" "RUMPUSER_EXTERNAL_DPLIBS=pthread"
@@ -791,7 +794,8 @@ (define-public rumpkernel
                            " -DRUMP_REGISTER_T=int"
                            " -DRUMPUSER_CONFIG=yes"
                            " -DNO_PCI_MSI_MSIX=yes"
-                           " -DNUSB_DMA=1")
+                           " -DNUSB_DMA=1"
+                           " -DPAE")
                      "-V" (string-append
                            "CWARNFLAGS="
                            " -Wno-error=maybe-uninitialized"
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 26/40] gnu: hurd: Build fixes for the 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (24 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 25/40] gnu: rumpkernel: Support the 64bit Hurd Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 27/40] gnu: git-minimal: Support " Janneke Nieuwenhuizen
                     ` (13 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/packages/patches/hurd-64bit.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/hurd.scm (hurd)[source]: Use it.
[arguments]: When building for the 64bit Hurd, add "create-machine-symlink"
phase.  In phases "build-libdde-linux" and "install-goodies", do not assume
x86, rather use actual ARCH, disable -Wstrict-prototypes and -Wint-conversion,
and follow upstream's "amd64" symlinking voodoo.

Change-Id: If264a91b2433add13f9121c482f0abe67ae5f1e9
---
 gnu/local.mk                          |   1 +
 gnu/packages/hurd.scm                 | 115 +++++++++++++++++---------
 gnu/packages/patches/hurd-64bit.patch |  56 +++++++++++++
 3 files changed, 131 insertions(+), 41 deletions(-)
 create mode 100644 gnu/packages/patches/hurd-64bit.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 073a95a556..948fc4ba73 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1546,6 +1546,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/htslib-for-stringtie.patch		\
   %D%/packages/patches/hubbub-sort-entities.patch		\
   %D%/packages/patches/hueplusplus-mbedtls.patch		\
+  %D%/packages/patches/hurd-64bit.patch				\
   %D%/packages/patches/hurd-rumpdisk-no-hd.patch		\
   %D%/packages/patches/hurd-startup.patch			\
   %D%/packages/patches/hwloc-1-test-btrfs.patch			\
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index d29ec22cd7..7aed0ebe1d 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -317,7 +317,8 @@ (define-public hurd
     (source (origin
               (inherit (package-source hurd-headers))
               (patches (search-patches "hurd-rumpdisk-no-hd.patch"
-                                       "hurd-startup.patch"))))
+                                       "hurd-startup.patch"
+                                       "hurd-64bit.patch"))))
     (version (package-version hurd-headers))
     (arguments
      `(#:tests? #f                      ;no "check" target
@@ -467,48 +468,80 @@ (define-public hurd
                          (find-files (string-append out "/libexec")))
                #t)))
          (add-after 'build 'build-libdde-linux
-           (lambda* (#:key inputs native-inputs #:allow-other-keys)
-             (invoke (string-append (assoc-ref (or native-inputs inputs) "make")
-                                    "/bin/make")
-                     ;; XXX There can be a race condition because subdirs
-                     ;; aren't interdependent targets in the Makefile.
-                     "-j1" "-C" "libdde_linux26"
-                     (string-append "SHELL="
-                                    (assoc-ref (or native-inputs inputs) "bash")
-                                    "/bin/bash")
-                     (string-append "CC="
-                                    ,(cc-for-target))
-                     "ARCH=x86")))
+          (lambda* (#:key inputs native-inputs #:allow-other-keys)
+            (let ((arch ,(match (or (%current-target-system)
+                                    (%current-system))
+                           ((? target-x86-32?)
+                            "x86")
+                           ((? target-x86-64?)
+                            "amd64"))))
+              (when ,(target-hurd64?)
+                (let ((dir "libdde_linux26/build/include"))
+                  (mkdir-p (string-append dir "/x86"))
+                  (format #t "symlink ~a -> ~a\n"
+                          (string-append dir "/x86/amd64") "x86")
+                  (symlink "x86" (string-append dir "/amd64"))
+                  (format #t "symlink ~a -> ~a\n"
+                          (string-append dir "/amd64/asm-x86_64") "asm-x86")
+                  (symlink "asm-x86" (string-append dir "/amd64/asm-x86_64"))))
+              (invoke (string-append (assoc-ref (or native-inputs inputs) "make")
+                                     "/bin/make")
+                      ;; XXX There can be a race condition because subdirs
+                      ;; aren't interdependent targets in the Makefile.
+                      "-j1" "-C" "libdde_linux26"
+                      (string-append "SHELL="
+                                     (assoc-ref (or native-inputs inputs) "bash")
+                                     "/bin/bash")
+                      (string-append "CC="
+                                     ,(cc-for-target))
+                      (string-append "WARNINGS=-Wno-int-conversion"
+                                     " -Wno-strict-prototypes")
+                      (string-append "ARCH=" arch)))))
          (add-after 'install 'install-goodies
-           (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
-             ;; Install additional goodies.
-             ;; TODO: Build & install *.msgids for rpctrace.
-             (let* ((out (assoc-ref outputs "out"))
-                    (datadir (string-append out "/share/hurd")))
-               ;; Install libdde_linux26.
-               (invoke (string-append (assoc-ref (or native-inputs inputs) "make")
-                                      "/bin/make")
-                       "-C" "libdde_linux26" "install"
-                       (string-append "SHELL="
-                                      (assoc-ref (or native-inputs inputs) "bash")
-                                      "/bin/bash")
-                       (string-append "INSTALLDIR="
-                                      out
-                                      "/share/libdde_linux26/build/include")
-                       "ARCH=x86")
-               ;; Install the fancy UTF-8 motd.
-               (mkdir-p (string-append out "/etc"))
-               (copy-file "console/motd.UTF8"
-                          (string-append out "/etc/motd"))
+          (lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
+            ;; Install additional goodies.
+            ;; TODO: Build & install *.msgids for rpctrace.
+            (let* ((out (assoc-ref outputs "out"))
+                   (datadir (string-append out "/share/hurd"))
+                   (arch ,(match (or (%current-target-system)
+                                     (%current-system))
+                            ((? target-x86-32?)
+                             "x86")
+                            ((? target-x86-64?)
+                             "amd64")))
+                   (dir (string-append out "/share/libdde_linux26/build/include")))
+              (mkdir-p dir)
+              (when ,(target-hurd64?)
+                (mkdir-p (string-append dir "/amd64"))
+                (format #t "symlink ~a -> ~a\n"
+                        (string-append dir "/amd64/asm-x86_64")
+                        "x86")
+                (symlink "x86" (string-append dir "/amd46")))
+              (invoke (string-append (assoc-ref (or native-inputs inputs) "make")
+                                     "/bin/make")
+                      "-C" "libdde_linux26" "install"
+                      (string-append "SHELL="
+                                     (assoc-ref (or native-inputs inputs) "bash")
+                                     "/bin/bash")
+                      (string-append "INSTALLDIR=" dir)
+                      (string-append "ARCH=" arch))
+              (when ,(target-hurd64?)
+                (format #t "symlink ~a -> ~a\n"
+                        (string-append dir "/amd64/asm-x86_64")
+                        "asm-x86")
+                (symlink "asm-x86" (string-append dir "/amd64/asm-x86_64")))
+              ;; Install the fancy UTF-8 motd.
+              (mkdir-p (string-append out "/etc"))
+              (copy-file "console/motd.UTF8"
+                         (string-append out "/etc/motd"))
 
-               ;; Install the BDF font for use by the console client.
-               (copy-file (assoc-ref inputs "unifont")
-                          "unifont.gz")
-               (invoke "gunzip" "unifont.gz")
-               (mkdir-p datadir)
-               (copy-file "unifont"
-                          (string-append datadir "/vga-system.bdf"))
-               #t))))
+              ;; Install the BDF font for use by the console client.
+              (copy-file (assoc-ref inputs "unifont")
+                         "unifont.gz")
+              (invoke "gunzip" "unifont.gz")
+              (mkdir-p datadir)
+              (copy-file "unifont"
+                         (string-append datadir "/vga-system.bdf"))))))
        #:configure-flags
        ,#~(list (string-append "LDFLAGS=-Wl,-rpath="
                                #$output "/lib")
diff --git a/gnu/packages/patches/hurd-64bit.patch b/gnu/packages/patches/hurd-64bit.patch
new file mode 100644
index 0000000000..643550ad68
--- /dev/null
+++ b/gnu/packages/patches/hurd-64bit.patch
@@ -0,0 +1,56 @@
+Upstream-status: Taken from upstream:
+    <https://git.savannah.gnu.org/cgit/hurd/hurd.git/commit/?id=d494333e7607ea03819adcfb69d89f8248ec2044>.
+
+From d494333e7607ea03819adcfb69d89f8248ec2044 Mon Sep 17 00:00:00 2001
+From: Flavio Cruz <flaviocruz@gmail.com>
+Date: Sun, 21 Jul 2024 17:20:55 -0400
+Subject: [PATCH] nfsd: fix -Werror=incompatible-pointer-types issues for
+ x86_64
+Content-Transfer-Encoding: 8bit
+Content-Type: text/plain; charset=UTF-8
+
+Message-ID: <3pmgbk2myx4phdb6wcso54solmybulrvbytols5md3nri2p2qp@xjmfmpvwjp6t>
+---
+ nfsd/cache.c | 2 +-
+ nfsd/ops.c   | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/nfsd/cache.c b/nfsd/cache.c
+index cd5524af..864739c0 100644
+--- a/nfsd/cache.c
++++ b/nfsd/cache.c
+@@ -387,7 +387,7 @@ create_cached_handle (int fs, struct cache_handle *credc, file_t userport)
+   struct cache_handle *c;
+   int hash;
+   char *bp = fhandle.array + sizeof (int);
+-  size_t handlelen = NFS2_FHSIZE - sizeof (int);
++  mach_msg_type_number_t handlelen = NFS2_FHSIZE - sizeof (int);
+   mach_port_t newport, ref;
+ 
+   /* Authenticate USERPORT so that we can call file_getfh on it.  */
+diff --git a/nfsd/ops.c b/nfsd/ops.c
+index 463a9c87..64e94b93 100644
+--- a/nfsd/ops.c
++++ b/nfsd/ops.c
+@@ -292,7 +292,7 @@ op_write (struct cache_handle *c,
+   off_t offset;
+   size_t count;
+   error_t err;
+-  mach_msg_type_number_t amt;
++  vm_size_t amt;
+   char *bp;
+   struct stat st;
+ 
+@@ -583,7 +583,7 @@ op_readdir (struct cache_handle *c,
+   error_t err;
+   char *buf;
+   struct dirent *dp;
+-  size_t bufsize;
++  mach_msg_type_number_t bufsize;
+   int nentries;
+   int i;
+   int *replystart;
+-- 
+Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
+Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
+
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 27/40] gnu: git-minimal: Support the 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (25 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 26/40] gnu: hurd: Build fixes for " Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 28/40] gnu: inetutils: Fix build for " Janneke Nieuwenhuizen
                     ` (12 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/packages/version-control.scm (git-minimal)[arguments]: When using gcc >=
14, use "-Wno-implicit-function-declaration" in #:make-flags.
Use target-hurd? instead of comparing with "i586-pc-gnu" in "use-host-uname_S"
phase.

Change-Id: Ib9836be8a1e389a82c8a89adf22aaeac0d85bd14
---
 gnu/packages/version-control.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index c892a83a98..325b7ca8d8 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -113,6 +113,7 @@ (define-module (gnu packages version-control)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gawk)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
@@ -296,7 +297,10 @@ (define-public git-minimal
               ;; By default 'make install' creates hard links for
               ;; things in 'libexec/git-core', which leads to huge
               ;; nars; see <https://bugs.gnu.org/21949>.
-              "NO_INSTALL_HARDLINKS=indeed")
+              "NO_INSTALL_HARDLINKS=indeed"
+              #$@(if (version>=? (package-version (current-gcc)) "14")
+                     #~("-Wno-implicit-function-declaration")
+                     #~()))
       #:phases
       #~(modify-phases %standard-phases
           #$@(if (%current-target-system)
@@ -305,7 +309,7 @@ (define-public git-minimal
                       (lambda _
                         (substitute* "config.mak.uname"
                           (("uname_S := .*" all)
-                           (if (equal? #$(%current-target-system) "i586-pc-gnu")
+                           (if #$(target-hurd?)
                                "uname_S := GNU\n"
                                all))))))
                  ;; We do not have a full bash when cross-compiling.
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 28/40] gnu: inetutils: Fix build for the 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (26 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 27/40] gnu: git-minimal: Support " Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 29/40] gnu: grub: " Janneke Nieuwenhuizen
                     ` (11 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290; +Cc: Ricardo Wurmus

* gnu/packages/patches/inetutils-hurd64.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/admin.scm (inetutils)[arguments]: When building for the 64bit
Hurd, use it in new "apply-hurd64-patch" stage.

Change-Id: I780f6a92418b49e5fe0d23eb1c90e155216f1428
---
 gnu/local.mk                                |  1 +
 gnu/packages/admin.scm                      | 14 ++++-
 gnu/packages/patches/inetutils-hurd64.patch | 65 +++++++++++++++++++++
 3 files changed, 78 insertions(+), 2 deletions(-)
 create mode 100644 gnu/packages/patches/inetutils-hurd64.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 948fc4ba73..0759555494 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1570,6 +1570,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/indent-CVE-2024-0911.patch	\
   %D%/packages/patches/instead-use-games-path.patch		\
   %D%/packages/patches/intltool-perl-compatibility.patch	\
+  %D%/packages/patches/inetutils-hurd64.patch			\
   %D%/packages/patches/irrlicht-use-system-libs.patch		\
   %D%/packages/patches/irrlicht-link-against-needed-libs.patch	\
   %D%/packages/patches/isl-0.11.1-aarch64-support.patch	\
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 9c765b51a9..311d613b68 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -31,7 +31,7 @@
 ;;; Copyright © 2019, 2021, 2022 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2019, 2020, 2021 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
-;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2020, 2021, 2022 Michael Rohleder <mike@rohleder.de>
 ;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
 ;;; Copyright © 2020 Morgan Smith <Morgan.J.Smith@outlook.com>
@@ -1044,7 +1044,17 @@ (define-public inetutils
                              "\\\""))
       ;; On some systems, 'libls.sh' may fail with an error such as:
       ;; "Failed to tell switch -a apart from -A".
-      #:parallel-tests? #f))
+      #:parallel-tests? #f
+      #:phases (if (target-hurd64?)
+                   #~(modify-phases %standard-phases
+                       (add-after 'unpack 'apply-hurd64-patch
+                         (lambda _
+                           (let ((patch
+                                  #$(local-file
+                                     (search-patch
+                                      "inetutils-hurd64.patch"))))
+                             (invoke "patch" "--force" "-p1" "-i" patch)))))
+                   #~%standard-phases)))
     (inputs
      (list coreutils
            shadow                     ;for login (used in telnetd and rlogind)
diff --git a/gnu/packages/patches/inetutils-hurd64.patch b/gnu/packages/patches/inetutils-hurd64.patch
new file mode 100644
index 0000000000..3fb238bcdc
--- /dev/null
+++ b/gnu/packages/patches/inetutils-hurd64.patch
@@ -0,0 +1,65 @@
+Upstream-status: Not presented upstream.
+
+From 0804e655a7abfd22dc3a053f03fab8f811405f84 Mon Sep 17 00:00:00 2001
+From: Janneke Nieuwenhuizen <janneke@gnu.org>
+Date: Fri, 8 Nov 2024 11:07:56 +0100
+Subject: [PATCH] ifconfig hurd: Build fix for the 64bit HUrd.
+Content-Transfer-Encoding: 8bit
+Content-Type: text/plain; charset=UTF-8
+
+* ifconfig/system/hurd.c (check_driving): Use mach_msg_type_number_t
+instead of size_t for file_get_fs_options.
+---
+ ifconfig/system/hurd.c | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/ifconfig/system/hurd.c b/ifconfig/system/hurd.c
+index 70b2ed27..86fe6375 100644
+--- a/ifconfig/system/hurd.c
++++ b/ifconfig/system/hurd.c
+@@ -47,7 +47,7 @@ check_driving (const char *name)
+   error_t err;
+ 
+   char *argz = 0, *new_argz = 0;
+-  size_t argz_len = 0;
++  mach_msg_type_number_t argz_len = 0;
+   char *entry = 0;
+   const char *socket = _SERVERS_SOCKET "/2";
+ 
+@@ -106,7 +106,9 @@ check_driving (const char *name)
+   new_argz = malloc (argz_len);
+   memcpy (new_argz, argz, argz_len);
+ 
+-  err = argz_insert (&new_argz, &argz_len, new_argz, name);
++  size_t new_argz_len = 0;
++
++  err = argz_insert (&new_argz, &new_argz_len, new_argz, name);
+   if (err)
+     {
+       error (0, err, "Could not prepend name %s to '%s' for %s", name,
+@@ -114,7 +116,7 @@ check_driving (const char *name)
+       goto out;
+     }
+ 
+-  err = argz_insert (&new_argz, &argz_len, new_argz, "-i");
++  err = argz_insert (&new_argz, &new_argz_len, new_argz, "-i");
+   if (err)
+     {
+       argz_stringify (new_argz, argz_len, ' ');
+@@ -122,10 +124,10 @@ check_driving (const char *name)
+       goto out;
+     }
+ 
+-  err = fsys_set_options (fsys, new_argz, argz_len, 1);
++  err = fsys_set_options (fsys, new_argz, new_argz_len, 1);
+   if (err)
+     {
+-      argz_stringify (new_argz, argz_len, ' ');
++      argz_stringify (new_argz, new_argz_len, ' ');
+       error (0, err, "Could not make pfinet %s drive %s with '%s'", socket,
+ 	     name, new_argz);
+       goto out;
+-- 
+Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
+Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
+
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 29/40] gnu: grub: Fix build for the 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (27 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 28/40] gnu: inetutils: Fix build for " Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 30/40] gnu: guile-fibers: " Janneke Nieuwenhuizen
                     ` (10 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290; +Cc: Efraim Flashner, Vagrant Cascadian

* gnu/packages/patches/grub-hurd64.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/bootloaders.scm (grub)[arguments]: When building for the 64bit
Hurd, use it in new "apply-hurd64-patch" stage.

Change-Id: I780f6a92418b49e5fe0d23eb1c90e155216f1428
---
 gnu/local.mk                           |  1 +
 gnu/packages/bootloaders.scm           |  8 +++++++
 gnu/packages/patches/grub-hurd64.patch | 32 ++++++++++++++++++++++++++
 3 files changed, 41 insertions(+)
 create mode 100644 gnu/packages/patches/grub-hurd64.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 0759555494..2b8a8d7065 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1488,6 +1488,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gromacs-tinyxml2.patch			\
   %D%/packages/patches/groovy-add-exceptionutilsgenerator.patch	\
   %D%/packages/patches/grub-efi-fat-serial-number.patch		\
+  %D%/packages/patches/grub-hurd64.patch			\
   %D%/packages/patches/grub-setup-root.patch			\
   %D%/packages/patches/guile-1.8-cpp-4.5.patch			\
   %D%/packages/patches/guile-2.2-skip-oom-test.patch            \
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index e188553910..caec26edc7 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -192,6 +192,14 @@ (define-public grub
                        (setenv "BUILD_FREETYPE_CFLAGS"
                                (string-append "-I" freetype
                                               "/include/freetype2"))))))
+               #$@(if (target-hurd64?)
+                      #~((add-after 'unpack 'apply-hurd64-patch
+                           (lambda _
+                             (let ((patch
+                                    #$(local-file
+                                       (search-patch "grub-hurd64.patch"))))
+                               (invoke "patch" "--force" "-p1" "-i" patch)))))
+                      #~())
                (add-before 'check 'disable-flaky-test
                  (lambda _
                    ;; This test is unreliable. For more information, see:
diff --git a/gnu/packages/patches/grub-hurd64.patch b/gnu/packages/patches/grub-hurd64.patch
new file mode 100644
index 0000000000..d5acd99eb8
--- /dev/null
+++ b/gnu/packages/patches/grub-hurd64.patch
@@ -0,0 +1,32 @@
+Upstream-status: Not presented upstream.
+
+From a4eb7d1f2cbd02132a9f5512f1294182576d4653 Mon Sep 17 00:00:00 2001
+From: Janneke Nieuwenhuizen <janneke@gnu.org>
+Date: Fri, 8 Nov 2024 11:47:49 +0100
+Subject: [PATCH] osdep/hurd: Support the 64bit Hurd.
+Content-Transfer-Encoding: 8bit
+Content-Type: text/plain; charset=UTF-8
+
+* grub-core/osdep/hurd/getroot.c (grub_util_find_hurd_root_device):
+Use mach_msg_type_number_t instead of size_t.
+---
+ grub-core/osdep/hurd/getroot.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/grub-core/osdep/hurd/getroot.c b/grub-core/osdep/hurd/getroot.c
+index 0efefdab4..b849700e6 100644
+--- a/grub-core/osdep/hurd/getroot.c
++++ b/grub-core/osdep/hurd/getroot.c
+@@ -58,7 +58,7 @@ grub_util_find_hurd_root_device (const char *path)
+   file_t file;
+   error_t err;
+   char *argz = NULL, *name = NULL, *ret;
+-  size_t argz_len = 0;
++  mach_msg_type_number_t argz_len = 0;
+   int i;
+ 
+   file = file_name_lookup (path, 0, 0);
+-- 
+Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
+Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
+
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 30/40] gnu: guile-fibers: Fix build for the 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (28 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 29/40] gnu: grub: " Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 31/40] gnu: m4: " Janneke Nieuwenhuizen
                     ` (9 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/packages/guile-xyz.scm (guile-fibers)[arguments]: Also modify phases for
the 64bit Hurd.

Change-Id: I780f6a92418b49e5fe0d23eb1c90e155216f1428
---
 gnu/packages/guile-xyz.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index ea192c2c03..a874ab908d 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -855,7 +855,7 @@ (define-public guile-fibers
      (list #:make-flags
            #~(list "GUILE_AUTO_COMPILE=0")
            #:phases
-           (if (target-x86-64?)
+           (if (and (target-x86-64?) (not (target-hurd?)))
                #~%standard-phases
                #~(modify-phases %standard-phases
                    (add-before 'check 'disable-some-tests
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 31/40] gnu: m4: Fix build for the 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (29 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 30/40] gnu: guile-fibers: " Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 32/40] gnu: commencement: gnumach-headers-boot0: Update to 1.8+git20240714 Janneke Nieuwenhuizen
                     ` (8 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/packages/base.scm (grep)[arguments]: When building for the 64bit Hurd,
add patch-sigsegv.h stage.

Change-Id: I82993ebde268867348893556a9476faa5c4e9453
---
 gnu/packages/m4.scm | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/m4.scm b/gnu/packages/m4.scm
index 39b50b6800..081304db34 100644
--- a/gnu/packages/m4.scm
+++ b/gnu/packages/m4.scm
@@ -2,7 +2,7 @@
 ;;; Copyright © 2012, 2013, 2015 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2022 Marius Bakke <marius@gnu.org>
-;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -64,6 +64,13 @@ (define-public m4
                       (("(^| )main *\\(.*" all)
                        (string-append all "{\n  exit (77);//"))))))
               '())
+        ,@(if (target-hurd64?)
+              '((add-after 'unpack 'patch-sigsegv
+                  (lambda _
+                    ;; Stack overflow recovery does not compile
+                    (substitute* "lib/sigsegv.in.h"
+                      (("__GNU__") "__XGNU__")))))
+              '())
         (add-after 'unpack 'configure-shell
           (lambda* (#:key native-inputs inputs #:allow-other-keys)
             (let ((/bin/sh (search-input-file (or native-inputs inputs)
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 32/40] gnu: commencement: gnumach-headers-boot0: Update to 1.8+git20240714.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (30 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 31/40] gnu: m4: " Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 33/40] gnu: commencement: mig-boot0: Update to 1.8+git20231217 Janneke Nieuwenhuizen
                     ` (7 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290; +Cc: Andreas Enge, Efraim Flashner, Ekaitz Zarraga,
	Ludovic Courtès

* gnu/packages/commencement.scm (gnumach-headers-boot0): Update to
1.8+git20240714.

Change-Id: If30d7b4a688070d70741173c97a60284ca8299ef
---
 gnu/packages/commencement.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index a000cbfdc5..a8d48fbb93 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2636,7 +2636,7 @@ (define gnumach-headers-boot0
    (package
      (inherit gnumach-headers)
      (name "gnumach-headers-boot0")
-     (version "1.8+git20230410")
+     (version "1.8+git20240714")
      (source
       (origin
         (inherit (package-source gnumach-headers))
@@ -2650,7 +2650,7 @@ (define gnumach-headers-boot0
                   "gnumach-" version ".tar.gz"))
             (sha256
              (base32
-              "1s09256g2ny46idrn8frzs7r51la9ni45bmglmswlsmz9ii7dpi4")))))))
+              "1bnw5vdbq91zjxklx23qvim40fb0yw1qdxhn9n37jdfypm6q3xir")))))))
      (native-inputs (list autoconf-boot0 automake-boot0 texinfo-boot0))
      (arguments
       (substitute-keyword-arguments (package-arguments gnumach-headers)
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 33/40] gnu: commencement: mig-boot0: Update to 1.8+git20231217..
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (31 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 32/40] gnu: commencement: gnumach-headers-boot0: Update to 1.8+git20240714 Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 34/40] gnu: commencement: hurd-headers-boot0: Update to 0.9.git20240714 Janneke Nieuwenhuizen
                     ` (6 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290; +Cc: Andreas Enge, Efraim Flashner, Ekaitz Zarraga,
	Ludovic Courtès

* gnu/packages/commencement.scm (mig-boot0): Update to 1.8+git20231217.

Change-Id: I591ff7cb84ac1e567d49f51eb40be19fa6b15f5b
---
 gnu/packages/commencement.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index a8d48fbb93..faa4c903e4 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2671,7 +2671,7 @@ (define mig-boot0
    (package
      (inherit mig)
      (name "mig-boot0")
-     (version "1.8+git20230520")
+     (version "1.8+git20231217")
      (source
       (origin
         (inherit (package-source mig))
@@ -2684,7 +2684,7 @@ (define mig-boot0
                   "mig-" version ".tar.gz"))
             (sha256
              (base32
-              "1l1vfm4wap5yxylv91wssgpy7fnq22wp3akgd5nv995kychfa9jy")))))))
+              "18vz3ifrhhlvrdmlv70h63wl0kh5w8jcpsjx9yscsw9yazm1lzs7")))))))
      (native-inputs (list autoconf-boot0 automake-boot0 bison-boot0 flex-boot0
                           gnumach-headers-boot0))
      (inputs (list flex-boot0 gnumach-headers-boot0))
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 34/40] gnu: commencement: hurd-headers-boot0: Update to 0.9.git20240714.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (32 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 33/40] gnu: commencement: mig-boot0: Update to 1.8+git20231217 Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 35/40] gnu: commencement: libstdc++-boot0-gcc7: Replace by make-libstdc++-boot0 Janneke Nieuwenhuizen
                     ` (5 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290; +Cc: Andreas Enge, Efraim Flashner, Ekaitz Zarraga,
	Ludovic Courtès

* gnu/packages/commencement.scm (hurd-headers-boot0): Update to
0.9.git20240714.

Change-Id: Ib3edaa3adb9cfe4cb8c5a3af83cb2701ee9dda1b
---
 gnu/packages/commencement.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index faa4c903e4..aad3f523b5 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2700,7 +2700,7 @@ (define hurd-headers-boot0
    (package
      (inherit hurd-headers)
      (name "hurd-headers-boot0")
-     (version "0.9.git20230520")
+     (version "0.9.git20240714")
      (source
       (origin
         (inherit (package-source hurd-headers))
@@ -2713,7 +2713,7 @@ (define hurd-headers-boot0
                   "hurd-v" version ".tar.gz"))
             (sha256
              (base32
-              "0ybmx7bhy21zv1if2hfdspn13zn68vki1na72sw2jj87gj8przna")))))))
+              "0wcihffclwijjamx4cjbr8i92yg780538ipg2z208ahg96jjrmgq")))))))
      (native-inputs
       (list autoconf-boot0 automake-boot0 mig-boot0))
      (inputs '()))))
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 35/40] gnu: commencement: libstdc++-boot0-gcc7: Replace by make-libstdc++-boot0.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (33 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 34/40] gnu: commencement: hurd-headers-boot0: Update to 0.9.git20240714 Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 36/40] gnu: gettext: Fix cross-build shebangs Janneke Nieuwenhuizen
                     ` (4 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290; +Cc: Andreas Enge, Efraim Flashner, Ekaitz Zarraga,
	Ludovic Courtès

* gnu/packages/commencement.scm (libstdc++-boot0-gcc7): Change variable to...
(make-libstdc++-boot0): ...this new procedure and update accordingly.
(gcc-boot0): Update accordingly, and cater for x86_64-gnu.

Change-Id: Ib0bc84e4dab90b080e5a01e6ab932f8be456c656
---
 gnu/packages/commencement.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index aad3f523b5..b2558c0d54 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2274,9 +2274,9 @@ (define libstdc++-boot0
       (inputs (%boot0-inputs))
       (native-inputs '()))))
 
-(define libstdc++-boot0-gcc7
+(define (make-libstdc++-boot0 gcc)
   ;; GCC >= 7 is needed by architectures which use C++-14 features.
-  (let ((lib (make-libstdc++ gcc-7)))
+  (let ((lib (make-libstdc++ gcc)))
     (package
       (inherit lib)
       (source (bootstrap-origin (package-source lib)))
@@ -2447,7 +2447,8 @@ (define gcc-boot0
 
               ;; The libstdc++ that libcc1 links against.
               ("libstdc++" ,(match (%current-system)
-                                   ("riscv64-linux" libstdc++-boot0-gcc7)
+                                   ("riscv64-linux" (make-libstdc++-boot0 gcc-7))
+                                   ("x86_64-gnu" (make-libstdc++-boot0 gcc-14))
                                    (_ libstdc++-boot0)))
 
               ;; Call it differently so that the builder can check whether
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 36/40] gnu: gettext: Fix cross-build shebangs.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (34 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 35/40] gnu: commencement: libstdc++-boot0-gcc7: Replace by make-libstdc++-boot0 Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 37/40] gnu: texinfo-4: Fix build for the 64bit Hurd Janneke Nieuwenhuizen
                     ` (3 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

This fixes running autopoint from a cross-built gettext[-minimal].

* gnu/packages/gettext.scm (gettext-minimal): When cross-building, add stage
"patch-cross-shebangs".

Change-Id: I5029a3be0b5cee3c173de66d8f0b027b02c3bc47
---
 gnu/packages/gettext.scm | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/gettext.scm b/gnu/packages/gettext.scm
index cabe4f3be9..7862c296bd 100644
--- a/gnu/packages/gettext.scm
+++ b/gnu/packages/gettext.scm
@@ -9,7 +9,7 @@
 ;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019 Miguel <rosen644835@gmail.com>
-;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2020 EuAndreh <eu@euandre.org>
 ;;; Copyright © 2022, 2024 gemmaro <gemmaro.dev@gmail.com>
 ;;; Copyright © 2023 Maxim Cournoyer maxim.cournoyer@gmail.com>
@@ -130,7 +130,19 @@ (define-public gettext-minimal
                                    ((" test-tls\\$\\(EXEEXT\\) ") " ")))
                               '())
 
-                       #t)))))
+                       #t))))
+          #$@(if (%current-target-system)
+                 #~((add-after 'install 'patch-cross-shebangs
+                      (lambda _
+                        (let ((path (list (string-append #$bash-minimal "/bin"))))
+                          (define (patch-cross-shebang file)
+                            (patch-shebang file path))
+                          (with-directory-excursion
+                              (string-append #$output "/bin")
+                            (for-each
+                             patch-cross-shebang
+                             '("autopoint" "gettext.sh" "gettextize")))))))
+                 '()))
 
        ;; When tests fail, we want to know the details.
        #:make-flags #~'("VERBOSE=yes")))
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 37/40] gnu: texinfo-4: Fix build for the 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (35 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 36/40] gnu: gettext: Fix cross-build shebangs Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 38/40] gnu: flex: " Janneke Nieuwenhuizen
                     ` (2 subsequent siblings)
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/packages/texinfo.scm (texinfo-4): When building for the 64bit Hurd, add
"-Wno-incompatible-pointer-types" to #:configure-flags.

Change-Id: Ia0503e3f5c7aa5354a949b69035a1be6f93ec85f
---
 gnu/packages/texinfo.scm | 50 ++++++++++++++++++++++------------------
 1 file changed, 27 insertions(+), 23 deletions(-)

diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm
index 81afdaf7a7..c0a35b6ffa 100644
--- a/gnu/packages/texinfo.scm
+++ b/gnu/packages/texinfo.scm
@@ -7,7 +7,7 @@
 ;;; Copyright © 2019 Pierre-Moana Levesque <pierre.moana.levesque@gmail.com>
 ;;; Copyright © 2019, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2020 Nicolas Goaziou <mail@nicolasgoaziou.fr>
-;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
 ;;; Copyright © 2022 ( <paren@disroot.org>
 ;;;
@@ -165,31 +165,35 @@ (define-public texinfo-4
       (modify-inputs (package-native-inputs texinfo)
         (prepend automake)))
     (arguments
-     (substitute-keyword-arguments (package-arguments texinfo)
-       ((#:phases phases)
-        `(modify-phases ,phases
-           (add-after 'unpack 'fix-configure
-             (lambda* (#:key inputs native-inputs #:allow-other-keys)
-               ;; Replace outdated config.sub and config.guess.
-               (with-directory-excursion "build-aux"
-                 (for-each
-                  (lambda (file)
-                    (install-file (string-append
-                                   (assoc-ref
-                                    (or native-inputs inputs) "automake")
-                                   "/share/automake-"
-                                   ,(version-major+minor
-                                     (package-version automake))
-                                   "/" file) "."))
-                  '("config.sub" "config.guess")))
-               #t))
-           ;; Build native version of tools before running 'build phase.
-           ,@(if (%current-target-system)
-                 `((add-before 'build 'make-native-gnu-lib
+     (append
+      (substitute-keyword-arguments (package-arguments texinfo)
+        ((#:phases phases)
+         `(modify-phases ,phases
+            (add-after 'unpack 'fix-configure
+              (lambda* (#:key inputs native-inputs #:allow-other-keys)
+                ;; Replace outdated config.sub and config.guess.
+                (with-directory-excursion "build-aux"
+                  (for-each
+                   (lambda (file)
+                     (install-file (string-append
+                                    (assoc-ref
+                                     (or native-inputs inputs) "automake")
+                                    "/share/automake-"
+                                    ,(version-major+minor
+                                      (package-version automake))
+                                    "/" file) "."))
+                   '("config.sub" "config.guess")))
+                #t))
+            ;; Build native version of tools before running 'build phase.
+            ,@(if (%current-target-system)
+                  `((add-before 'build 'make-native-gnu-lib
                       (lambda* (#:key inputs #:allow-other-keys)
                         (invoke "make" "-C" "tools/gnulib/lib")
                         #t)))
-                 '())))))))
+                  '()))))
+      (if (target-hurd64?)
+          (list #:configure-flags ''("CFLAGS=-Wno-incompatible-pointer-types"))
+          '())))))
 
 (define-public info-reader
   ;; The idea of this package is to have the standalone Info reader without
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 38/40] gnu: flex: Fix build for the 64bit Hurd.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (36 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 37/40] gnu: texinfo-4: Fix build for the 64bit Hurd Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 39/40] system: examples: Add bare-hurd64.tmpl Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 40/40] system: examples: Add devel-hurd64.tmpl Janneke Nieuwenhuizen
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/packages/flex.scm (flex): When building for the 64bit Hurd, add
"-Wno-int-conversion "-Wno-implicit-function-declaration" to #:configure-flags.

Change-Id: Ia0503e3f5c7aa5354a949b69035a1be6f93ec85f
---
 gnu/packages/flex.scm | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/gnu/packages/flex.scm b/gnu/packages/flex.scm
index 7972675971..cf2dfe9ec9 100644
--- a/gnu/packages/flex.scm
+++ b/gnu/packages/flex.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014, 2019 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -22,6 +23,7 @@ (define-module (gnu packages flex)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix gexp)
   #:use-module (guix utils)
   #:use-module (gnu packages)
   #:use-module (gnu packages m4)
@@ -53,6 +55,12 @@ (define-public flex
                  ((#:tests? _ #f) #f)))
               (inputs (alist-delete "flex" (package-inputs bison))))))
        `(("bison" ,bison-for-tests))))
+    (arguments
+     (if (target-hurd64?)
+         (list #:configure-flags
+               #~'(#$(string-append "CFLAGS=-Wno-int-conversion"
+                                    " -Wno-implicit-function-declaration")))
+         '()))
     ;; m4 is not present in PATH when cross-building
     (native-inputs
      (list help2man m4))
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 39/40] system: examples: Add bare-hurd64.tmpl.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (37 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 38/40] gnu: flex: " Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 40/40] system: examples: Add devel-hurd64.tmpl Janneke Nieuwenhuizen
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

* gnu/system/examples/bare-hurd.tmpl: Update comments.
* gnu/system/examples/bare-hurd64.tmpl: New file.

Change-Id: I8d26afd19afaa8fb3558948b50b0efdc0f83f29c
---
 gnu/system/examples/bare-hurd.tmpl   | 21 +++++----
 gnu/system/examples/bare-hurd64.tmpl | 70 ++++++++++++++++++++++++++++
 2 files changed, 82 insertions(+), 9 deletions(-)
 create mode 100644 gnu/system/examples/bare-hurd64.tmpl

diff --git a/gnu/system/examples/bare-hurd.tmpl b/gnu/system/examples/bare-hurd.tmpl
index 68c6d3c166..9bfa776769 100644
--- a/gnu/system/examples/bare-hurd.tmpl
+++ b/gnu/system/examples/bare-hurd.tmpl
@@ -3,23 +3,26 @@
 ;; This is an operating system configuration template
 ;; for a "bare bones" QEMU setup, with no X11 display server.
 
-;; To build a disk image for a virtual machine, do
+;; To build a disk image for a virtual machine, do:
 ;;
-;;     ./pre-inst-env guix system image --image-type=hurd-raw \
+;;     ./pre-inst-env guix system image --image-type=hurd-qcow2 \
 ;;         gnu/system/examples/bare-hurd.tmpl
 ;;
-;; You may run it like so
+;; You may run it like so:
 ;;
-;;     guix shell qemu -- qemu-system-i386 -enable-kvm -m 2048 \
-;;      -device rtl8139,netdev=net0 -netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222 \
-;;      -snapshot -hda <the-image>
+;;     guix shell qemu -- qemu-system-i386 -m 2048                \
+;;       --enable-kvm                                             \
+;;       --device e1000,netdev=net0                               \
+;;       --netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222  \
+;;       --snapshot
+;;       --hda /gnu/store/...-disk-image
 ;;
-;; and use it like
+;; and use it like:
 ;;
 ;;     ssh -p 10022 root@localhost
 ;;     guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)'
 ;;
-;; or even (if you use --image-size=3G)
+;; or even, if you build the image with at least --image-size=3G:
 ;;
 ;;     guix build hello
 
@@ -34,7 +37,7 @@
                  (bootloader grub-minimal-bootloader)
                  (targets '("/dev/sdX"))))
     (file-systems (cons (file-system
-                          (device (file-system-label "my-root"))
+                          (device (file-system-label "hurd"))
                           (mount-point "/")
                           (type "ext2"))
                         %base-file-systems))
diff --git a/gnu/system/examples/bare-hurd64.tmpl b/gnu/system/examples/bare-hurd64.tmpl
new file mode 100644
index 0000000000..89811e458a
--- /dev/null
+++ b/gnu/system/examples/bare-hurd64.tmpl
@@ -0,0 +1,70 @@
+;; -*-scheme-*-
+
+;; This is an operating system configuration template
+;; for a "bare bones" QEMU setup, with no X11 display server.
+
+;; To build a disk image for a virtual machine, do:
+;;
+;;     ./pre-inst-env guix system image --image-type=hurd64-qcow2 \
+;;         gnu/system/examples/bare-hurd64.tmpl
+;;
+;; You may run it like so:
+;;
+;;     guix shell qemu@7 -- qemu-system-x86_64 -m 2048            \
+;;       --machine q35                                            \
+;;       --enable-kvm                                             \
+;;       --device e1000,netdev=net0                               \
+;;       --netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222  \
+;;       --snapshot
+;;       --hda /gnu/store/...-disk-image
+;;
+;; and use it like:
+;;
+;;     ssh -p 10022 root@localhost
+;;     guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)'
+;;
+;; or even, if you build the image with at least --image-size=3G:
+;;
+;;     guix build hello
+
+(use-modules (gnu) (gnu system hurd) (guix utils))
+(use-service-modules ssh)
+(use-package-modules ssh)
+
+(define %hurd64-os
+  (operating-system
+    (inherit %hurd64-default-operating-system)
+    (bootloader (bootloader-configuration
+                 (bootloader grub-minimal-bootloader)
+                 (targets '("/dev/sdX"))))
+    (kernel-arguments '("noide")) ;use rumpdisk
+    (file-systems (cons (file-system
+                          (device (file-system-label "hurd"))
+                          (mount-point "/")
+                          (type "ext2"))
+                        %base-file-systems))
+    (host-name "guixygnu64")
+    (timezone "Europe/Amsterdam")
+    (users (cons (user-account
+                  (name "guix")
+                  (comment "Anonymous Hurd Hacker")
+                  (group "users")
+                  (supplementary-groups '("wheel")))
+                 %base-user-accounts))
+    (packages (cons openssh-sans-x %base-packages/hurd))
+    (services (cons (service openssh-service-type
+                             (openssh-configuration
+                              (openssh openssh-sans-x)
+                              (port-number 2222)
+                              (permit-root-login #t)
+                              (allow-empty-passwords? #t)
+                              (password-authentication? #t)))
+                    ;; For installing on a real (non-QEMU) machine, use:
+                    ;; (static-networking-service-type
+                    ;;   (list %loopback-static-networking
+                    ;;        (static-networking
+                    ;;         ...)))
+                    ;; %base-services/hurd
+                    %base-services+qemu-networking/hurd))))
+
+%hurd64-os
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

* [bug#74290] [PATCH v2 40/40] system: examples: Add devel-hurd64.tmpl.
  2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
                     ` (38 preceding siblings ...)
  2024-11-12 16:25   ` [bug#74290] [PATCH v2 39/40] system: examples: Add bare-hurd64.tmpl Janneke Nieuwenhuizen
@ 2024-11-12 16:25   ` Janneke Nieuwenhuizen
  39 siblings, 0 replies; 78+ messages in thread
From: Janneke Nieuwenhuizen @ 2024-11-12 16:25 UTC (permalink / raw)
  To: 74290

This also updates comments and removes the comment about a very old
`bootstrap-profile' hack.

* gnu/system/examples/devel-hurd.tmpl (hurd-packages): New variable
(%hurd-devel-os): Use it.
* gnu/system/examples/devel-hurd64.tmpl: New file.

Change-Id: I54b6b0843f0dd635d89cca483ae43d23b20d21e8
---
 gnu/system/examples/devel-hurd.tmpl   | 70 +++++++++++----------------
 gnu/system/examples/devel-hurd64.tmpl | 65 +++++++++++++++++++++++++
 2 files changed, 93 insertions(+), 42 deletions(-)
 create mode 100644 gnu/system/examples/devel-hurd64.tmpl

diff --git a/gnu/system/examples/devel-hurd.tmpl b/gnu/system/examples/devel-hurd.tmpl
index 3dca0706d1..066bdfe9d8 100644
--- a/gnu/system/examples/devel-hurd.tmpl
+++ b/gnu/system/examples/devel-hurd.tmpl
@@ -3,7 +3,7 @@
 ;; This is an operating system configuration template for a "bare bones
 ;; development" setup, with no X11 display server.
 
-;; To build a disk image for a virtual machine, do
+;; To build a disk image for a virtual machine, do something like:
 ;;
 ;;   ./pre-inst-env guix system image --image-type=hurd-qcow2 --image-size=6G \
 ;;      --no-offload gnu/system/examples/devel-hurd.tmpl
@@ -11,41 +11,38 @@
 ;; You may run it like so
 ;;
 ;;     cp /gnu/store/.../disk-image devel-hurd.img
-;;     guix shell qemu -- qemu-system-i386 -enable-kvm -m 4096 \
-;;      -device rtl8139,netdev=net0                            \
-;;      -netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222 \
-;;      -hda devel-hurd.img
-;;
-;; and use it like
+;;     guix shell qemu -- qemu-system-i386 -m 4096                \
+;;       --enable-kvm                                             \
+;;       --device e1000,netdev=net0                               \
+;;       --netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222  \
+;;       --hda devel-hurd.img
 ;;
 ;;     ssh -p 10022 root@localhost
 ;;     guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)'
 ;;
-;; or even (if you use --image-size=3G)
+;; or even:
 ;;
 ;;     guix build hello
 ;;
-;; Building Guix, do something like:
+;; For Guix hacking, do something like:
 ;;
-;;     GUIX_PROFILE=/run/current-system/bootstrap-profile
-;;     source $GUIX_PROFILE/etc/profile
+;;     guix shell --boostrap -D guix
 ;;     mkdir -p ~/src/guix
 ;;     cd src/guix
 ;;     git clone https://git.savannah.gnu.org/git/guix.git master
 ;;     cd master
 ;;     ./bootstrap
-;;     ./configure --with-courage
+;;     ./configure
 ;;     make
 
+(include "bare-hurd.tmpl")
+
 (use-modules (srfi srfi-1)
              (ice-9 match)
-             (gnu)
              (gnu system hurd)
-             (gnu system locale)
              (guix packages)
-             (guix store)
-             (guix utils))
-(use-service-modules ssh virtualization)
+             (guix store))
+
 (use-package-modules base compression file gawk gdb hurd less m4
                      package-management ssh version-control)
 
@@ -64,23 +61,23 @@
                     ;; These are not essential and do not build yet.
                     '("graphviz" "guile-avahi" "po4a"))))
 
+(define hurd-packages
+  (filter-map input->package
+              (fold alist-delete (package-direct-inputs hurd)
+                    ;; These are not essential, rumpkernel is very big.
+                    '("dde-sources" "parted" "rumpkernel" "util-linux"
+                      "texinfo"))))
+
 (define %hurd-devel-os
   (operating-system
-    (inherit %hurd-vm-operating-system)
-    (host-name "guixydevel")
+    (inherit %hurd-os)
+    (bootloader (bootloader-configuration
+                 (bootloader grub-minimal-bootloader)
+                 (targets '("/dev/sdX"))
+                 (timeout 0)))
     (timezone "Europe/Berlin")
-    (file-systems (cons (file-system
-                          (device (file-system-label "hurd"))
-                          (mount-point "/")
-                          (type "ext2"))
-                        %base-file-systems))
     (swap-devices (list (swap-space
                           (target "/swapfile"))))
-    (users (cons (user-account
-                  (name "guix")
-                  (group "users")
-                  (supplementary-groups '("wheel")))
-                 %base-user-accounts))
     (packages (cons*
                gdb-minimal
                git-minimal
@@ -89,18 +86,7 @@
                openssh-sans-x
                (append
                 guix-packages
-                %base-packages/hurd)))
-    (services (cons*
-               (modify-services (operating-system-user-services
-                                 %hurd-vm-operating-system)
-                 (openssh-service-type
-                  config =>
-                  ;; Set wide open
-                  (openssh-configuration
-                   (openssh openssh-sans-x)
-                   (port-number 2222)
-                   (permit-root-login #t)
-                   (allow-empty-passwords? #t)
-                   (password-authentication? #t))))))))
+                hurd-packages
+                %base-packages/hurd)))))
 
 %hurd-devel-os
diff --git a/gnu/system/examples/devel-hurd64.tmpl b/gnu/system/examples/devel-hurd64.tmpl
new file mode 100644
index 0000000000..ebc9fe8138
--- /dev/null
+++ b/gnu/system/examples/devel-hurd64.tmpl
@@ -0,0 +1,65 @@
+;; -*-scheme-*-
+
+;; This is an operating system configuration template
+;; for a "bare bones" QEMU setup, with no X11 display server.
+
+;; To build a disk image for a virtual machine, do:
+;;
+;;   ./pre-inst-env guix system image --image-type=hurd-qcow2 --image-size=6G \
+;;      --no-offload gnu/system/examples/devel-hurd64.tmpl
+;;
+;; You may run it like so:
+;;
+;;     cp /gnu/store/.../disk-image devel-hurd.img
+;;     guix shell qemu@7 -- qemu-system-x86_64 -m 4096            \
+;;       --machine q35                                            \
+;;       --enable-kvm                                             \
+;;       --device e1000,netdev=net0                               \
+;;       --netdev user,id=net0,hostfwd=tcp:127.0.0.1:10022-:2222  \
+;;       --hda devel-hurd.img
+;;
+;; and use it like:
+;;
+;;     ssh -p 10022 root@localhost
+;;     guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)'
+;;
+;; or even:
+;;
+;;     guix build hello
+;;
+;; For Guix hacking, do something like:
+;;
+;;     guix shell --boostrap -D guix
+;;     mkdir -p ~/src/guix
+;;     cd src/guix
+;;     git clone git clone git://git.savannah.gnu.org/guix
+;;     cd master
+;;     ./bootstrap
+;;     ./configure
+;;     make
+
+(include "devel-hurd.tmpl")
+(include "bare-hurd64.tmpl")
+
+(define %hurd64-devel-os
+  (operating-system
+    (inherit %hurd64-os)
+    (bootloader (bootloader-configuration
+                 (bootloader grub-minimal-bootloader)
+                 (targets '("/dev/sdX"))
+                 (timeout 0)))
+    (timezone "Europe/Berlin")
+    (swap-devices (list (swap-space
+                          (target "/swapfile"))))
+    (packages (cons*
+               gdb-minimal
+               git-minimal
+               gnu-make
+               m4
+               openssh-sans-x
+               (append
+                guix-packages
+                hurd-packages
+                %base-packages/hurd)))))
+
+%hurd64-devel-os
-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com





^ permalink raw reply related	[flat|nested] 78+ messages in thread

end of thread, other threads:[~2024-11-12 17:35 UTC | newest]

Thread overview: 78+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-10 10:32 [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
2024-11-10 10:37 ` [bug#74290] [PATCH 01/31] gnu: mig: Update to v1.8+git20231217 Janneke Nieuwenhuizen
2024-11-10 10:37 ` [bug#74290] [PATCH 02/31] gnu: gnumach: Update to v1.8+git20240714 Janneke Nieuwenhuizen
2024-11-10 11:45   ` janneke
2024-11-10 10:37 ` [bug#74290] [PATCH 03/31] gnu: hurd: Update to v0.9.git20240714 Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 04/31] gnu: gcc: Add indirections current-gcc, current-gcc-toolchain Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 05/31] gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 06/31] gnu: cross-libc: Support cross-building for the " Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 07/31] gnu: bash-minimal: Fix build for " Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 08/31] gnu: elfutils: " Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 09/31] gnu: grep: Fix build for the " Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 10/31] gnu: patch: " Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 11/31] gnu: libxcrypt: Support " Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 12/31] gnu: libstdc++: " Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 13/31] gnu: gcc-13, gcc-14: Support being used as parent for gcc-static Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 14/31] DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
2024-11-11 18:05   ` janneke
2024-11-10 10:38 ` [bug#74290] [PATCH 15/31] system: image: Add hurd64 image types Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 16/31] gnu: Add libgpg-error-1.50 Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 17/31] gnu: libgcrypt: Use libgpg-error-1.50 for the 64bit Hurd Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 18/31] gnu: perl: Support cross-building " Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 19/31] gnu: openssl-3.0: Support " Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 20/31] gnu: pciutils: " Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 21/31] gnu: libpciaccess: " Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 22/31] gnu: netdde: Update to c0ef248dc7c5ccc1273e2a796f3ece30c5b645df Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 23/31] gnu: netdde: Support the 64bit Hurd Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 24/31] gnu: rumpkernel: Update to f1ffd6405f225336e595a0f99f01095ed7438337 Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 25/31] gnu: rumpkernel: Support the 64bit Hurd Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 26/31] gnu: hurd: Build fixes for " Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 27/31] gnu: git-minimal: Support " Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 28/31] gnu: inetutils: Fix build for " Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 29/31] gnu: grub: " Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 30/31] gnu: guile-fibers: " Janneke Nieuwenhuizen
2024-11-10 10:38 ` [bug#74290] [PATCH 31/31] system: hurd: Use 64bit gnumach " Janneke Nieuwenhuizen
2024-11-10 14:40   ` janneke
2024-11-10 14:15 ` [bug#74290] [PATCH 00/31] Add support for x86_64-gnu, aka " janneke
2024-11-12  1:17   ` Maxim Cournoyer
2024-11-12 16:25 ` [bug#74290] [PATCH v2 00/40] " Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 01/40] gnu: gnumach: Update to v1.8+git20240714 Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 02/40] gnu: mig: Update to 1.8+git20231217 Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 03/40] gnu: hurd: Update to 0.9.git20240714 Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 04/40] gnu: gcc: Add indirections current-gcc, current-gcc-toolchain Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 05/40] gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 06/40] gnu: cross-libc: Support cross-building for the " Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 07/40] gnu: bash-minimal: Fix build for " Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 08/40] gnu: elfutils: " Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 09/40] gnu: grep: Fix build for the " Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 10/40] gnu: patch: " Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 11/40] gnu: libxcrypt: Support " Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 12/40] gnu: libstdc++: " Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 13/40] gnu: gcc-13, gcc-14: Support being used as parent for gcc-static Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 14/40] DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 15/40] system: image: Add hurd64 image types Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 16/40] gnu: Add libgpg-error-1.50 Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 17/40] gnu: libgcrypt: Use libgpg-error-1.50 for the 64bit Hurd Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 18/40] gnu: perl: Support cross-building " Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 19/40] gnu: openssl-3.0: Support " Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 20/40] gnu: pciutils: " Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 21/40] gnu: libpciaccess: " Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 22/40] gnu: netdde: Update to c0ef248dc7c5ccc1273e2a796f3ece30c5b645df Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 23/40] gnu: netdde: Support the 64bit Hurd Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 24/40] gnu: rumpkernel: Update to f1ffd6405f225336e595a0f99f01095ed7438337 Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 25/40] gnu: rumpkernel: Support the 64bit Hurd Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 26/40] gnu: hurd: Build fixes for " Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 27/40] gnu: git-minimal: Support " Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 28/40] gnu: inetutils: Fix build for " Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 29/40] gnu: grub: " Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 30/40] gnu: guile-fibers: " Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 31/40] gnu: m4: " Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 32/40] gnu: commencement: gnumach-headers-boot0: Update to 1.8+git20240714 Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 33/40] gnu: commencement: mig-boot0: Update to 1.8+git20231217 Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 34/40] gnu: commencement: hurd-headers-boot0: Update to 0.9.git20240714 Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 35/40] gnu: commencement: libstdc++-boot0-gcc7: Replace by make-libstdc++-boot0 Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 36/40] gnu: gettext: Fix cross-build shebangs Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 37/40] gnu: texinfo-4: Fix build for the 64bit Hurd Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 38/40] gnu: flex: " Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 39/40] system: examples: Add bare-hurd64.tmpl Janneke Nieuwenhuizen
2024-11-12 16:25   ` [bug#74290] [PATCH v2 40/40] system: examples: Add devel-hurd64.tmpl Janneke Nieuwenhuizen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.