[PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd.

  • Open
  • quality assurance status badge
Details
3 participants
  • Janneke Nieuwenhuizen
  • Ludovic Courtès
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Janneke Nieuwenhuizen
Severity
normal
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:32 +0100
(address . guix-patches@gnu.org)(name . Jan (janneke) Nieuwenhuizen)(address . janneke@gnu.org)
cover.1731232753.git.janneke@gnu.org
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:

Toggle snippet (4 lines)
./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:

Toggle snippet (10 lines)
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

Toggle snippet (11 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:37 +0100
[PATCH 02/31] gnu: gnumach: Update to v1.8+git20240714.
(address . 74290@debbugs.gnu.org)
e6b7b545eb806208c6c58c3096bf83753728b73c.1731232753.git.janneke@gnu.org
* 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

Toggle diff (74 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:37 +0100
[PATCH 01/31] gnu: mig: Update to v1.8+git20231217.
(address . 74290@debbugs.gnu.org)
2b7c13c96850e5a00c9986fcad82215d06405291.1731232753.git.janneke@gnu.org
* 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(-)

Toggle diff (25 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:37 +0100
[PATCH 03/31] gnu: hurd: Update to v0.9.git20240714.
(address . 74290@debbugs.gnu.org)
fae55dd7027b6cb60c0e1cd6a1129ea1e2a632b6.1731232753.git.janneke@gnu.org
* 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(-)

Toggle diff (59 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 06/31] gnu: cross-libc: Support cross-building for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
5d540a65fb1897c844300061df1eb72ec630c4b8.1731232753.git.janneke@gnu.org
* 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(-)

Toggle diff (74 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 05/31] gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd.
(address . 74290@debbugs.gnu.org)
41db48275160489ce01568c14a301d2724e5f4f4.1731232753.git.janneke@gnu.org
* 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(-)

Toggle diff (325 lines)
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)))
;;;
@@ -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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 07/31] gnu: bash-minimal: Fix build for 64bit Hurd.
(address . 74290@debbugs.gnu.org)
cf70058256a3be9607fffde6ca1ec4db7b2e564d.1731232753.git.janneke@gnu.org
* 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(+)

Toggle diff (37 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 04/31] gnu: gcc: Add indirections current-gcc, current-gcc-toolchain.
(address . 74290@debbugs.gnu.org)
3e5801ce2795b91ba96a60ad239de717d0337a97.1731232753.git.janneke@gnu.org
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(-)

Toggle diff (443 lines)
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))
;;;
@@ -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
-
This message was truncated. Download the full message here.
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 08/31] gnu: elfutils: Fix build for 64bit Hurd.
(address . 74290@debbugs.gnu.org)
3112163cbeb58f04bff54368364741ae8a16cdcc.1731232753.git.janneke@gnu.org
* 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(-)

Toggle diff (27 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 09/31] gnu: grep: Fix build for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
ae7a6ed0238a5a9f669d05335f7c9547ec368a7c.1731232753.git.janneke@gnu.org
* 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(+)

Toggle diff (21 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 10/31] gnu: patch: Fix build for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
e30cecfddb17c5894800f08cdb56906b9056ca30.1731232753.git.janneke@gnu.org
* 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(-)

Toggle diff (63 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 11/31] gnu: libxcrypt: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
ed2b361b5ed1e1dc7864f89a7276ac210f99a537.1731232753.git.janneke@gnu.org
* 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

Toggle diff (92 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 12/31] gnu: libstdc++: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
1351fabb950e28169511b86e1e85fc197eac1674.1731232753.git.janneke@gnu.org
* 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(-)

Toggle diff (24 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 13/31] gnu: gcc-13, gcc-14: Support being used as parent for gcc-static.
(address . 74290@debbugs.gnu.org)
7a8acd375aa807b7d4386ed8052aa743261c42ce.1731232753.git.janneke@gnu.org
* 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(-)

Toggle diff (32 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 14/31] DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
43e8a79925bda014c70618de24c2936772bb829b.1731232753.git.janneke@gnu.org
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(-)

Toggle diff (239 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 15/31] system: image: Add hurd64 image types.
(address . 74290@debbugs.gnu.org)
bf129f5e6dd084e2589732cb2b4625b84357004b.1731232753.git.janneke@gnu.org
* 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(-)

Toggle diff (73 lines)
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)))
+
+;;;
+;;; 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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 16/31] gnu: Add libgpg-error-1.50.
(address . 74290@debbugs.gnu.org)
035b5874f436601f436bcfe480890da38c8ca0c5.1731232753.git.janneke@gnu.org
* 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(-)

Toggle diff (36 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 17/31] gnu: libgcrypt: Use libgpg-error-1.50 for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
668ec237bdfe5be3c277094abd035fbbf7d07c2c.1731232753.git.janneke@gnu.org
* 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(-)

Toggle diff (18 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 18/31] gnu: perl: Support cross-building for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
05a9e4531639c0b21f2cb936d9fd605539360315.1731232753.git.janneke@gnu.org
* 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(-)

Toggle diff (34 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 19/31] gnu: openssl-3.0: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
bb85fef425df3d9a07dce34dc73acdbedc1717f6.1731232753.git.janneke@gnu.org
* 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

Toggle diff (140 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 20/31] gnu: pciutils: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
93bbee8b3e815afc25b5c833498b4f0e1d339827.1731232753.git.janneke@gnu.org
* 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

Toggle diff (115 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 21/31] gnu: libpciaccess: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
b2949836a31d158de0a90d58a5dede5c94dff729.1731232753.git.janneke@gnu.org
* 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

Toggle diff (132 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 22/31] gnu: netdde: Update to c0ef248dc7c5ccc1273e2a796f3ece30c5b645df.
(address . 74290@debbugs.gnu.org)
971d5c18860f5dc1dba30ffa5f4dd817b5f977c1.1731232753.git.janneke@gnu.org
* 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(-)

Toggle diff (45 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 23/31] gnu: netdde: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
22aeb4fc3065120e43b55b1a169e76b53e5da4e7.1731232753.git.janneke@gnu.org
* 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

Toggle diff (88 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 24/31] gnu: rumpkernel: Update to f1ffd6405f225336e595a0f99f01095ed7438337.
(address . 74290@debbugs.gnu.org)
16521725d101731b06d55d21be690ee457fcd26d.1731232753.git.janneke@gnu.org
* 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(-)

Toggle diff (37 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 25/31] gnu: rumpkernel: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
dbb7cd514016b00c56e7a28a6ec4a433d42734b0.1731232753.git.janneke@gnu.org
* 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(-)

Toggle diff (27 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 26/31] gnu: hurd: Build fixes for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
b0b0b768a76a38dfe26bfe134415a359e7f4d739.1731232753.git.janneke@gnu.org
* 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

Toggle diff (212 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 27/31] gnu: git-minimal: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
ab55c68442e9638d8c6e6d66732b9056686c52cf.1731232753.git.janneke@gnu.org
* 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(-)

Toggle diff (36 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 28/31] gnu: inetutils: Fix build for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
e84d13c6690c6d23f0b96738eed7548c5487934c.1731232753.git.janneke@gnu.org
* 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

Toggle diff (118 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 29/31] gnu: grub: Fix build for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
83a995681b1b8cf9894b9fbc1e3c65cbbb855bbf.1731232753.git.janneke@gnu.org
* 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

Toggle diff (72 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 30/31] gnu: guile-fibers: Fix build for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
86686ad32c0d7b3213d9e7c3640b61b4e4672fc2.1731232753.git.janneke@gnu.org
* 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(-)

Toggle diff (16 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 10 Nov 11:38 +0100
[PATCH 31/31] system: hurd: Use 64bit gnumach for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
52f615e031e134f37d20b5bda18e24391c6654c0.1731232753.git.janneke@gnu.org
* 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(-)

Toggle diff (32 lines)
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
J
J
janneke wrote on 10 Nov 12:45 +0100
Re: [PATCH 02/31] gnu: gnumach: Update to v1.8+git20240714.
(address . 74290@debbugs.gnu.org)
87serz1fde.fsf@gnu.org
Janneke Nieuwenhuizen writes:

Toggle quote (5 lines)
> * 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

Toggle snippet (15 lines)
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


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
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(+)

Toggle diff (17 lines)
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
--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
J
J
janneke wrote on 10 Nov 15:40 +0100
Re: [PATCH 31/31] system: hurd: Use 64bit gnumach for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
874j4fywx4.fsf@gnu.org
Janneke Nieuwenhuizen writes:

Toggle quote (36 lines)
> * 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

Toggle snippet (10 lines)
(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))))

...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
J
J
janneke wrote on 10 Nov 15:15 +0100
[PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
87iksvyy1x.fsf@gnu.org
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.

Toggle quote (150 lines)
> 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
J
J
janneke wrote on 11 Nov 19:05 +0100
Re: [PATCH 14/31] DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
87o72lve7g.fsf@gnu.org
Janneke Nieuwenhuizen writes:

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

Toggle quote (20 lines)
> 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"):

Toggle quote (9 lines)
> + ("x86_64-gnu"
> + ("bash"
> + ,(base32 "0l0dnighcipvdfbk14q834n57q859i2b9ssiq4bnbh0jpxvvqp1l"))
> + ("mkdir"
> + ,(base32 "1nd17k8pwwi7zsqi685w4rn1p2cvfcalrzdhfgwpsk1ilxnmdvsq"))
> + ("tar"
> + ,(base32 "0lf94y22ngmxdwhsp0cvj33m23p33r999xnlrff0s1yvlf20w3ks"))
> + ("xz"
> + ,(base32 "145aq65rx7w0qk1sw9239888id5ri60ha0xp1kyp6ir3pvizh6by")))
--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
M
M
Maxim Cournoyer wrote on 12 Nov 02:17 +0100
Re: [PATCH 00/31] Add support for x86_64-gnu, aka the 64bit Hurd.
(address . janneke@gnu.org)
87bjyl8d3o.fsf@gmail.com
Hi Janneke!

<janneke@gnu.org> writes:

Toggle quote (6 lines)
> 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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 00/40] Add support for x86_64-gnu, aka the 64bit Hurd.
(address . 74290@debbugs.gnu.org)(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)
cover.1731427612.git.janneke@gnu.org
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:

Toggle snippet (53 lines)
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#

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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 01/40] gnu: gnumach: Update to v1.8+git20240714.
(address . 74290@debbugs.gnu.org)
c09a7ad59dac41aa45774f899a36aea4670604d7.1731427612.git.janneke@gnu.org
* 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

Toggle diff (86 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 02/40] gnu: mig: Update to 1.8+git20231217.
(address . 74290@debbugs.gnu.org)
216c0ef048600378b213add34715705e2c728363.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (25 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 03/40] gnu: hurd: Update to 0.9.git20240714.
(address . 74290@debbugs.gnu.org)
e25fb866b24f42a2470284125860b8dd2e1d6cd4.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (59 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 05/40] gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd.
(address . 74290@debbugs.gnu.org)
99a9152dc069538a151504d65b85fd5105149a51.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (369 lines)
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)))
;;;
@@ -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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 04/40] gnu: gcc: Add indirections current-gcc, current-gcc-toolchain.
(address . 74290@debbugs.gnu.org)
e43ac3adb6a1de703ebc8b02f9aa0b40be92ec24.1731427612.git.janneke@gnu.org
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(-)

Toggle diff (443 lines)
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))
;;;
@@ -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
-
This message was truncated. Download the full message here.
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 06/40] gnu: cross-libc: Support cross-building for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
ca5eadb8bdc83980300d4c90f81e5cb97a0f8706.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (74 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 08/40] gnu: elfutils: Fix build for 64bit Hurd.
(address . 74290@debbugs.gnu.org)
a413959a04c8291c44bf964603f27f90b789b361.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (27 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 09/40] gnu: grep: Fix build for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
b83a4208f27678c4d86ad5c9983473bd74bf6ea4.1731427612.git.janneke@gnu.org
* 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(+)

Toggle diff (21 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 07/40] gnu: bash-minimal: Fix build for 64bit Hurd.
(address . 74290@debbugs.gnu.org)
1f92fed3939c2be15f88c5952cb79eaafd23e7dc.1731427612.git.janneke@gnu.org
* 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(+)

Toggle diff (37 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 10/40] gnu: patch: Fix build for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
1e21777bab62f575ccfa64425673fa51c6baac1f.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (63 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 12/40] gnu: libstdc++: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
7d1dafc36c5b23a342dced99c93cd8033a3bc852.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (24 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 11/40] gnu: libxcrypt: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
e1549c8837d80f2bcd44f0bb7730d3ee07eeaacb.1731427612.git.janneke@gnu.org
* 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

Toggle diff (92 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 13/40] gnu: gcc-13, gcc-14: Support being used as parent for gcc-static.
(address . 74290@debbugs.gnu.org)
b4c0b38776c048869626bed8aefd4efb042cea11.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (32 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 14/40] DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
c5bb9d59fbc4da6afce444a8da0b057bd8607a39.1731427612.git.janneke@gnu.org
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(-)

Toggle diff (228 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 15/40] system: image: Add hurd64 image types.
(address . 74290@debbugs.gnu.org)
393e1a7d799e913bb4343cb03fa00f772404c607.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (151 lines)
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)))
+
+;;;
+;;; 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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 16/40] gnu: Add libgpg-error-1.50.
(address . 74290@debbugs.gnu.org)
063156615284b14ea316a35cebb9636f0202742c.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (36 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 18/40] gnu: perl: Support cross-building for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
781fce468514304963ebfe976cf2ede2417a905b.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (34 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 17/40] gnu: libgcrypt: Use libgpg-error-1.50 for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
8dc78d1028c40206a6fc87197c3de2a5cce95dd8.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (18 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 19/40] gnu: openssl-3.0: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
9f00bfe5365aabf524069f8a5d435fecdf9016b5.1731427612.git.janneke@gnu.org
* 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

Toggle diff (140 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 20/40] gnu: pciutils: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
c14730c47b48a92f6a80dcc2106035d8bd5fc8f2.1731427612.git.janneke@gnu.org
* 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

Toggle diff (115 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 21/40] gnu: libpciaccess: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
68c9662ea16fdb7498a7a10ad36eafc923db5570.1731427612.git.janneke@gnu.org
* 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

Toggle diff (132 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 22/40] gnu: netdde: Update to c0ef248dc7c5ccc1273e2a796f3ece30c5b645df.
(address . 74290@debbugs.gnu.org)
f6aae3737e0a8ff28774bd349574960fad2d82de.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (45 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 23/40] gnu: netdde: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
52cd8b7a905961b0ea70dcfcae561792a833e3ba.1731427612.git.janneke@gnu.org
* 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

Toggle diff (88 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 24/40] gnu: rumpkernel: Update to f1ffd6405f225336e595a0f99f01095ed7438337.
(address . 74290@debbugs.gnu.org)
e20d9cff993aab6a75adff9747838c0c61fcc8cb.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (37 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 25/40] gnu: rumpkernel: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
b604cb1ffbaac6d49f160c97103631f616552b92.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (27 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 26/40] gnu: hurd: Build fixes for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
433661697f325485bd9b04aaec878af8145df0ab.1731427612.git.janneke@gnu.org
* 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

Toggle diff (212 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 27/40] gnu: git-minimal: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
a32f714f0556a99e042e2500945569a5278c8fec.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (36 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 28/40] gnu: inetutils: Fix build for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
1f456c4d97b5d0e1e017b2048daa8af5680fea13.1731427612.git.janneke@gnu.org
* 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

Toggle diff (118 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 29/40] gnu: grub: Fix build for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
5ccd41575a2915402ce6eb1175cd6c149f762ae8.1731427612.git.janneke@gnu.org
* 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

Toggle diff (72 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 30/40] gnu: guile-fibers: Fix build for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
99063d4c0e6038e2a42739f0b8eb6d01f6eb1cd2.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (16 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 31/40] gnu: m4: Fix build for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
3cfbaa61642a2298009a4ef94d66a02a31a96331.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (30 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 33/40] gnu: commencement: mig-boot0: Update to 1.8+git20231217..
(address . 74290@debbugs.gnu.org)
90a2eb69481e3fed9e9018c58a068e0d81573eea.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (25 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 32/40] gnu: commencement: gnumach-headers-boot0: Update to 1.8+git20240714.
(address . 74290@debbugs.gnu.org)
ef637ea92ec20cfd83e85744bcb7b2fa92373522.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (25 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 35/40] gnu: commencement: libstdc++-boot0-gcc7: Replace by make-libstdc++-boot0.
(address . 74290@debbugs.gnu.org)
185134dc100369ffbf6362e9b8b1fb58ae9f8707.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (29 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 34/40] gnu: commencement: hurd-headers-boot0: Update to 0.9.git20240714.
(address . 74290@debbugs.gnu.org)
058b38812125dd2c1557a9fc8113899d4671cb7c.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (25 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 38/40] gnu: flex: Fix build for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
4c0589e8f0a3a305ac75921c57f6d89301a43adb.1731427612.git.janneke@gnu.org
* 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(+)

Toggle diff (36 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 37/40] gnu: texinfo-4: Fix build for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
645534e6b891ad98d6d2971cb8dc14acb508aed1.1731427612.git.janneke@gnu.org
* 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(-)

Toggle diff (74 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 36/40] gnu: gettext: Fix cross-build shebangs.
(address . 74290@debbugs.gnu.org)
73bba6d236af4d1501d9a28f94dba8aa77f4148c.1731427612.git.janneke@gnu.org
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(-)

Toggle diff (37 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 39/40] system: examples: Add bare-hurd64.tmpl.
(address . 74290@debbugs.gnu.org)
3621f843cd8df63d2d5c66774f1a953153c7e035.1731427612.git.janneke@gnu.org
* 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

Toggle diff (127 lines)
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
J
J
Janneke Nieuwenhuizen wrote on 12 Nov 17:25 +0100
[PATCH v2 40/40] system: examples: Add devel-hurd64.tmpl.
(address . 74290@debbugs.gnu.org)
6e21691025e2b9a3284e5be628779b6838bcde54.1731427612.git.janneke@gnu.org
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

Toggle diff (199 lines)
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
L
L
Ludovic Courtès wrote 4 days ago
Re: [bug#74290] [PATCH v2 13/40] gnu: gcc-13, gcc-14: Support being used as parent for gcc-static.
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)
878qthlsao.fsf@gnu.org
Hi!

Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (6 lines)
> * gnu/packages/gcc.scm (gcc-13)[arguments]: Use quasiquote instead of
> g-expressions.
> (gcc-14)[arguments]: Likewise.
>
> Change-Id: I22269b31d49868effe967d46247b189ed9a9d394

[...]

Toggle quote (5 lines)
> - #~(modify-phases #$phases
> - (delete 'patch-hurd-libpthread))
> + `(modify-phases ,phases
> + (delete 'patch-hurd-libpthread))

I think we should not do that as this undoes previous changes.

Instead, can we change whichever package expects to get an sexp here to
use gexps?

Ludo’.
L
L
Ludovic Courtès wrote 4 days ago
Re: [bug#74290] [PATCH v2 14/40] DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd.
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)
874j45ls8s.fsf@gnu.org
Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (15 lines)
> +++ 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")))

Are the i586-gnu binaries usable on x86_64-gnu? That would be sweet,
and it would allow us have a single set of binary seeds instead of two.
L
L
Ludovic Courtès wrote 4 days ago
Re: [bug#74290] [PATCH v2 17/40] gnu: libgcrypt: Use libgpg-error-1.50 for the 64bit Hurd.
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)(address . 74290@debbugs.gnu.org)
87zflxkdmx.fsf@gnu.org
Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (5 lines)
> * gnu/packages/gnupg.scm (libgcrypt)[propagated-inputs]: When building for the
> 64bit Hurd, use libgcrypt-1.50.
>
> Change-Id: I608d283a4a307527d5b09a81fa1a53cec5d6bb76

[...]

Toggle quote (6 lines)
> (propagated-inputs
> - `(("libgpg-error-host" ,libgpg-error)))
> + `(("libgpg-error-host" ,(if (target-hurd64?)
> + libgpg-error-1.50
> + libgpg-error))))

Could you add a short comment explaining why this version is needed?
L
L
Ludovic Courtès wrote 4 days ago
Re: [bug#74290] [PATCH v2 04/40] gnu: gcc: Add indirections current-gcc, current-gcc-toolchain.
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)
87v7wlkdlf.fsf@gnu.org
Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (10 lines)
> 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

I would have loved to avoid those indirections… but can we? :-)
L
L
Ludovic Courtès wrote 4 days ago
Re: [bug#74290] [PATCH v2 05/40] gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd.
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)
87mshxkd89.fsf@gnu.org
Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (10 lines)
> +++ 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))

[...]

Toggle quote (10 lines)
> +++ 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))

This affects not just cross-compilation but also native compilation.

Let’s assume we only want cross-compilation to x86_64-gnu for now, how
about changing the GCC version used for cross-compilation, and only
that:
Toggle diff (13 lines)
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 5781341a87..6120740b3c 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -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 gcc-14))
(define %gcc-include-paths
;; Environment variables for header search paths.
That would affect also non-Hurd cross-compilation targets, but if it
works, it’s simpler.

Then, as a second step, we could prepare a ‘core-packages-team’ branch
that upgrades ‘gcc’ globally, and that way we keep something consistent
and simpler, without ‘current-gcc’. (Though it means we’d have to wait
before we can build natively on x86_64-gnu.)

WDYT?

Ludo’.
L
L
Ludovic Courtès wrote 4 days ago
Re: [bug#74290] [PATCH v2 00/40] Add support for x86_64-gnu, aka the 64bit Hurd.
(name . Janneke Nieuwenhuizen)(address . janneke@gnu.org)(address . 74290@debbugs.gnu.org)
87h685kd2x.fsf@gnu.org
Hi!

Janneke Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (6 lines)
> 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.

[...]

Toggle quote (4 lines)
> building /gnu/store/ps0shilnqwpm40886dnqg4bkazw8pq7i-glibc-bootstrap-0.drv...
> building /gnu/store/8kqnvyf9i8qgizq69314xa576fj4idy5-gcc-bootstrap-0.drv...
> building profile with 4 packages...

This is amazing!!

Glad to see it happen. I’ve just posted a bargaining proposal :-)
regarding ‘current-gcc’ etc., let’s see where that goes.

Anyhow, this is great, it makes the OS more usable.

Ludo’.
J
J
janneke wrote 4 days ago
Re: [bug#74290] [PATCH v2 05/40] gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd.
(name . Ludovic Courtès)(address . ludo@gnu.org)
87o72dn544.fsf@gnu.org
Ludovic Courtès writes:

Toggle quote (26 lines)
> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> +++ 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))
>
> [...]
>
>> +++ 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))
>
> This affects not just cross-compilation but also native compilation.

Eh, if you mean for the 64bit Hurd, sure! That was the idea, it needs
gcc-14...

Toggle quote (2 lines)
> Let’s assume we only want cross-compilation to x86_64-gnu for now,

Cross-compilation works pretty well, I've been mostly working on native
compilation the past week...

Toggle quote (14 lines)
> how about changing the GCC version used for cross-compilation, and
> only that:
>
> diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
> index 5781341a87..6120740b3c 100644
> --- a/gnu/packages/cross-base.scm
> +++ b/gnu/packages/cross-base.scm
> @@ -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 gcc-14))

Interesting...I would have thought this would cause a world rebuild,
because of the cross-gcc in commencement. Apparently, it doesn't.

Toggle quote (3 lines)
> That would affect also non-Hurd cross-compilation targets, but if it
> works, it’s simpler.

Ok, I very much like the simplicity of this.

Toggle quote (7 lines)
> Then, as a second step, we could prepare a ‘core-packages-team’ branch
> that upgrades ‘gcc’ globally, and that way we keep something consistent
> and simpler, without ‘current-gcc’. (Though it means we’d have to wait
> before we can build natively on x86_64-gnu.)
>
> WDYT?

I've been thinking about this route and decided against it because it
seems to me that upgrading to gcc-14 will cause a lot of trouble/work.

However, if that work is shared, and we have the build farm to help, it
may be the best route. Maybe the wait doesn't have to be too long?
Also, in the mean time, upstream support might improve.

Maybe we can decide to go the route you propose and also keep this
current-gcc patch on the hurd-team branch for a bit (we prepend a fat
REMOVEME in front of it). We can keep working on native Hurd builds
that use gcc-14 on hurd-team using this hack, until core-packages-team
is ready to make it obsolete?

Greetings,
Janneke


--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
J
J
janneke wrote 4 days ago
Re: [bug#74290] [PATCH v2 14/40] DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd.
(name . Ludovic Courtès)(address . ludo@gnu.org)
87frnpn4r2.fsf@gnu.org
Ludovic Courtès writes:

Toggle quote (19 lines)
> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> +++ 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")))
>
> Are the i586-gnu binaries usable on x86_64-gnu?

No, at least not currently. The mach message format even differs, AFAIK.

Toggle snippet (16 lines)
root@guixygnu64 ~# file bash-i586
bash-i586: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Hurd 0.0.0, stripped

root@guixygnu64 ~# ./bash-i586 --help
-bash: ./bash-i586: cannot execute binary file: Exec format error
[..]
root@debian:~# ./bash-i586 --help
-bash: ./bash-i586: cannot execute binary file: Exec format error
[..]
root@childhurd ~# ./bash-i586
I have no name!@childhurd ~# ./bash-i586 --help
GNU bash, version 5.0.16(1)-release-(i586-pc-gnu)
Usage: ./bash-i586 [GNU long option] [option] ...
./bash-i586 [GNU long option] [option] script-file ...

Toggle quote (3 lines)
> That would be sweet, and it would allow us have a single set of binary
> seeds instead of two.

Yeah...but no, and we'd need a gcc-14 anyway.

Greetings,
Janneke

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
J
J
janneke wrote 4 days ago
Re: [bug#74290] [PATCH v2 00/40] Add support for x86_64-gnu, aka the 64bit Hurd.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 74290@debbugs.gnu.org)
8734jpn3zk.fsf@gnu.org
Ludovic Courtès writes:

Hi!

Toggle quote (17 lines)
> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> 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.
>
> [...]
>
>> building /gnu/store/ps0shilnqwpm40886dnqg4bkazw8pq7i-glibc-bootstrap-0.drv...
>> building /gnu/store/8kqnvyf9i8qgizq69314xa576fj4idy5-gcc-bootstrap-0.drv...
>> building profile with 4 packages...
>
> This is amazing!!

Thank you! FWIW, I'm currently up to here

Toggle snippet (24 lines)
building /gnu/store/b1zafmkrz9dhh8dmglgjiv4yrf29ygqa-file-boot0-5.45.drv...
building /gnu/store/4b0xk1jdggh2vkca4mj3q29zgbmn06h1-findutils-boot0-4.9.0.drv...
building /gnu/store/k1anwx8nm03i6akc3y65gy1vqj2h14c0-gcc-14.2.0.tar.xz.drv...
building /gnu/store/kycw4rv3vc17a9147i4v8b5cy3cpdj7r-binutils-cross-boot0-2.41.drv...
building /gnu/store/jh9kknd4xnml9bxmdrs2j0vmjxixw6jk-expat-2.5.0.drv...
building /gnu/store/ks454i900xdqizkvjzxff9yg78jhzh08-gcc-14.2.0.tar.xz.drv...
building /gnu/store/7sm2cm9dmhjqqq3qz52dsm2nb6ah4yrg-glibc-2.39.tar.xz.drv...
building /gnu/store/2ykm8n6yynnk4mv8b9qy6liccpbhj9h4-gmp-6.0.0a.tar.xz.drv...
building /gnu/store/vbk133fp4ldi2jrgbg5121f29z7x886w-grep-3.11.tar.xz.drv...
building /gnu/store/h4r8v4kv268vksf2sb0fj1l026svbncg-guile-3.0.9.tar.xz.drv...
building /gnu/store/77pq0ygp8xqxp198r1d924wmgyqc2df6-ld-wrapper-boot0-0.drv...
building /gnu/store/w35zl5n42b8q4m095xb6ng8sxvxxm1xw-libstdc++-boot0-14.2.0.drv...
building /gnu/store/jg59zvvl58dkrpvyxcyg9sghax7skgvw-m4-boot0-1.4.19.drv...
building /gnu/store/2ac7j9xyzv96v52z3gnipb30z61f71kf-gcc-cross-boot0-14.2.0.drv...
- 'build' phasebuilder for `/gnu/store/2ac7j9xyzv96v52z3gnipb30z61f71kf-gcc-cross-boot0-14.2.0.drv' failed with exit code 1
build of /gnu/store/2ac7j9xyzv96v52z3gnipb30z61f71kf-gcc-cross-boot0-14.2.0.drv failed
[..]
checking build system compiler gcc... no
configure: error: Specified CC_FOR_BUILD doesn't seem to work
make[1]: *** [Makefile:5118: configure-gmp] Error 1
make[1]: Leaving directory '/tmp/guix-build-gcc-cross-boot0-14.2.0.drv-0/build'


but small things like guix copy (and offloading) don't seem to work.
I'm working up towards a v3 (and getting that "merged") so that others
might help :)

Toggle quote (3 lines)
> Glad to see it happen. I’ve just posted a bargaining proposal :-)
> regarding ‘current-gcc’ etc., let’s see where that goes.

Yeah, I think that's a very good call.

Toggle quote (2 lines)
> Anyhow, this is great, it makes the OS more usable.

Yes, that's the idea!

Greetings,
Janneke

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
J
J
janneke wrote 4 days ago
Re: [bug#74290] [PATCH v2 17/40] gnu: libgcrypt: Use libgpg-error-1.50 for the 64bit Hurd.
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 74290@debbugs.gnu.org)
87y11hlpb2.fsf@gnu.org
Ludovic Courtès writes:

Toggle quote (17 lines)
> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> * gnu/packages/gnupg.scm (libgcrypt)[propagated-inputs]: When building for the
>> 64bit Hurd, use libgcrypt-1.50.
>>
>> Change-Id: I608d283a4a307527d5b09a81fa1a53cec5d6bb76
>
> [...]
>
>> (propagated-inputs
>> - `(("libgpg-error-host" ,libgpg-error)))
>> + `(("libgpg-error-host" ,(if (target-hurd64?)
>> + libgpg-error-1.50
>> + libgpg-error))))
>
> Could you add a short comment explaining why this version is needed?

Sure. Upstream added 64bit Hurd support (me looks into git, hmm) in
1.48 with a single patch. I could also add that patch to
libgpg-error-1.47 when building for the Hurd. Maybe that's nicer?

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
J
J
janneke wrote 4 days ago
Re: [bug#74290] [PATCH v2 13/40] gnu: gcc-13, gcc-14: Support being used as parent for gcc-static.
(name . Ludovic Courtès)(address . ludo@gnu.org)
87jzd1lnr0.fsf@gnu.org
Ludovic Courtès writes:

Toggle quote (22 lines)
> Hi!
>
> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> * gnu/packages/gcc.scm (gcc-13)[arguments]: Use quasiquote instead of
>> g-expressions.
>> (gcc-14)[arguments]: Likewise.
>>
>> Change-Id: I22269b31d49868effe967d46247b189ed9a9d394
>
> [...]
>
>> - #~(modify-phases #$phases
>> - (delete 'patch-hurd-libpthread))
>> + `(modify-phases ,phases
>> + (delete 'patch-hurd-libpthread))
>
> I think we should not do that as this undoes previous changes.
>
> Instead, can we change whichever package expects to get an sexp here to
> use gexps?

Hmm, how would that work? The package that expects a sexp is
gcc-static.

If we update gcc-static to also use gexps we can no longer build any gcc
< 13 static? Unless we update also update gcc-4.7, gcc-4.8, and those
in commencement. Maybe (hopefully!) I'm missing something?

Greetings,
Janneke

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
J
J
janneke wrote 4 days ago
(name . Ludovic Courtès)(address . ludo@gnu.org)
87a5dxlmv0.fsf@gnu.org
Toggle quote (29 lines)
> Ludovic Courtès writes:

>> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>>
>>> * gnu/packages/gcc.scm (gcc-13)[arguments]: Use quasiquote instead of
>>> g-expressions.
>>> (gcc-14)[arguments]: Likewise.
>>>
>>> Change-Id: I22269b31d49868effe967d46247b189ed9a9d394
>>
>> [...]
>>
>>> - #~(modify-phases #$phases
>>> - (delete 'patch-hurd-libpthread))
>>> + `(modify-phases ,phases
>>> + (delete 'patch-hurd-libpthread))
>>
>> I think we should not do that as this undoes previous changes.
>>
>> Instead, can we change whichever package expects to get an sexp here to
>> use gexps?
>
> Hmm, how would that work? The package that expects a sexp is
> gcc-static.
>
> If we update gcc-static to also use gexps we can no longer build any gcc
> < 13 static? Unless we update also update gcc-4.7, gcc-4.8, and those
> in commencement. Maybe (hopefully!) I'm missing something?

I have upgraded %gcc-static in make-bootstrap to gcc-14, problem solved :)
hopefully.

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
J
J
janneke wrote 3 days ago
Re: [bug#74290] [PATCH v2 05/40] gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd.
(name . Ludovic Courtès)(address . ludo@gnu.org)
87bjydhquw.fsf@gnu.org
Toggle quote (24 lines)
> Ludovic Courtès writes:
>
>> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>>
>> Then, as a second step, we could prepare a ‘core-packages-team’ branch
>> that upgrades ‘gcc’ globally, and that way we keep something consistent
>> and simpler, without ‘current-gcc’. (Though it means we’d have to wait
>> before we can build natively on x86_64-gnu.)
>>
>> WDYT?
>
> I've been thinking about this route and decided against it because it
> seems to me that upgrading to gcc-14 will cause a lot of trouble/work.
>
> However, if that work is shared, and we have the build farm to help, it
> may be the best route. Maybe the wait doesn't have to be too long?
> Also, in the mean time, upstream support might improve.
>
> Maybe we can decide to go the route you propose and also keep this
> current-gcc patch on the hurd-team branch for a bit (we prepend a fat
> REMOVEME in front of it). We can keep working on native Hurd builds
> that use gcc-14 on hurd-team using this hack, until core-packages-team
> is ready to make it obsolete?

So, what about if we do, in addition to the %xgcc => gcc-14 in
cross-base -- we use gcc-14 on the 64bit hurd /system/:

Toggle snippet (33 lines)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index a14de3002f..2b0b4b07b4 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3642,7 +3642,9 @@ (define-public gcc-toolchain-14
;; The default GCC
(define-public gcc-toolchain
- gcc-toolchain-11)
+ (if (system-hurd64?)
+ gcc-toolchain-14
+ gcc-toolchain-11))
(define-public gcc-toolchain-aka-gcc
;; It's natural for users to try "guix install gcc". This package
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 64ba37fd69..d90502f403 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -857,7 +857,10 @@ (define-public gcc-14
;; Note: When changing the default gcc version, update
;; the gcc-toolchain-* definitions.
-(define-public gcc gcc-11)
+(define-public gcc
+ (if (system-hurd64?)
+ gcc-14
+ gcc-11))
;;;

Wouldn't that just work?

We can do that in parallel with the gcc-14 update in core-packages-team.

Greetings,
Janneke

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
J
J
janneke wrote 3 days ago
(name . Ludovic Courtès)(address . ludo@gnu.org)
87r078hpuy.fsf@gnu.org
Toggle quote (38 lines)
>> Ludovic Courtès writes:
>>
>>> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>>>
>>> Then, as a second step, we could prepare a ‘core-packages-team’ branch
>>> that upgrades ‘gcc’ globally, and that way we keep something consistent
>>> and simpler, without ‘current-gcc’. (Though it means we’d have to wait
>>> before we can build natively on x86_64-gnu.)
>>>
>>> WDYT?
>>
>> I've been thinking about this route and decided against it because it
>> seems to me that upgrading to gcc-14 will cause a lot of trouble/work.
>>
>> However, if that work is shared, and we have the build farm to help, it
>> may be the best route. Maybe the wait doesn't have to be too long?
>> Also, in the mean time, upstream support might improve.
>>
>> Maybe we can decide to go the route you propose and also keep this
>> current-gcc patch on the hurd-team branch for a bit (we prepend a fat
>> REMOVEME in front of it). We can keep working on native Hurd builds
>> that use gcc-14 on hurd-team using this hack, until core-packages-team
>> is ready to make it obsolete?
>
> So, what about if we do, in addition to the %xgcc => gcc-14 in
> cross-base -- we use gcc-14 on the 64bit hurd /system/:
>
> diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
> index a14de3002f..2b0b4b07b4 100644
> --- a/gnu/packages/commencement.scm
> +++ b/gnu/packages/commencement.scm
> @@ -3642,7 +3642,9 @@ (define-public gcc-toolchain-14
>
> ;; The default GCC
> (define-public gcc-toolchain
> - gcc-toolchain-11)
> + (if (system-hurd64?)

Hmm, no that doesn't work; (%current-system) is #f at toplevel. We
could only do something like

(define (host-hurd64?)
(let ((uname-info (uname)))
(and (equal? (utsname:sysname uname-info) "GNU")
(equal? (utsname:machine uname-uname) "x86_64"))))

and then it still would not work for offloading. It might be a cleanish
way to enable development in the 64bit childhurd before the full gcc-14
transition?

--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com| Avatar® https://AvatarAcademy.com
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 01/51] gnu: gnumach: Update to v1.8+git20240714.
(address . 74290@debbugs.gnu.org)
763d643429bb1b89628f6dd6261a6b35cbc1df5a.1731999203.git.janneke@gnu.org
* 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

Toggle diff (85 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index ff6c6be5f0..cd9ad3aebb 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1463,6 +1463,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@";
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 00/51] Add support for x86_64-gnu, aka the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
cover.1731999202.git.janneke@gnu.org
New in V3:

* Change of plans: Remove (current-gcc*) indirections; bump %xgcc to gcc-14,
* Use gcc-14 in make-bootstrap, not just for 64bit Hurd bootstrap binaries,
* Fix cross-built guile-lzib for the 64bit Hurd,
* Add gdb-15.2 with support for the 64bit Hurd,
* Fix hanging of static tar upon --mtime=@1 warning,
* Fix hanging of bash while configuring diffutils,
* Add three must-have patches from Debian to glibc/hurd,
* Fix bootstrap-glibc's libm.so linker script,
* Patch libgpg-error-1.47 for the 64bit Hurd instead of juggling v1.50,
* Use gcc-14 [cross-]build fixes for guile-lzlib, bash-minimal,
git-minimal, libffi, perl, and texinfo-4 generally when
cross-building, not just for the 64bit Hurd,
* Add gcc-14 [cross-]build fixes to 32bit targets for libedit and
libssh.

Resulting in

Toggle snippet (64 lines)
Last login: Mon Nov 18 23:03:05 2024 from 10.0.2.2
??????
??????
?????? This is the GNU Hurd. Welcome.
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/3a5il5hniygz39mx3prp5hp63mzhap37-bash.drv
/gnu/store/6zx9w9zhhp1azpzjh91y1vkf3n80mb3d-tar.drv
/gnu/store/ayjm0r6x1j8zzsjyr1shwnp1riwxx99c-guile-static-stripped-3.0.9-x86_64-pc-gnu.tar.xz.drv
/gnu/store/bc5mrw4zsgxfap7jns5gawm8f3ph7qkc-xz.drv
/gnu/store/yal3zl9d5z3v04031384ngwf95fnr5lm-mkdir.drv
/gnu/store/6mm475diy40ndxwb0a0gf1zlbvh3hnzr-guile-bootstrap-2.0.drv
/gnu/store/8k0hmakcghiz1iwd7k12j7h9jbca5snq-module-import-compiled.drv
/gnu/store/b80napyrxi4zv7qvjk968ma7j6c9l9j5-module-import-compiled.drv
/gnu/store/flib02wl6g7kx191vscbz2d4c88q1hn8-binutils-static-stripped-2.41-x86_64-pc-gnu.tar.xz.drv
/gnu/store/chknjczabywxlq560wv8c90vfcsqly4k-binutils-bootstrap-0.drv
/gnu/store/nmfksk734hdjs6pdwpn6rz15aba57liw-glibc-stripped-2.39-x86_64-pc-gnu.tar.xz.drv
/gnu/store/f9zb5fdlyzikz3imcffdw3j2zxjrmigv-glibc-bootstrap-0.drv
/gnu/store/hx98agiqzh97z6q8lxjrwgndvss72lla-gcc-stripped-14.2.0-x86_64-pc-gnu.tar.xz.drv
/gnu/store/fpsga1c9a8ziz1bsp0gqjn3vrs2fy5b7-gcc-bootstrap-0.drv
/gnu/store/vd3cms89c6dd5syk67casrncdf3srp89-static-binaries-0-x86_64-pc-gnu.tar.xz.drv
/gnu/store/jlymwk4jqarbyndd42a700xhxswx3vjm-bootstrap-binaries-0.drv
/gnu/store/x433dmz11as7axpkv69lqa2v44lg7npv-profile.drv
[..]
building /gnu/store/fpsga1c9a8ziz1bsp0gqjn3vrs2fy5b7-gcc-bootstrap-0.drv...
building profile with 4 packages...
root@guixygnu64 ~ [env]# guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)'
[..]
/gnu/store/bnas62xn8zav82h39r5rfal40h0km2mf-make-boot0-4.4.1
root@guixygnu64 ~ [env]# guix build hello --verbosity=2
[..]
building /gnu/store/c7vj6mqaji52ghpc1g3g9bws09fphyn8-Python-3.5.9.tar.xz.drv...
building /gnu/store/4s4673b61571kxgpra9d28lrpp3yz0xq-bash-5.1.tar.xz.drv...
building /gnu/store/7pc112kljri6vsk5s21skaypr4qk3n2g-binutils-2.41.tar.xz.drv...
building /gnu/store/9z61jcjmmbvz4qgxdmkxrhwc9y1fzlmp-diffutils-boot0-3.10.drv...
building /gnu/store/qf3wyl8kgzz2iy6z6bamdn4288sfgmdv-file-5.45.tar.xz.drv...
building /gnu/store/vpjlhqh2nq3rdaw97ajydy9jnwhmy13s-findutils-4.9.0.tar.xz.drv...
building /gnu/store/h2h7hh7kixxisf39lp68psik9jxc2790-file-boot0-5.45.drv...
building /gnu/store/zdzz8hzd7b5jdgrsp8fr8flv3fmpvzpk-findutils-boot0-4.9.0.drv...
building /gnu/store/jcipyysphkwc1dxa9wsc4nnbqylsdbqw-gcc-14.2.0.tar.xz.drv...
building /gnu/store/8zmvmk2v347yw0sh9acgyxqhn10rrzdp-binutils-cross-boot0-2.41.drv...
building /gnu/store/ia44hglqlnvslq5cw7mj1i0hvif9p5vp-expat-2.5.0.drv...
building /gnu/store/skc7yvra95gzcbwgfnc1b1wcj6hw720c-gcc-14.2.0.tar.xz.drv...
building /gnu/store/gi1ghd56yk94iqq2qp0573cypzm0p0sj-glibc-2.39.tar.xz.drv...
building /gnu/store/jgw4blvxhibbmpc2d2fz1n1c5fn9fyak-gmp-6.0.0a.tar.xz.drv...
building /gnu/store/7nfyg7z2g08shl9mc7z19ix3amfjpn0k-grep-3.11.tar.xz.drv...
building /gnu/store/s5and4p7lg21043afbf7kg8qvic2l970-guile-3.0.9.tar.xz.drv...
building /gnu/store/r90wl58jlmkrhv5ln42xvs12j373msi1-ld-wrapper-boot0-0.drv...
building /gnu/store/8mizh7y6p0ypc8wwcbmg863m97qqwpm8-libstdc++-boot0-14.2.0.drv...
building /gnu/store/79bjqzpk6lnmrlrq15qrjipsll59rqig-m4-boot0-1.4.19.drv...
building /gnu/store/97h3533sf4b30mihx2wpia4kr6z1c2yx-gcc-cross-boot0-14.2.0.drv...
checking build system compiler gcc... no
configure: error: Specified CC_FOR_BUILD doesn't seem to work
make[1]: *** [Makefile:5118: configure-gmp] Error 1
make[1]: Leaving directory '/tmp/guix-build-gcc-cross-boot0-14.2.0.drv-0/build'
make: *** [Makefile:1046: all] Error 2

not bad, more work to do before we arrive at "hello".

A new `core-packages-team' branch will change the default to gcc-14.
This means that native building on the 64bit Hurd would have to "wait" until
`core-packages-team' is usable enough for the Hurd. Until that time
we may use (last patch):

gnu: Use gcc-14, gcc-toolchain-14 on the 64bit Hurd.

that selects gcc-14 when the host system (uname, not %current-system) is
a x86_64-GNU. WDYT?

Greetings,
Janneke

Janneke Nieuwenhuizen (51):
gnu: gnumach: Update to v1.8+git20240714.
gnu: mig: Update to 1.8+git20231217.
gnu: hurd: Update to 0.9.git20240714.
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: Support [cross-]build with gcc-14.
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: glibc/hurd: Add patches for the 64bit Hurd.
gnu: bash: Avoid hang when cross-built for the Hurd.
gnu: git-minimal: Support [cross-]build with gcc-14 and the 64bit
Hurd.
gnu: flex: Fix [cross-]build with gcc-14.
gnu: libffi: Fix [cross-]build with gcc-14.
gnu: perl: Support [cross-]build with gcc-14 and the 64bit Hurd.
gnu: texinfo-4: Fix [cross-]build with gcc-14 and the 64bit Hurd.
gnu: hurd: Fix build with gcc-14.
gnu: netdde: Fix build with gcc-14.
gnu: libedit: Fix [cross-]build with gcc-14 for 32bit.
gnu: libssh: Fix [cross-]build with gcc-14 for 32bit.
gnu: guile-lzlib: Support [cross-]build with gcc-14 and the 64bit
Hurd.
gnu: cross-base: Update %xgcc to gcc-14, to support the 64bit Hurd.
gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd.
DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd.
system: image: Add hurd64 image types.
gnu: libgpg-error: Support 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: 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: Add gdb-15.2, with support for the 64bit Hurd.
gnu: bootstrap: %bootstrap-glibc: Also fix libm.so.
gnu: findutils: Disable tests on the 64bit Hurd.
system: examples: Add bare-hurd64.tmpl.
system: examples: Add devel-hurd64.tmpl.
gnu: Use gcc-14, gcc-toolchain-14 on the 64bit Hurd.

doc/guix.texi | 9 +-
gnu/local.mk | 15 +
gnu/packages/admin.scm | 14 +-
gnu/packages/base.scm | 80 +-
gnu/packages/bash.scm | 22 +
gnu/packages/bootloaders.scm | 8 +
gnu/packages/bootstrap.scm | 51 +-
gnu/packages/commencement.scm | 24 +-
gnu/packages/cross-base.scm | 18 +-
gnu/packages/crypto.scm | 13 +
gnu/packages/elf.scm | 6 +-
gnu/packages/flex.scm | 8 +
gnu/packages/gcc.scm | 15 +-
gnu/packages/gdb.scm | 22 +
gnu/packages/gettext.scm | 16 +-
gnu/packages/gnupg.scm | 22 +-
gnu/packages/guile-xyz.scm | 2 +-
gnu/packages/guile.scm | 16 +-
gnu/packages/hurd.scm | 195 ++--
gnu/packages/libedit.scm | 8 +
gnu/packages/libffi.scm | 8 +-
gnu/packages/m4.scm | 9 +-
gnu/packages/make-bootstrap.scm | 49 +-
gnu/packages/patches/gdb-hurd64.patch | 923 ++++++++++++++++++
.../glibc-hurd-pthread_setcancelstate.patch | 92 ++
gnu/packages/patches/glibc-hurd64-fault.patch | 32 +
.../glibc-hurd64-intr-msg-clobber.patch | 62 ++
gnu/packages/patches/gnumach-version.patch | 23 +
gnu/packages/patches/grub-hurd64.patch | 32 +
gnu/packages/patches/guile-lzlib-hurd64.patch | 32 +
gnu/packages/patches/hurd-64bit.patch | 56 ++
gnu/packages/patches/inetutils-hurd64.patch | 65 ++
.../patches/libgpg-error-hurd64.patch | 78 ++
.../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 | 18 +-
gnu/packages/ssh.scm | 9 +-
gnu/packages/texinfo.scm | 50 +-
gnu/packages/tls.scm | 9 +
gnu/packages/version-control.scm | 7 +-
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 | 35 +-
m4/guix.m4 | 12 +-
56 files changed, 2532 insertions(+), 260 deletions(-)
create mode 100644 gnu/packages/patches/gdb-hurd64.patch
create mode 100644 gnu/packages/patches/glibc-hurd-pthread_setcancelstate.patch
create mode 100644 gnu/packages/patches/glibc-hurd64-fault.patch
create mode 100644 gnu/packages/patches/glibc-hurd64-intr-msg-clobber.patch
create mode 100644 gnu/packages/patches/gnumach-version.patch
create mode 100644 gnu/packages/patches/grub-hurd64.patch
create mode 100644 gnu/packages/patches/guile-lzlib-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/libgpg-error-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: 1affd2b5aa7f5467a44cf757c4fc0c6956d3f3c9
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 02/51] gnu: mig: Update to 1.8+git20231217.
(address . 74290@debbugs.gnu.org)
5173e555533cca3818f3e8a7b818185ab72f9e32.1731999203.git.janneke@gnu.org
* 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(-)

Toggle diff (24 lines)
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))
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 03/51] gnu: hurd: Update to 0.9.git20240714.
(address . 74290@debbugs.gnu.org)
3bb598c7040a3323537a3ee3b5be4dcdfe118eb0.1731999203.git.janneke@gnu.org
* 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(-)

Toggle diff (58 lines)
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))
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 04/51] gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd.
(address . 74290@debbugs.gnu.org)
e1944f5119ed13d8e95b1ca78eb0e48418ee0be0.1731999203.git.janneke@gnu.org
* 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.
* gnu/packages/cross-base.scm (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)
[native-inputs]: Move final-inputs before cross-packages.
(%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.
(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.
* guix/platforms/x86.scm (x86_64-gnu): New exported variable.
* guix/utils.scm (target-hurd64? system-hurd64?): New procedures.
---
gnu/packages/bootstrap.scm | 3 ++-
gnu/packages/cross-base.scm | 6 +++---
gnu/packages/make-bootstrap.scm | 24 +++++++++++++++++-------
guix/platforms/x86.scm | 11 ++++++++++-
guix/utils.scm | 15 ++++++++++++++-
5 files changed, 46 insertions(+), 13 deletions(-)

Toggle diff (162 lines)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 3743abf9fe..33cbaa30ae 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/cross-base.scm b/gnu/packages/cross-base.scm
index 5781341a87..83672ab383 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/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index edc536bff4..689d48d342 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -145,7 +145,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 +157,7 @@ (define (package-with-relocatable-glibc p)
(variable "CROSS_CPLUS_INCLUDE_PATH")
(files '("include")))
(package-search-paths 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 +397,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
@@ -642,6 +649,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
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
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 05/51] gnu: cross-libc: Support cross-building for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
39e939ffd890362b01626b242d583d34e9176a9f.1731999203.git.janneke@gnu.org
* 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 | 9 +++++++--
gnu/packages/bootstrap.scm | 2 +-
gnu/packages/cross-base.scm | 8 ++++++--
3 files changed, 14 insertions(+), 5 deletions(-)

Toggle diff (68 lines)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 90c25b54e1..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")
@@ -1089,7 +1089,12 @@ (define-public glibc
(add-after 'install 'create-machine-symlink
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
- (cpu "i386")
+ (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)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 33cbaa30ae..27798fe278 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -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/cross-base.scm b/gnu/packages/cross-base.scm
index 83672ab383..4961b3b4c0 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")
@@ -748,7 +748,11 @@ (define* (cross-libc* target
(add-after 'install 'create-machine-symlink
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
- (cpu "i386")
+ (cpu ,(match target
+ ((? target-x86-32?)
+ "i386")
+ ((? target-x86-64?)
+ "x86_64")))
(machine (string-append
out "/include/mach/machine")))
(unless (file-exists? machine)
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 06/51] gnu: bash-minimal: Support [cross-]build with gcc-14.
(address . 74290@debbugs.gnu.org)
e7f502729665cbea95a5ac557ae8e0dfd108ed04.1731999203.git.janneke@gnu.org
* gnu/packages/bash-minimal.scm (bash)[arguments]: When building for the 64bit
hurd, or cross-building, use "CFLAGS=-g -O2 -Wno-implicit-function-declaration".

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

Toggle diff (28 lines)
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index 93641a78d5..56918d79bd 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.
;;;
@@ -251,6 +252,13 @@ (define-public bash-minimal
;; modules and related code.
"ac_cv_func_dlopen=no"
+ ,@(if (or (target-hurd64?) (%current-target-system))
+ ;; gcc-14 implictly uses -Wimplicit-function-declaration
+ ;; which together with -Werror causes:
+ ;; ./enable.def:492:11: error: implicit declaration of function ‘dlclose’;
+ '("CFLAGS=-g -O2 -Wno-implicit-function-declaration")
+ '())
+
,@(if (%current-target-system)
'("bash_cv_job_control_missing=no"
"bash_cv_getcwd_malloc=yes")
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 07/51] gnu: elfutils: Fix build for 64bit Hurd.
(address . 74290@debbugs.gnu.org)
d018871bfe1d12b6eeabfa6a4593395113c468e2.1731999203.git.janneke@gnu.org
* 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(-)

Toggle diff (26 lines)
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)
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 08/51] gnu: grep: Fix build for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
33e729f2ea5e62c16279d6ce1b9bb2a1f3ddeb6e.1731999203.git.janneke@gnu.org
* 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(+)

Toggle diff (20 lines)
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 _
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 09/51] gnu: patch: Fix build for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
3b43e18a9c575b1db3204b9182e74e68ecfab619.1731999203.git.janneke@gnu.org
* 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(-)

Toggle diff (62 lines)
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 '()))))
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 11/51] gnu: libstdc++: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
cc8cfd8cc2fc09fdfabcc010dbb7ef6a477c555d.1731999203.git.janneke@gnu.org
* 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(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index c9e475b676..64ba37fd69 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -1024,7 +1024,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="
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 10/51] gnu: libxcrypt: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
66779608ae5f1662fd6f5ee55d323aeebc9f7101.1731999203.git.janneke@gnu.org
* 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-hurd64-patch'.

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

Toggle diff (89 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index cd9ad3aebb..9a775cc160 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1730,6 +1730,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..9ef1a53fa6 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,18 @@ (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-hurd64-patch
+ (lambda _
+ (let ((patch
+ #$(local-file
+ (search-patch "libxcrypt-hurd64.patch"))))
+ (invoke "patch" "--force" "-p1" "-i" patch))))))
+ '()))
(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
+
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 13/51] gnu: bash: Avoid hang when cross-built for the Hurd.
(address . 74290@debbugs.gnu.org)
123d8bbbda215439ea79e7b94c6b3e7b425ffcbe.1731999203.git.janneke@gnu.org
For example, without this patch bash hangs while configuring diffutils.
Reproducer:

cat >x.awk <<EOF
x... repeat 16384 (the actual pipe size) times
EOF

* gnu/packages/bash.scm (bash): When cross-building for the Hurd, add new
"create-pipesize.h" stage.

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

Toggle diff (27 lines)
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index 56918d79bd..642a405985 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -175,6 +175,20 @@ (define-public bash
#:phases
(modify-phases %standard-phases
+ ,@(if (and (target-hurd?) (not (system-hurd?)))
+ `((add-after 'configure 'create-pipesize.h
+ ;; The Bash Makefile mentions how PIPESIZE calculation is
+ ;; "technically wrong" when cross-compiling, and offers no
+ ;; way to override it. On the 64bit Hurd, it can make
+ ;; bash hang.
+ (lambda _
+ (with-directory-excursion "builtins"
+ (with-output-to-file "psize.aux"
+ (lambda _ (display "dummy to pacify make\n")))
+ (with-output-to-file "pipesize.h"
+ (lambda _ (display "#define PIPESIZE 16384\n")))))))
+ '())
+
(add-after 'install 'install-sh-symlink
(lambda* (#:key outputs #:allow-other-keys)
;; Add a `sh' -> `bash' link.
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 12/51] gnu: glibc/hurd: Add patches for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
0f1b235cb863ff70acda30d9e11d45770e2dade8.1731999203.git.janneke@gnu.org
These patches fix:

* Statically linked tar to hang/segfault upon issuing the "--mtime=@1"
warning; this is also applicable for the 32bit Hurd using glibc-2.39!


* Shell replacement problems for the 64bit Hurd.


* gnu/packages/patches/glibc-hurd-pthread_setcancelstate.patch,
gnu/packages/patches/glibc-hurd64-fault.patch,
gnu/packages/patches/glibc-hurd64-intr-msg-clobber.patch: New files.
* gnu/local.mk (dist_patch_DATA): Register them.
* gnu/packages/base.scm (glibc/hurd): Use them.

Change-Id: I9ee65983876cd22ad1dc01aabb41a34074631599
---
gnu/local.mk | 3 +
gnu/packages/base.scm | 11 ++-
.../glibc-hurd-pthread_setcancelstate.patch | 92 +++++++++++++++++++
gnu/packages/patches/glibc-hurd64-fault.patch | 32 +++++++
.../glibc-hurd64-intr-msg-clobber.patch | 62 +++++++++++++
5 files changed, 199 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/glibc-hurd-pthread_setcancelstate.patch
create mode 100644 gnu/packages/patches/glibc-hurd64-fault.patch
create mode 100644 gnu/packages/patches/glibc-hurd64-intr-msg-clobber.patch

Toggle diff (243 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 9a775cc160..eb50df6e13 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1439,7 +1439,10 @@ dist_patch_DATA = \
%D%/packages/patches/glibc-hurd-getauxval.patch \
%D%/packages/patches/glibc-hurd-gettyent.patch \
%D%/packages/patches/glibc-hurd-mach-print.patch \
+ %D%/packages/patches/glibc-hurd-pthread_setcancelstate.patch \
%D%/packages/patches/glibc-hurd-signal-sa-siginfo.patch \
+ %D%/packages/patches/glibc-hurd64-fault.patch \
+ %D%/packages/patches/glibc-hurd64-intr-msg-clobber.patch \
%D%/packages/patches/glibc-ldd-powerpc.patch \
%D%/packages/patches/glibc-ldd-x86_64.patch \
%D%/packages/patches/glibc-locales.patch \
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 83f8c0d9e9..bab1f258c6 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -1588,7 +1588,16 @@ (define-public which
command.")
(license gpl3+))) ; some files are under GPLv2+
-(define-public glibc/hurd glibc)
+(define-public glibc/hurd
+ (package/inherit glibc
+ (source
+ (origin
+ (inherit (package-source glibc))
+ (patches
+ (append (origin-patches (package-source glibc))
+ (search-patches "glibc-hurd-pthread_setcancelstate.patch"
+ "glibc-hurd64-fault.patch"
+ "glibc-hurd64-intr-msg-clobber.patch")))))))
(define-public glibc/hurd-headers
(package/inherit glibc/hurd
diff --git a/gnu/packages/patches/glibc-hurd-pthread_setcancelstate.patch b/gnu/packages/patches/glibc-hurd-pthread_setcancelstate.patch
new file mode 100644
index 0000000000..1d7c81b98e
--- /dev/null
+++ b/gnu/packages/patches/glibc-hurd-pthread_setcancelstate.patch
@@ -0,0 +1,92 @@
+Upstream-status: Taken from <https://salsa.debian.org/glibc-team/glibc/-/blob/25a0a47767fe7dc5151eb36afaade17218728efe/debian/patches/hurd-i386/local-static_pthread_setcancelstate.diff>.
+
+This is needed for the 64bit Hurd statically linked tar non to hang when
+issuing a warning.
+
+since the move of libpthread functions to libc, glibc dropped the use
+of __libc_ptf_call. But htl hasn't made the move yet, so we have to use
+__libc_ptf_call there for now.
+
+Index: glibc-2.36/misc/error.c
+===================================================================
+--- glibc-2.36.orig/misc/error.c
++++ glibc-2.36/misc/error.c
+@@ -240,7 +240,8 @@ __error_internal (int status, int errnum
+ /* We do not want this call to be cut short by a thread
+ cancellation. Therefore disable cancellation for now. */
+ int state = PTHREAD_CANCEL_ENABLE;
+- __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &state);
++ __libc_ptf_call (__pthread_setcancelstate,
++ (PTHREAD_CANCEL_DISABLE, &state), 0);
+ #endif
+
+ flush_stdout ();
+@@ -262,7 +263,7 @@ __error_internal (int status, int errnum
+
+ #ifdef _LIBC
+ _IO_funlockfile (stderr);
+- __pthread_setcancelstate (state, NULL);
++ __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0);
+ #endif
+ }
+
+@@ -306,7 +307,9 @@ __error_at_line_internal (int status, in
+ /* We do not want this call to be cut short by a thread
+ cancellation. Therefore disable cancellation for now. */
+ int state = PTHREAD_CANCEL_ENABLE;
+- __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &state);
++ __libc_ptf_call (__pthread_setcancelstate,
++ (PTHREAD_CANCEL_DISABLE, &state),
++ 0);
+ #endif
+
+ flush_stdout ();
+@@ -336,7 +339,7 @@ __error_at_line_internal (int status, in
+
+ #ifdef _LIBC
+ _IO_funlockfile (stderr);
+- __pthread_setcancelstate (state, NULL);
++ __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0);
+ #endif
+ }
+
+Index: glibc-2.36/libio/iopopen.c
+===================================================================
+--- glibc-2.36.orig/libio/iopopen.c
++++ glibc-2.36/libio/iopopen.c
+@@ -281,9 +281,10 @@ _IO_new_proc_close (FILE *fp)
+ do
+ {
+ int state;
+- __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &state);
++ __libc_ptf_call (__pthread_setcancelstate,
++ (PTHREAD_CANCEL_DISABLE, &state), 0);
+ wait_pid = __waitpid (((_IO_proc_file *) fp)->pid, &wstatus, 0);
+- __pthread_setcancelstate (state, NULL);
++ __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0);
+ }
+ while (wait_pid == -1 && errno == EINTR);
+ if (wait_pid == -1)
+Index: glibc-2.36/stdlib/fmtmsg.c
+===================================================================
+--- glibc-2.36.orig/stdlib/fmtmsg.c
++++ glibc-2.36/stdlib/fmtmsg.c
+@@ -124,7 +124,8 @@ fmtmsg (long int classification, const c
+ /* We do not want this call to be cut short by a thread
+ cancellation. Therefore disable cancellation for now. */
+ int state = PTHREAD_CANCEL_ENABLE;
+- __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &state);
++ __libc_ptf_call (__pthread_setcancelstate,
++ (PTHREAD_CANCEL_DISABLE, &state), 0);
+
+ __libc_lock_lock (lock);
+
+@@ -193,7 +194,7 @@ fmtmsg (long int classification, const c
+
+ __libc_lock_unlock (lock);
+
+- __pthread_setcancelstate (state, NULL);
++ __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0);
+
+ return result;
+ }
diff --git a/gnu/packages/patches/glibc-hurd64-fault.patch b/gnu/packages/patches/glibc-hurd64-fault.patch
new file mode 100644
index 0000000000..24980e8c2a
--- /dev/null
+++ b/gnu/packages/patches/glibc-hurd64-fault.patch
@@ -0,0 +1,32 @@
+Upstream-status: Taken from: <https://salsa.debian.org/glibc-team/glibc/-/blob/c36c87acb1a35d6e06db6cef1e28cf2f405e1a9e/debian/patches/hurd-i386/git-fault-64bit.diff>.
+
+See <https://lists.gnu.org/archive/html/bug-hurd/2024-11/msg00115.html>.
+
+commit 11ad033e1c09c8b8e7bbaa72420f41ab8bcf0f63
+Author: Flavio Cruz <flaviocruz@gmail.com>
+Date: Tue Jul 30 00:51:20 2024 -0400
+
+ x86_64 hurd: ensure we have a large enough buffer to receive exception_raise requests.
+
+ Message-ID: <gtxd6s4s7fi7hdrlb7zayq3akij7x6jqawwq3zfl3v4nqspulo@euucuzeonrl6>
+
+diff --git a/hurd/hurdfault.c b/hurd/hurdfault.c
+index 5110c6030f..1fe973f54d 100644
+--- a/hurd/hurdfault.c
++++ b/hurd/hurdfault.c
+@@ -121,7 +121,14 @@ faulted (void)
+ struct
+ {
+ mach_msg_header_t head;
+- char buf[64];
++ /* This is the size of the exception_raise request
++ * including mach_msg_header_t.
++ * See generated code in faultexc_server.c. */
++#ifdef __LP64__
++ char buf[112];
++#else
++ char buf[64];
++#endif
+ } request;
+ mig_reply_header_t reply;
+ extern int _hurdsig_fault_exc_server (mach_msg_header_t *,
diff --git a/gnu/packages/patches/glibc-hurd64-intr-msg-clobber.patch b/gnu/packages/patches/glibc-hurd64-intr-msg-clobber.patch
new file mode 100644
index 0000000000..600f89a711
--- /dev/null
+++ b/gnu/packages/patches/glibc-hurd64-intr-msg-clobber.patch
@@ -0,0 +1,62 @@
+Upstream-status: Taken from <https://salsa.debian.org/glibc-team/glibc/-/blob/c36c87acb1a35d6e06db6cef1e28cf2f405e1a9e/debian/patches/hurd-i386/git-intr-msg-clobber.diff>.
+
+See <https://lists.gnu.org/archive/html/bug-hurd/2024-11/msg00115.html>,
+and <https://lists.debian.org/debian-hurd/2024/07/msg00063.html>.
+
+Commited for 2.40
+
+commit c8b4ce0b368115714bd4cce131e1683759471099
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Sat Jul 13 17:00:55 2024 +0200
+
+ hurd: Fix restoring message to be retried
+
+ save_data stores the start of the original message to be retried,
+ overwritten by the EINTR reply. In 64b builds the overwrite is however
+ rounded up to the 64b pointer size, so we have to save more than just
+ the 32b err.
+
+ Thanks a lot to Luca Dariz for the investigation!
+
+diff --git a/hurd/intr-msg.c b/hurd/intr-msg.c
+index 2c2e7dc463..424c1fc700 100644
+--- a/hurd/intr-msg.c
++++ b/hurd/intr-msg.c
+@@ -42,7 +42,10 @@ _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg,
+ struct clobber
+ {
+ mach_msg_type_t type;
+- error_t err;
++ union {
++ error_t err;
++ uintptr_t align;
++ };
+ };
+ union msg
+ {
+
+Taken from: <https://salsa.debian.org/glibc-team/glibc/-/blob/027f94215a633cbf53794d4b48675fde36706e35/debian/patches/hurd-i386/local-intr-msg-clobber.diff>
+
+Force putting save_data on the stack rather than in SSE register
+
+The signal management does not yet properly save SSE state, so that save_data
+would get overwritten by signal handlers, notably leading to `` shell
+replacement getting empty content because then the io_read RPC retry gets an
+MIG_BAD_ARGUMENTS error.
+
+XXX: This is only temporary to fix the common shll replacement issue, and is
+waiting for proper SSE state restoration.
+
+Index: glibc-2.38/hurd/intr-msg.c
+===================================================================
+--- glibc-2.38.orig/hurd/intr-msg.c
++++ glibc-2.38/hurd/intr-msg.c
+@@ -79,7 +79,7 @@ _hurd_intr_rpc_mach_msg (mach_msg_header
+ mach_msg_bits_t msgh_bits;
+ mach_port_t remote_port;
+ mach_msg_id_t msgid;
+- struct clobber save_data;
++ volatile struct clobber save_data;
+
+ if ((option & (MACH_SEND_MSG|MACH_RCV_MSG)) != (MACH_SEND_MSG|MACH_RCV_MSG)
+ || _hurd_msgport_thread == MACH_PORT_NULL)
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 15/51] gnu: flex: Fix [cross-]build with gcc-14.
(address . 74290@debbugs.gnu.org)
90804ab4f172718c941e2c7897ae87abc1ebb56e.1731999203.git.janneke@gnu.org
* gnu/packages/flex.scm (flex): When building for the 64bit Hurd, or
cross-compiling, add "-Wno-int-conversion "-Wno-implicit-function-declaration"
to #:configure-flags.

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

Toggle diff (35 lines)
diff --git a/gnu/packages/flex.scm b/gnu/packages/flex.scm
index 7972675971..4ad1e1382a 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 (or (target-hurd64?) (%current-target-system))
+ (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))
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 14/51] gnu: git-minimal: Support [cross-]build with gcc-14 and the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
b8449d76042afc541ab5af2c26bb0cd2a96e8a8b.1731999203.git.janneke@gnu.org
* gnu/packages/version-control.scm (git-minimal)[arguments]: When building for
the 64bit Hurd, or cross-compiling, 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 | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

Toggle diff (27 lines)
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index c892a83a98..ca77b485ad 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -296,7 +296,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 (or (target-hurd64?) (%current-target-system))
+ #~("-Wno-implicit-function-declaration")
+ #~()))
#:phases
#~(modify-phases %standard-phases
#$@(if (%current-target-system)
@@ -305,7 +308,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.
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 17/51] gnu: perl: Support [cross-]build with gcc-14 and the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
a3603fcba30fdc6766b9820d01e26a85bf80aedf.1731999203.git.janneke@gnu.org
* gnu/packages/cross-base.scm (perl)[native-inputs]: Update perl-cross to 1.6.

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

Toggle diff (31 lines)
diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm
index faaac13bf1..3941ad4831 100644
--- a/gnu/packages/perl.scm
+++ b/gnu/packages/perl.scm
@@ -248,14 +248,16 @@ (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 "1.6"))
+ (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
+ "0s06lkx5b79r9cn6pm5p6d4jbdjq7wg7rjr75nw5xdhw1z3wnl2d"))))))
'()))
(native-search-paths (list (search-path-specification
(variable "PERL5LIB")
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 16/51] gnu: libffi: Fix [cross-]build with gcc-14.
(address . 74290@debbugs.gnu.org)
cac75ab66f0f2b199ffdd074f528c484a9cc296b.1731999203.git.janneke@gnu.org
* gnu/packages/libffi.scm (libffi)[arguments]: When building for the 64bit
Hurd, or cross-building, add "CFLAGS" to #:configure-flags to disable breaking
warning.

Change-Id: I05bf3f460f3e292626de1894b7a3cf381cb07702
---
gnu/packages/libffi.scm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

Toggle diff (28 lines)
diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm
index ba3fc6bc79..62be8f0c4a 100644
--- a/gnu/packages/libffi.scm
+++ b/gnu/packages/libffi.scm
@@ -8,6 +8,7 @@
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 John Doe <dftxbs3e@free.fr>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -60,7 +61,12 @@ (define-public libffi
`(;; Prevent the build system from passing -march and -mtune to the
;; compiler. See "ax_cc_maxopt.m4" and "ax_gcc_archflag.m4".
#:configure-flags '("--enable-portable-binary"
- "--without-gcc-arch")))
+ "--without-gcc-arch"
+ ,@(if (or (target-hurd64?) (%current-target-system))
+ (list (string-append
+ "CFLAGS=-g -O2"
+ " -Wno-implicit-function-declaration"))
+ '()))))
(outputs '("out" "debug"))
(synopsis "Foreign function call interface library")
(description
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 19/51] gnu: hurd: Fix build with gcc-14.
(address . 74290@debbugs.gnu.org)
fc5e5cc6b7c7f21ca916672004fec0034428cfc0.1731999203.git.janneke@gnu.org
* gnu/packages/hurd.scm (hurd)[arguments]: In phase "build-libdde-linux",
disable some warnings breaking the build, using "WARNINGS=...".

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

Toggle diff (19 lines)
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 06fae1bd3b..5a60d8ac13 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -478,6 +478,12 @@ (define-public hurd
"/bin/bash")
(string-append "CC="
,(cc-for-target))
+ (string-append "WARNINGS="
+ " -Wno-declaration-missing-parameter-type"
+ " -Wno-implicit-function-declaration"
+ " -Wno-implicit-int"
+ " -Wno-int-conversion"
+ " -Wno-strict-prototypes")
"ARCH=x86")))
(add-after 'install 'install-goodies
(lambda* (#:key inputs native-inputs outputs #:allow-other-keys)
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 18/51] gnu: texinfo-4: Fix [cross-]build with gcc-14 and the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
f89984f54482cb3e05ef3c165d731050c718d94f.1731999203.git.janneke@gnu.org
* gnu/packages/texinfo.scm (texinfo-4): When building for the 64bit Hurd, or
cross-compiling, add "-Wno-incompatible-pointer-types" to #:configure-flags.

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

Toggle diff (73 lines)
diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm
index 81afdaf7a7..c30ca3c788 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 (or (target-hurd64?) (%current-target-system))
+ (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
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 21/51] gnu: libedit: Fix [cross-]build with gcc-14 for 32bit.
(address . 74290@debbugs.gnu.org)
183d4ea53dbc21e1271b7fe0b7e8e3a6303da264.1731999203.git.janneke@gnu.org
* gnu/packages/libedit.scm (libedit)[arguments]: When cross-compiling to a
32bit host, add CFLAGS to #:configure-flags to disable a breaking warning.

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

Toggle diff (37 lines)
diff --git a/gnu/packages/libedit.scm b/gnu/packages/libedit.scm
index f04d3aafe4..252f8a4966 100644
--- a/gnu/packages/libedit.scm
+++ b/gnu/packages/libedit.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com>
;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -21,8 +22,10 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages libedit)
+ #:use-module (guix gexp)
#:use-module (guix licenses)
#:use-module (guix packages)
+ #:use-module (guix utils)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages ncurses))
@@ -39,6 +42,11 @@ (define-public libedit
(sha256
(base32 "0wch48nml28jj6ild889745dsg2agm7mpvrmbl1gi98nw6vjrf6v"))))
(build-system gnu-build-system)
+ (arguments
+ (if (and (%current-target-system) (target-x86-32?))
+ (list #:configure-flags
+ #~(list "CFLAGS=-g -O2 -Wno-incompatible-pointer-types"))
+ '()))
(inputs
(list ncurses))
(home-page "https://thrysoee.dk/editline/")
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 23/51] gnu: guile-lzlib: Support [cross-]build with gcc-14 and the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
00e60fa4abeb1cb337acf0a4ff0d56de2700e448.1731999203.git.janneke@gnu.org
* gnu/packages/patches/guile-lzlib-hurd64.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/guile.scm (guile-lzlib)[arguments]: Use G-expressions. When
building for the 64bit Hurd, or cross-compiling, use it in new
"apply-hurd64-patch" stage.

Change-Id: Id03f71baa80e2f4f967f54037ce7d9f1c5dc4bb6
---
gnu/local.mk | 1 +
gnu/packages/guile.scm | 16 ++++++++--
gnu/packages/patches/guile-lzlib-hurd64.patch | 32 +++++++++++++++++++
3 files changed, 46 insertions(+), 3 deletions(-)
create mode 100644 gnu/packages/patches/guile-lzlib-hurd64.patch

Toggle diff (86 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index eb50df6e13..be6befb921 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1516,6 +1516,7 @@ dist_patch_DATA = \
%D%/packages/patches/guile-fix-invalid-unicode-handling.patch \
%D%/packages/patches/guile-gdbm-ffi-support-gdbm-1.14.patch \
%D%/packages/patches/guile-hurd-posix-spawn.patch \
+ %D%/packages/patches/guile-lzlib-hurd64.patch \
%D%/packages/patches/guile-present-coding.patch \
%D%/packages/patches/guile-rsvg-pkgconfig.patch \
%D%/packages/patches/guile-ssh-rename-bool.patch \
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 8dabbb2c5e..69dff9211f 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2014, 2016, 2018 David Thompson <davet@gnu.org>
;;; Copyright © 2014, 2017, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015, 2017 Christine Lemmer-Webber <cwebber@dustycloud.org>
-;;; Copyright © 2016, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2016, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2016, 2017 Leo Famulari <leo@famulari.name>
;;; Copyright © 2016, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
@@ -962,8 +962,18 @@ (define-public guile-lzlib
"1whgmwkr1v8m63p4aaqn8blwl9vcrswwhbfv4bm0aghl5a6rryd7"))))
(build-system gnu-build-system)
(arguments
- '(#:make-flags
- '("GUILE_AUTO_COMPILE=0"))) ;to prevent guild warnings
+ (list
+ #:make-flags #~'("GUILE_AUTO_COMPILE=0") ;prevent guild warnings
+ #:phases (if (or (%current-target-system) (target-hurd64?))
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'apply-hurd64-patch
+ (lambda _
+ (let ((patch
+ #$(local-file
+ (search-patch
+ "guile-lzlib-hurd64.patch"))))
+ (invoke "patch" "--force" "-p1" "-i" patch)))))
+ #~%standard-phases)))
(native-inputs (list autoconf automake pkg-config guile-3.0))
(inputs (list guile-3.0 lzlib))
(synopsis "Guile bindings to lzlib")
diff --git a/gnu/packages/patches/guile-lzlib-hurd64.patch b/gnu/packages/patches/guile-lzlib-hurd64.patch
new file mode 100644
index 0000000000..12e8c3617d
--- /dev/null
+++ b/gnu/packages/patches/guile-lzlib-hurd64.patch
@@ -0,0 +1,32 @@
+Upstream-status: Presented upstream.
+
+From 80dcd31562827f4b6d085affe9d9f22164f7ed34 Mon Sep 17 00:00:00 2001
+From: Janneke Nieuwenhuizen <janneke@gnu.org>
+Date: Fri, 15 Nov 2024 16:18:29 +0100
+Subject: [PATCH] build: Support the 64bit Hurd.
+
+* configure.ac: When cross-compiling declare LZ_decompress_open before
+using it in conftest.c.
+---
+ configure.ac | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 50dc5ac..4c56768 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -32,7 +32,10 @@ AC_DEFUN([GUILE_LIBLZ_FILE_NAME], [
+ [if test "$cross_compiling" = yes; then
+ # When cross-compiling, we cannot rely on 'ldd'. Instead, look
+ # the output of 'ld --verbose', assuming we're using GNU ld.
+- echo 'int main () { return LZ_decompress_open(); }' > conftest.c
++ cat > conftest.c <<EOF
++int LZ_decompress_open ();
++int main () { return LZ_decompress_open(); }
++EOF
+ guile_cv_liblz_libdir="\
+ `$CC conftest.c -o conftest$EXEEXT -llz -Wl,--verbose 2>/dev/null \
+ | grep -E '^/.*/liblz\.(a|so)'`"
+--
+2.46.0
+
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 24/51] gnu: cross-base: Update %xgcc to gcc-14, to support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
02910dbe93acb473309c798d158e7ebab2a6dffa.1731999203.git.janneke@gnu.org
Gcc-14 adds support for the 64bit Hurd.

* gnu/packages/cross-base.scm (%xgcc): Bump to gcc-14.

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

Toggle diff (24 lines)
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 4961b3b4c0..ad3616eaba 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 gcc-14))
(define %gcc-include-paths
;; Environment variables for header search paths.
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 25/51] gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
87866dcf5a2a3beef0086aa2a8aa959b11983b0a.1731999203.git.janneke@gnu.org
* gnu/packages/make-bootstrap.scm (%gcc-static): Use gcc-14. Update to use
G-Expressions.
[inputs]: Remove libstdc++ and libstdc++-headers.
(%gcc-stripped): Use gcc-14.
[inputs, native-inputs]: Clear fields.

Change-Id: I4e6d779cb457b256d80d1882f182b72a6f7d2be2
---
gnu/packages/make-bootstrap.scm | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)

Toggle diff (88 lines)
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index 689d48d342..e0dcca7b33 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -488,11 +488,11 @@ (define (%glibc-stripped)
(define %gcc-static
;; A statically-linked GCC, with stripped-down functionality.
(package-with-relocatable-glibc
- (package (inherit gcc)
+ (package (inherit gcc-14)
(name "gcc-static")
(outputs '("out")) ; all in one
(arguments
- (substitute-keyword-arguments (package-arguments gcc)
+ (substitute-keyword-arguments (package-arguments gcc-14)
((#:modules modules %default-gnu-modules)
`((srfi srfi-1)
(srfi srfi-26)
@@ -501,7 +501,7 @@ (define %gcc-static
((#:guile _) #f)
((#:implicit-inputs? _) #t)
((#:configure-flags flags)
- `(append (list
+ #~(append (list
;; We don't need a full bootstrap here.
"--disable-bootstrap"
@@ -526,9 +526,9 @@ (define %gcc-static
"--disable-libssp"
"--disable-libquadmath")
(remove (cut string-match "--(.*plugin|enable-languages)" <>)
- ,flags)))
+ #$flags)))
((#:phases phases)
- `(modify-phases ,phases
+ #~(modify-phases #$phases
(add-after 'pre-configure 'remove-lgcc_s
(lambda _
;; Remove the '-lgcc_s' added to GNU_USER_TARGET_LIB_SPEC in
@@ -538,12 +538,12 @@ (define %gcc-static
(substitute* (cons "gcc/config/rs6000/sysv4.h"
(find-files "gcc/config"
"^gnu-user.*\\.h$"))
- ((" -lgcc_s}}") "}}"))
- #t))))))
+ ((" -lgcc_s}}") "}}"))))))))
(inputs
`(("zlib:static" ,zlib "static")
("isl:static" ,isl "static")
- ,@(package-inputs gcc)))
+ ,@(fold alist-delete (package-inputs gcc-14)
+ '("libstdc++" "libstdc++-headers"))))
(native-inputs
(if (%current-target-system)
`(;; When doing a Canadian cross, we need GMP/MPFR/MPC both
@@ -556,17 +556,19 @@ (define %gcc-static
("gmp-native" ,gmp)
("mpfr-native" ,mpfr)
("mpc-native" ,mpc)
- ,@(package-native-inputs gcc))
- (package-native-inputs gcc))))))
+ ,@(package-native-inputs gcc-14))
+ (package-native-inputs gcc-14))))))
(define %gcc-stripped
;; The subset of GCC files needed for bootstrap.
(package
- (inherit gcc)
+ (inherit gcc-14)
(name "gcc-stripped")
(build-system trivial-build-system)
(source #f)
(outputs '("out")) ;only one output
+ (inputs '())
+ (native-inputs '())
(arguments
(list #:modules '((guix build utils))
#:builder
@@ -632,6 +634,7 @@ (define* (make-guile-static guile patches)
(propagated-inputs
(modify-inputs (package-propagated-inputs guile)
(replace "libgc" libgc/static-libs)))
+
(arguments
(substitute-keyword-arguments (package-arguments guile)
((#:configure-flags flags #~'())
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 27/51] system: image: Add hurd64 image types.
(address . 74290@debbugs.gnu.org)
20f53327749d766cf31a35e0f1f3a5f9803843c6.1731999203.git.janneke@gnu.org
* 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(-)

Toggle diff (150 lines)
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)))
+
+;;;
+;;; 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
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 20/51] gnu: netdde: Fix build with gcc-14.
(address . 74290@debbugs.gnu.org)
cec42a6b3379211164e6f1ba60cb4482ab3eb05f.1731999203.git.janneke@gnu.org
* gnu/packages/hurd.scm (netdde)[arguments]: Disable some warnings breaking
the build, using "WARNINGS=..." in #:make-flags.

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

Toggle diff (19 lines)
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 5a60d8ac13..5fdb6359d1 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -592,6 +592,12 @@ (define-public netdde
(search-input-file %build-inputs "/bin/bash"))
"PKGDIR=libdde_linux26"
(string-append "CC=" ,(cc-for-target))
+ (string-append "WARNINGS="
+ " -Wno-declaration-missing-parameter-type"
+ " -Wno-implicit-function-declaration"
+ " -Wno-implicit-int"
+ " -Wno-int-conversion"
+ " -Wno-strict-prototypes")
"ARCH=x86")
#:configure-flags
,#~(list (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib"))
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 22/51] gnu: libssh: Fix [cross-]build with gcc-14 for 32bit.
(address . 74290@debbugs.gnu.org)
e442be9e21d68201ae2711fda62b807920aba20a.1731999203.git.janneke@gnu.org
* gnu/packages/ssh.scm (libssh)[arguments]: When cross-compiling to a
32bit host, add CFLAGS to #:configure-flags to disable a breaking warning.

Change-Id: Ibab7332af162aed38158a50e9b4fc288b4286922
---
gnu/packages/ssh.scm | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

Toggle diff (29 lines)
diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm
index a29a10e954..1f33259246 100644
--- a/gnu/packages/ssh.scm
+++ b/gnu/packages/ssh.scm
@@ -13,7 +13,7 @@
;;; Copyright © 2018 Manuel Graf <graf@init.at>
;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com>
;;; Copyright © 2019, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
-;;; Copyright © 2020, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020, 2023, 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2020 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re>
@@ -156,7 +156,12 @@ (define-public libssh
(build-system cmake-build-system)
(outputs '("out" "debug"))
(arguments
- '(#:configure-flags '("-DWITH_GCRYPT=ON")
+ `(#:configure-flags '("-DWITH_GCRYPT=ON"
+ ,@(if (and (%current-target-system) (target-x86-32?))
+ (list (string-append
+ "-DCMAKE_C_FLAGS=-g -O2"
+ " -Wno-incompatible-pointer-types"))
+ '()))
;; TODO: Add 'CMockery' and '-DWITH_TESTING=ON' for the test suite.
#:tests? #f))
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 26/51] DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
2c35be492f8b105d92a940e3647cc162716f1650.1731999203.git.janneke@gnu.org
XXX TODO:

v Boot a 64bit hurd, and
v Guix shell --bootstrap -D -e '(@@ (gnu packages commencement) gnu-make-boot0)'
v Guix build -e '(@@ (gnu packages commencement) gnu-make-boot0)'
o Guix build hello,
o Guix shell --bootstrap -D guix,
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 draft,
o Release blog post!

On commit:
610e996dcc82ab7819e9c19d81fdc78b7a9c822c
gnu: make-bootstrap: Update gcc-static to gcc-14, for the 64bit Hurd.

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

Producing:
/gnu/store/7n1vcnzgad4cppzcmd7vnadsggrfm9as-bootstrap-tarballs-0/

With guix hash -r:
0m66rvp5728c12xab5042gd4v0l1df0821l68brscrc5qr08imsj

* 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: I828159aedb3f66caba98e935083cc3682429f219
---
doc/guix.texi | 9 ++++++++-
gnu/packages/bootstrap.scm | 34 ++++++++++++++++++++++++++++++++++
guix/packages.scm | 8 +++++---
m4/guix.m4 | 12 +++++++++---
4 files changed, 56 insertions(+), 7 deletions(-)

Toggle diff (227 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index ba4bd2cc79..ce00811b49 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 27798fe278..301ee3ca12 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 "0zrcb59s6zm53p74yk0kw8kya5nndcscj4cqvz99fppcblq6c83g"))
+ ("mkdir"
+ ,(base32 "1lbfl66nyvrc8n2ngd9y2gpsm31p4hkn8k6viln0gvd434pf9hnl"))
+ ("tar"
+ ,(base32 "005d5xpnhiyyy2p0widygc65hnrvqd1ryc8ja2q5vpm5ranvbayr"))
+ ("xz"
+ ,(base32 "1qbqxjqm3jsi0av40s62n1nskc98lwl7r12phlw4ca6c1zrlij12")))
("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 "/20241118/" 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"
+ "/20241118/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 "1ymp3lck1l5fybsa542ny2fdkfydfcfvqbgr3qh03yvq4fwfn6mc"))
("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"
+ "/20241118/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
+ "0g5rn94a2kd6g9ggf5m59hypawkwm7r07wwm5730s1mi9w62p248"))
("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"
+ "/20241118/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
+ "1zia5fpap35dcpfmmfy6i4p8l3h0d7lzk9bg8apv7vwgw4l1rv9z"))
("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"
+ "/20241118/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
+ "0d21cy22bhvf11gc859s8ig7gc680ish8mv5xy2l8vrnc12k3q68"))
("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"
+ "/20241118/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
+ "1di5zbnwnkw679fnhih10c4q8rg2qgqzs424c3dg91sd9l0y0a4j"))
("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])
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 28/51] gnu: libgpg-error: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
25bd177d4c3c8811d46300ee01ab04fb5c7a66b5.1731999203.git.janneke@gnu.org
* gnu/packages/patches/libgpg-error-hurd64.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/gnupg.scm (libgpg-error)[arguments]: Use it when building for
the 64bit Hurd.

Change-Id: Icabb7cd7bb5bcc771ccee5b8a7f57f52b9b58183
---
gnu/local.mk | 1 +
gnu/packages/gnupg.scm | 22 +++++-
.../patches/libgpg-error-hurd64.patch | 78 +++++++++++++++++++
3 files changed, 98 insertions(+), 3 deletions(-)
create mode 100644 gnu/packages/patches/libgpg-error-hurd64.patch

Toggle diff (139 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index be6befb921..147f8d8709 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1625,6 +1625,7 @@ dist_patch_DATA = \
%D%/packages/patches/libgeotiff-fix-tests-with-proj-9.3.0.patch \
%D%/packages/patches/libgeotiff-fix-tests-with-proj-9.3.1.patch \
%D%/packages/patches/libgeotiff-fix-tests-on-i386.patch \
+ %D%/packages/patches/libgpg-error-hurd64.patch \
%D%/packages/patches/libguestfs-syms.patch \
%D%/packages/patches/libobjc2-unbundle-robin-map.patch \
%D%/packages/patches/libvirt-add-install-prefix.patch \
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 2e97c2244a..6535f94cb8 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.
@@ -144,9 +144,25 @@ (define-public libgpg-error
;; configuration, as this is not correct for
;; all architectures.
(_ #t)))
- (#t #t)))))))
+ (#t #t)))))
+ #$@(if (target-hurd64?)
+ #~((add-after 'unpack 'apply-hurd64-patch
+ (lambda _
+ (let ((patch
+ #$(local-file
+ (search-patch
+ "libgpg-error-hurd64.patch"))))
+ (invoke "patch" "--force" "-p1" "-i" patch)))))
+ #~())))
((system-hurd?)
- #~((add-after 'unpack 'skip-tests
+ #~((add-after 'unpack 'apply-hurd64-patch
+ (lambda _
+ (let ((patch
+ #$(local-file
+ (search-patch
+ "libgpg-error-hurd64.patch"))))
+ (invoke "patch" "--force" "-p1" "-i" patch))))
+ (add-after 'unpack 'skip-tests
(lambda _
(substitute* "tests/t-syserror.c"
(("(^| )main *\\(.*" all)
diff --git a/gnu/packages/patches/libgpg-error-hurd64.patch b/gnu/packages/patches/libgpg-error-hurd64.patch
new file mode 100644
index 0000000000..aac8ce61f1
--- /dev/null
+++ b/gnu/packages/patches/libgpg-error-hurd64.patch
@@ -0,0 +1,78 @@
+Upstream-status: Taken from upstream (1.48 series).
+
+From c62157c615a6379677c8f106bf9413d2611fd95e Mon Sep 17 00:00:00 2001
+From: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date: Sat, 6 May 2023 16:10:55 +0200
+Subject: [PATCH] core: Add hurd-amd64 support
+
+--
+This supports the x86_64-pc-gnu triplet
+
+Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
+---
+ src/Makefile.am | 1 +
+ src/mkheader.c | 2 ++
+ src/syscfg/lock-obj-pub.x86_64-unknown-gnu.h | 24 ++++++++++++++++++++
+ 3 files changed, 27 insertions(+)
+ create mode 100644 src/syscfg/lock-obj-pub.x86_64-unknown-gnu.h
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index c61adde..9389e99 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -67,6 +67,7 @@ lock_obj_pub = \
+ syscfg/lock-obj-pub.sparc-unknown-linux-gnu.h \
+ syscfg/lock-obj-pub.sparc64-unknown-linux-gnu.h \
+ syscfg/lock-obj-pub.x86_64-apple-darwin.h \
++ syscfg/lock-obj-pub.x86_64-unknown-gnu.h \
+ syscfg/lock-obj-pub.x86_64-unknown-kfreebsd-gnu.h \
+ syscfg/lock-obj-pub.x86_64-unknown-linux-gnu.h \
+ syscfg/lock-obj-pub.x86_64-unknown-linux-gnux32.h \
+diff --git a/src/mkheader.c b/src/mkheader.c
+index 8fbfbd6..cc0eaa3 100644
+--- a/src/mkheader.c
++++ b/src/mkheader.c
+@@ -108,6 +108,8 @@ canon_host_triplet (const char *triplet, int no_vendor_hack, char **r_os)
+ {"x86_64-pc-linux-gnuhardened1", "x86_64-unknown-linux-gnu" },
+ {"x86_64-pc-linux-gnu" },
+
++ {"x86_64-pc-gnu"},
++
+ {"powerpc-unknown-linux-gnuspe", "powerpc-unknown-linux-gnu" },
+
+ {"arm-unknown-linux-gnueabihf", "arm-unknown-linux-gnueabi" },
+diff --git a/src/syscfg/lock-obj-pub.x86_64-unknown-gnu.h b/src/syscfg/lock-obj-pub.x86_64-unknown-gnu.h
+new file mode 100644
+index 0000000..7c7e6f1
+--- /dev/null
++++ b/src/syscfg/lock-obj-pub.x86_64-unknown-gnu.h
+@@ -0,0 +1,24 @@
++## lock-obj-pub.x86_64-pc-gnu.h
++## File created by gen-posix-lock-obj - DO NOT EDIT
++## To be included by mkheader into gpg-error.h
++
++typedef struct
++{
++ long _vers;
++ union {
++ volatile char _priv[32];
++ long _x_align;
++ long *_xp_align;
++ } u;
++} gpgrt_lock_t;
++
++#define GPGRT_LOCK_INITIALIZER {1,{{0,0,0,0,0,0,0,0, \
++ 0,0,0,0,0,0,0,0, \
++ 0,0,0,0,0,0,0,0, \
++ 0,0,0,0,0,0,0,0}}}
++##
++## Local Variables:
++## mode: c
++## buffer-read-only: t
++## End:
++##
+
+base-commit: 7a42ff0ec971f4f2add28b0edad6cf381b5b8acc
+--
+2.46.0
+
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 29/51] gnu: openssl-3.0: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
061a58f90f9a5f7f43b148bc8d71f6322e9a3cec.1731999203.git.janneke@gnu.org
* 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

Toggle diff (139 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 147f8d8709..a0408d20f2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1901,6 +1901,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?)
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 30/51] gnu: pciutils: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
f46a109e93ee94a271b2ef22c58dcd018d3fa59c.1731999203.git.janneke@gnu.org
* 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

Toggle diff (114 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index a0408d20f2..89042a0716 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1916,6 +1916,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"))
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 31/51] gnu: libpciaccess: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
4e74903a8a7627615bd7d14334f10ef09e755c79.1731999203.git.janneke@gnu.org
* 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

Toggle diff (131 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 89042a0716..b6e25cd43d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1711,6 +1711,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
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 32/51] gnu: netdde: Update to c0ef248dc7c5ccc1273e2a796f3ece30c5b645df.
(address . 74290@debbugs.gnu.org)
1fea08519fe4b1b5f62b2d3de3e6520a1a74b8e7.1731999203.git.janneke@gnu.org
* 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(-)

Toggle diff (44 lines)
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 5fdb6359d1..2c231425aa 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
@@ -567,8 +567,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
@@ -582,7 +582,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
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 33/51] gnu: netdde: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
c4e6fcdd4636850c8563c613687e0df471d43834.1731999203.git.janneke@gnu.org
* 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, and
follow upstream's "amd64" symlinking voodoo.

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

Toggle diff (82 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index b6e25cd43d..e4b6de83cb 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1826,6 +1826,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 2c231425aa..defa3f2689 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -579,7 +579,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"))
@@ -599,6 +600,13 @@ (define-public netdde
" -Wno-int-conversion"
" -Wno-strict-prototypes")
"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
@@ -616,6 +624,15 @@ (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"
(delete "PKGDIR=libdde_linux26" make-flags)))))
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"
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 34/51] gnu: rumpkernel: Update to f1ffd6405f225336e595a0f99f01095ed7438337.
(address . 74290@debbugs.gnu.org)
caa45a7e277ae04e8dd6797534eb9cfe97c42dc1.1731999203.git.janneke@gnu.org
* 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(-)

Toggle diff (36 lines)
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index defa3f2689..0df514cc78 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -676,8 +676,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))
@@ -691,7 +691,7 @@ (define-public rumpkernel
(commit commit)))
(sha256
(base32
- "0fv0k52qqcg3nq9012hibgsamvsd7mnvn2ikdasmzjhsp8qh5q3r"))
+ "1ygn3ysji06ik3k44sf906fjpdmabznkspw70llldbk2zkrcdw7i"))
(file-name (git-file-name name version))))
(build-system gnu-build-system)
(arguments
@@ -811,7 +811,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="
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 35/51] gnu: rumpkernel: Support the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
3e3f9e7098a0dbde70b068e39d6898571e4303cf.1731999203.git.janneke@gnu.org
* 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(-)

Toggle diff (26 lines)
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 0df514cc78..6701d00251 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -792,6 +792,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"
@@ -802,7 +805,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"
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 37/51] gnu: inetutils: Fix build for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
d481854adf4141fae11b5ab2bf54573cf1ffd94e.1731999203.git.janneke@gnu.org
* 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

Toggle diff (117 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 8a607e5df7..0979414ec2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1577,6 +1577,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
+
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 36/51] gnu: hurd: Build fixes for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
92b73ddd7fe349d12445f8e0f39cdca8dfc6599c.1731999203.git.janneke@gnu.org
* 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, and follow upstream's "amd64" symlinking voodoo.

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

Toggle diff (229 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index e4b6de83cb..8a607e5df7 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1553,6 +1553,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 6701d00251..63249b4ef7 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,54 +468,84 @@ (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))
- (string-append "WARNINGS="
- " -Wno-declaration-missing-parameter-type"
- " -Wno-implicit-function-declaration"
- " -Wno-implicit-int"
- " -Wno-int-conversion"
- " -Wno-strict-prototypes")
- "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-declaration-missing-parameter-type"
+ " -Wno-implicit-function-declaration"
+ " -Wno-implicit-int"
+ " -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")
@@ -599,7 +630,6 @@ (define-public netdde
" -Wno-implicit-int"
" -Wno-int-conversion"
" -Wno-strict-prototypes")
- "ARCH=x86")
(let ((arch ,(match (or (%current-target-system)
(%current-system))
((? target-x86-32?)
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
+
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 41/51] gnu: commencement: gnumach-headers-boot0: Update to 1.8+git20240714.
(address . 74290@debbugs.gnu.org)
5f22c74f56573069ab9d155832f17424193bf296.1731999203.git.janneke@gnu.org
* 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(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 1cfaaae1e7..2f805b3e63 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2635,7 +2635,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))
@@ -2649,7 +2649,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)
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 44/51] gnu: commencement: libstdc++-boot0-gcc7: Replace by make-libstdc++-boot0.
(address . 74290@debbugs.gnu.org)
e8087f1989bb41fc40962954bae1a4f8038c234e.1731999203.git.janneke@gnu.org
* 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(-)

Toggle diff (28 lines)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index ad70bae501..a14de3002f 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2273,9 +2273,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)))
@@ -2446,7 +2446,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
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 43/51] gnu: commencement: hurd-headers-boot0: Update to 0.9.git20240714.
(address . 74290@debbugs.gnu.org)
83f6710ae8d2308e2b1dbb82b9fb7dc51dfeaddd.1731999203.git.janneke@gnu.org
* 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(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 742ccbc63b..ad70bae501 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2699,7 +2699,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))
@@ -2712,7 +2712,7 @@ (define hurd-headers-boot0
"hurd-v" version ".tar.gz"))
(sha256
(base32
- "0ybmx7bhy21zv1if2hfdspn13zn68vki1na72sw2jj87gj8przna")))))))
+ "0wcihffclwijjamx4cjbr8i92yg780538ipg2z208ahg96jjrmgq")))))))
(native-inputs
(list autoconf-boot0 automake-boot0 mig-boot0))
(inputs '()))))
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 45/51] gnu: gettext: Fix cross-build shebangs.
(address . 74290@debbugs.gnu.org)
fcc0050212ab0f27020523a95213601bde66b51c.1731999203.git.janneke@gnu.org
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(-)

Toggle diff (36 lines)
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")))
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 47/51] gnu: bootstrap: %bootstrap-glibc: Also fix libm.so.
(address . 74290@debbugs.gnu.org)
2b945a5a46218b04a37eb9d01530e93baf00608d.1731999203.git.janneke@gnu.org
On the 64bit Hurd, glibc-2.39's libm.so is also a linker script. This fixes
having it refer to

/gnu/store/eee...-glibc-cross-x86_64-pc-gnu-2.39/lib/libm.so.6
/gnu/store/eee...-glibc-cross-x86_64-pc-gnu-2.39/lib/libmvec.so.1

* gnu/packages/bootstrap.scm (%bootstrap-glibc)[arguments]: When building for
the 64bit Hurd, also substitute libm.so linker script. Update the regexp to
also cater for libh[urduser] and libm[achuser].

Change-Id: I399d8f3ad9be6b8892955c2cbe59a10093120c77
---
gnu/packages/bootstrap.scm | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

Toggle diff (25 lines)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 301ee3ca12..f8490ce56c 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -774,12 +774,12 @@ (define %bootstrap-glibc
"/binaries.tar"))
(chmod "lib" #o755)
- ;; Patch libc.so so it refers to the right path.
- (substitute* "lib/libc.so"
- (("/[^ ]+/lib/(libc|ld)" _ prefix)
- (string-append out "/lib/" prefix)))
-
- #t))))))
+ ;; Patch linker scripts so they refer to the right file-names.
+ (substitute* ,(if (target-hurd64?)
+ ''("lib/libc.so" "lib/libm.so")
+ "libc.so")
+ (("/[^ ]+/lib/(libc|libm|libh|ld)" _ prefix)
+ (string-append out "/lib/" prefix)))))))))
(inputs
`(("tar" ,(bootstrap-executable "tar" (%current-system)))
("xz" ,(bootstrap-executable "xz" (%current-system)))
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 38/51] gnu: grub: Fix build for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
c5949d796218a70444e3d1cd1517f2a09e49b763.1731999203.git.janneke@gnu.org
* 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

Toggle diff (71 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 0979414ec2..84966efdb5 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1494,6 +1494,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 da5abaca55..61ea74b69a 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
+
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 39/51] gnu: guile-fibers: Fix build for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
4195526ce5a0ee3819027794156fedf5fea24c8b.1731999203.git.janneke@gnu.org
* 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(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 044a491259..f0f16125d6 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -856,7 +856,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
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 40/51] gnu: m4: Fix build for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
de805c55fb5a6e5602a6cf388c7b6b0f272dd8a6.1731999203.git.janneke@gnu.org
* 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(-)

Toggle diff (29 lines)
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)
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 42/51] gnu: commencement: mig-boot0: Update to 1.8+git20231217..
(address . 74290@debbugs.gnu.org)
e8c8110500319a39fabcabb5a335a28d5801b09a.1731999203.git.janneke@gnu.org
* 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(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 2f805b3e63..742ccbc63b 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2670,7 +2670,7 @@ (define mig-boot0
(package
(inherit mig)
(name "mig-boot0")
- (version "1.8+git20230520")
+ (version "1.8+git20231217")
(source
(origin
(inherit (package-source mig))
@@ -2683,7 +2683,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))
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 46/51] gnu: Add gdb-15.2, with support for the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
d0590f50e97ddb6957eee12f154f98598484c17b.1731999203.git.janneke@gnu.org
* gnu/packages/patches/gdb-hurd64.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/gdb.scm (gdb-15): Use it in new variable.
(gdb-minmal-15): New variable.
(gdb/pinned): When building for the 64bit Hurd, set #:configure-flags to
"--enable-targets=i586-pc-gnu,x86_64-pc-gnu".

Change-Id: I52d28092be6c415b8668bb5a77d41c87df841351
---
gnu/local.mk | 1 +
gnu/packages/gdb.scm | 22 +
gnu/packages/patches/gdb-hurd64.patch | 923 ++++++++++++++++++++++++++
3 files changed, 946 insertions(+)
create mode 100644 gnu/packages/patches/gdb-hurd64.patch

Toggle diff (580 lines)
diff --git a/gnu/local.mk b/gnu/local.mk
index 84966efdb5..552eefeaeb 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1374,6 +1374,7 @@ dist_patch_DATA = \
%D%/packages/patches/gcolor3-update-libportal-usage.patch \
%D%/packages/patches/gd-fix-tests-on-i686.patch \
%D%/packages/patches/gd-brect-bounds.patch \
+ %D%/packages/patches/gdb-hurd64.patch \
%D%/packages/patches/gdm-default-session.patch \
%D%/packages/patches/gdm-elogind-support.patch \
%D%/packages/patches/gdm-remove-hardcoded-xwayland-path.patch \
diff --git a/gnu/packages/gdb.scm b/gnu/packages/gdb.scm
index bf46716047..af5ebde3f6 100644
--- a/gnu/packages/gdb.scm
+++ b/gnu/packages/gdb.scm
@@ -67,6 +67,9 @@ (define-public gdb/pinned
#:out-of-source? #t
#:modules `((srfi srfi-1)
,@%default-gnu-modules)
+ #:configure-flags (if (target-hurd64?)
+ #~'("--enable-targets=i586-pc-gnu,x86_64-pc-gnu")
+ #~'())
#:phases #~(modify-phases %standard-phases
(add-after 'unpack 'patch-paths
(lambda* (#:key inputs #:allow-other-keys)
@@ -160,6 +163,19 @@ (define-public gdb-14
"0wkprsjyyh204fdjlkaz20k847l88i9y8m9zqsv15vcd3l3dhk9d"))))
(properties '())))
+(define-public gdb-15
+ (package
+ (inherit gdb-14)
+ (version "15.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/gdb/gdb-"
+ version ".tar.xz"))
+ (patches (search-patches "gdb-hurd64.patch"))
+ (sha256
+ (base32
+ "0k9i8mizg4hby020k53kqmc835pajh9c8d5klv5s1ddm6p6hqdc3"))))))
+
(define-public gdb
;; The "default" version.
gdb-14)
@@ -184,6 +200,12 @@ (define-public gdb-minimal
(inputs (fold alist-delete (package-inputs gdb)
'("libxml2" "ncurses" "python-wrapper" "source-highlight")))))
+(define-public gdb-minimal-15
+ (package/inherit gdb-15
+ (name "gdb-minimal")
+ (inputs (fold alist-delete (package-inputs gdb-15)
+ '("libxml2" "ncurses" "python-wrapper" "source-highlight")))))
+
(define-public avr-gdb
(package/inherit gdb-14
(name "avr-gdb")
diff --git a/gnu/packages/patches/gdb-hurd64.patch b/gnu/packages/patches/gdb-hurd64.patch
new file mode 100644
index 0000000000..50e44b3684
--- /dev/null
+++ b/gnu/packages/patches/gdb-hurd64.patch
@@ -0,0 +1,923 @@
+Upstream-status: Taken from bug-hurd
+
+ <https://lists.gnu.org/archive/html/bug-hurd/2024-07/msg00001.html>.
+
+and gdb-patches
+
+ <https://inbox.sourceware.org/gdb-patches/cw5yn6mfyjxdxv4kzhmqy76tjclttc3cykptidqwdfd5syrw36@r6j6p4cewhs6/T/>
+
+mailing lists.
+
+From 6131a7a8951bc255d6c013de126c46b620434d2f Mon Sep 17 00:00:00 2001
+From: Flavio Cruz <flaviocruz@gmail.com>
+Date: Wed, 3 Jul 2024 22:45:33 +0100
+Subject: [PATCH 1/2] Port GDB to Hurd x86_64.
+
+This port extends the existing i686 port to support x86_64 by trying to
+reuse existing code whenever it makes sense.
+
+* gdb/amd64-gnu-tdep.c: Adds logic for handling signal frames and
+ position of amd64 registers in the different Hurd structs.
+ The signal code is very similar to i686, except the trampoline code
+ is adapted.
+* gdb/config/i386/nm-i386gnu.h: renamed to gdb/config/i386/nm-x86-gnu.h
+ and adapt it for x86_64.
+* gdb/config/i386/i386gnu.mn: renamed to gdb/config/i386/nm-x86-gnu.mn
+ and reuse it for x86_64.
+* gdb/configure.host: recognize gnu64 as a host.
+* gdb/configure.nat: recognize gnu64 host and update existing i386gnu to
+ reuse the new shared files.
+* gdb/configure.tgt: recognize x86_64-*-gnu* triplet and use
+ amd64-gnu-tdep.c.
+* gdb/i386-gnu-tdep.c: added i386_gnu_thread_state_reg_offset that is
+ copied from i386-gnu-nat.c. This makes it similar to amd64.
+* gdb/i386-gnu-nat.c: rename it to x86-gnu-nat.c since we reuse this for
+ i386 and amd64. Updated REG_ADDR to use one of the structures. Added
+ VALID_REGISTER to make sure it's a register we can provide at this time
+ (not all of them are available in amd64). FLAGS_REGISTER is either rfl
+ or efl depending on the arch. Renamed functions and class from i386 to x86
+ whenever they can be reused.
+
+Tested on Hurd x86_64 and i686.
+---
+ gdb/Makefile.in | 4 +-
+ gdb/amd64-gnu-tdep.c | 231 ++++++++++++++++++
+ .../i386/{nm-i386gnu.h => nm-x86-gnu.h} | 7 +
+ gdb/config/i386/{i386gnu.mn => x86-gnu.mn} | 0
+ gdb/configure.host | 1 +
+ gdb/configure.nat | 27 +-
+ gdb/configure.tgt | 6 +-
+ gdb/i386-gnu-tdep.c | 13 +-
+ gdb/{i386-gnu-nat.c => x86-gnu-nat.c} | 171 +++++++++----
+ 9 files changed, 403 insertions(+), 57 deletions(-)
+ create mode 100644 gdb/amd64-gnu-tdep.c
+ rename gdb/config/i386/{nm-i386gnu.h => nm-x86-gnu.h} (83%)
+ rename gdb/config/i386/{i386gnu.mn => x86-gnu.mn} (100%)
+ rename gdb/{i386-gnu-nat.c => x86-gnu-nat.c} (68%)
+
+diff --git a/gdb/Makefile.in b/gdb/Makefile.in
+index 84bc54b303e..67a15e2cc68 100644
+--- a/gdb/Makefile.in
++++ b/gdb/Makefile.in
+@@ -737,6 +737,7 @@ ALL_64_TARGET_OBS = \
+ amd64-darwin-tdep.o \
+ amd64-dicos-tdep.o \
+ amd64-fbsd-tdep.o \
++ amd64-gnu-tdep.o \
+ amd64-linux-tdep.o \
+ amd64-netbsd-tdep.o \
+ amd64-obsd-tdep.o \
+@@ -1688,6 +1689,7 @@ ALLDEPFILES = \
+ amd64-dicos-tdep.c \
+ amd64-fbsd-nat.c \
+ amd64-fbsd-tdep.c \
++ amd64-gnu-tdep.c \
+ amd64-linux-nat.c \
+ amd64-linux-tdep.c \
+ amd64-nat.c \
+@@ -1743,7 +1745,6 @@ ALLDEPFILES = \
+ i386-dicos-tdep.c \
+ i386-fbsd-nat.c \
+ i386-fbsd-tdep.c \
+- i386-gnu-nat.c \
+ i386-gnu-tdep.c \
+ i386-linux-nat.c \
+ i386-linux-tdep.c \
+@@ -1872,6 +1873,7 @@ ALLDEPFILES = \
+ vax-tdep.c \
+ windows-nat.c \
+ windows-tdep.c \
++ x86-gnu-nat.c \
+ x86-nat.c \
+ x86-tdep.c \
+ xcoffread.c \
+diff --git a/gdb/amd64-gnu-tdep.c b/gdb/amd64-gnu-tdep.c
+new file mode 100644
+index 00000000000..435095e3359
+--- /dev/null
++++ b/gdb/amd64-gnu-tdep.c
+@@ -0,0 +1,231 @@
++/* Target-dependent code for the GNU Hurd.
++ Copyright (C) 2024 Free Software Foundation, Inc.
++
++ This file is part of GDB.
++
++ 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
++ the Free Software Foundation; either version 3 of the License, or
++ (at your option) any later version.
++
++ This program is distributed in the hope that it will be useful,
++ but WITHOUT ANY WARRANTY; without even the implied warranty of
++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ GNU General Public License for more details.
++
++ You should have received a copy of the GNU General Public License
++ along with this program. If not, see <http://www.gnu.org/licenses/>. */
++
++#include "defs.h"
++#include "extract-store-integer.h"
++#include "gdbcore.h"
++#include "osabi.h"
++#include "solib-svr4.h"
++
++#include "amd64-tdep.h"
++#include "glibc-tdep.h"
++
++/* Recognizing signal handler frames. */
++
++/* When the GNU/Hurd libc calls a signal handler, the return address points
++ inside the trampoline assembly snippet.
++
++ If the trampoline function name can not be identified, we resort to reading
++ memory from the process in order to identify it. */
++
++static const gdb_byte gnu_sigtramp_code[] =
++{
++/* rpc_wait_trampoline: */
++ 0x48, 0xc7, 0xc0, 0xe7, 0xff, 0xff, 0xff, /* mov $-25,%rax */
++ 0x0f, 0x05, /* syscall */
++ 0x49, 0x89, 0x04, 0x24, /* mov %rax,(%r12) */
++ 0x48, 0x89, 0xdc, /* mov %rbx,%rsp */
++
++/* trampoline: */
++ 0x5f, /* pop %rdi */
++ 0x5e, /* pop %rsi */
++ 0x5a, /* pop %rdx */
++ 0x48, 0x83, 0xc4, 0x08, /* add $0x8,%rsp */
++ 0x41, 0xff, 0xd5, /* call *%r13 */
++
++/* RA HERE */
++ 0x48, 0x8b, 0x7c, 0x24, 0x10, /* mov 0x10(%rsp),%rdi */
++ 0xc3, /* ret */
++
++/* firewall: */
++ 0xf4, /* hlt */
++};
++
++#define GNU_SIGTRAMP_LEN (sizeof gnu_sigtramp_code)
++#define GNU_SIGTRAMP_TAIL 7 /* length of tail after RA */
++
++/* If THIS_FRAME is a sigtramp routine, return the address of the
++ start of the routine. Otherwise, return 0. */
++
++static CORE_ADDR
++amd64_gnu_sigtramp_start (frame_info_ptr this_frame)
++{
++ CORE_ADDR pc = get_frame_pc (this_frame);
++ gdb_byte buf[GNU_SIGTRAMP_LEN];
++
++ if (!safe_frame_unwind_memory (this_frame,
++ pc + GNU_SIGTRAMP_TAIL - GNU_SIGTRAMP_LEN,
++ buf))
++ return 0;
++
++ if (memcmp (buf, gnu_sigtramp_code, GNU_SIGTRAMP_LEN) != 0)
++ return 0;
++
++ return pc;
++}
++
++/* Return whether THIS_FRAME corresponds to a Hurd sigtramp routine. */
++
++static int
++amd64_gnu_sigtramp_p (const frame_info_ptr &this_frame)
++{
++ CORE_ADDR pc = get_frame_pc (this_frame);
++ const char *name;
++
++ find_pc_partial_function (pc, &name, NULL, NULL);
++
++ /* If we have a NAME, we can check for the trampoline function */
++ if (name != NULL && strcmp (name, "trampoline") == 0)
++ return 1;
++
++ return amd64_gnu_sigtramp_start (this_frame) != 0;
++}
++
++/* Offset to sc_i386_thread_state in sigcontext, from <bits/sigcontext.h>. */
++#define AMD64_GNU_SIGCONTEXT_THREAD_STATE_OFFSET 32
++
++/* Assuming THIS_FRAME is a Hurd sigtramp routine, return the
++ address of the associated sigcontext structure. */
++
++static CORE_ADDR
++amd64_gnu_sigcontext_addr (const frame_info_ptr &this_frame)
++{
++ struct gdbarch *gdbarch = get_frame_arch (this_frame);
++ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
++ CORE_ADDR pc;
++ CORE_ADDR sp;
++ gdb_byte buf[8];
++
++ get_frame_register (this_frame, AMD64_RSP_REGNUM, buf);
++ sp = extract_unsigned_integer (buf, 8, byte_order);
++
++ pc = amd64_gnu_sigtramp_start (this_frame);
++ if (pc)
++ {
++ CORE_ADDR sigcontext_addr;
++
++ /* The sigcontext structure address is passed as the third argument
++ * of the signal handler but %RDX is not saved across calls. Luckily,
++ * the structured is saved underneath the &__sigreturn and a dummy word
++ * to fill the slot for the address for __sigreturn to return to.
++ */
++ read_memory (sp + 16, buf, 8);
++ sigcontext_addr = extract_unsigned_integer (buf, 8, byte_order);
++ return sigcontext_addr + AMD64_GNU_SIGCONTEXT_THREAD_STATE_OFFSET;
++ }
++
++ error (_("Couldn't recognize signal trampoline."));
++ return 0;
++}
++
++/* Mapping between the general-purpose registers in `struct
++ sigcontext' format (starting at sc_i386_thread_state)
++ and GDB's register cache layout. */
++
++/* From <bits/sigcontext.h>. */
++static int amd64_gnu_sc_reg_offset[] =
++{
++ 15 * 8, /* %rax */
++ 12 * 8, /* %rbx */
++ 14 * 8, /* %rcx */
++ 13 * 8, /* %rdx */
++ 10 * 8, /* %rsi */
++ 9 * 8, /* %rdi */
++ 10 * 8, /* %rbp */
++ 11 * 8, /* %rsp */
++ 0 * 8, /* %r8 ... */
++ 8 * 8,
++ 7 * 8,
++ 6 * 8,
++ 3 * 8,
++ 2 * 8,
++ 1 * 8,
++ 0 * 8, /* ... %r15 */
++ 16 * 8, /* %rip */
++ 18 * 8, /* %eflags */
++ 17 * 8, /* %cs */
++};
++
++/* From <sys/ucontext.h>. */
++static int amd64_gnu_gregset_reg_offset[] =
++{
++ 10 * 8, /* %rax */
++ 5 * 8, /* %rbx */
++ 11 * 8, /* %rcx */
++ 12 * 8, /* %rdx */
++ 13 * 8, /* %rsi */
++ 14 * 8, /* %rdi */
++ 4 * 8, /* %rbp */
++ 19 * 8, /* %rsp */
++ 9 * 8, /* %r8 ... */
++ 8 * 8,
++ 7 * 8,
++ 6 * 8,
++ 3 * 8,
++ 2 * 8,
++ 1 * 8,
++ 0 * 8, /* ... %r15 */
++ 16 * 8, /* %rip */
++ 18 * 8, /* %eflags */
++ 17 * 8, /* %cs */
++ -1, /* %ss */
++ -1, /* %ds */
++ -1, /* %es */
++ -1, /* %fs */
++ -1, /* %gs */
++};
++
++static void
++amd64_gnu_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
++{
++ i386_gdbarch_tdep *tdep = gdbarch_tdep<i386_gdbarch_tdep> (gdbarch);
++
++ amd64_init_abi (info, gdbarch,
++ amd64_target_description (X86_XSTATE_SSE_MASK, true));
++
++ /* Enable TLS support. */
++ set_gdbarch_fetch_tls_load_module_address (gdbarch,
++ svr4_fetch_objfile_link_map);
++
++ /* Hurd uses SVR4-style shared libraries. */
++ set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
++
++ /* Hurd uses the dynamic linker included in the GNU C Library. */
++ set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver);
++
++ tdep->gregset_reg_offset = amd64_gnu_gregset_reg_offset;
++ tdep->gregset_num_regs = ARRAY_SIZE (amd64_gnu_gregset_reg_offset);
++ tdep->sizeof_gregset = 21 * 8; /* sizeof (struct i386_thread_state); */
++
++ tdep->sigtramp_p = amd64_gnu_sigtramp_p;
++ tdep->sigcontext_addr = amd64_gnu_sigcontext_addr;
++ tdep->sc_reg_offset = amd64_gnu_sc_reg_offset;
++ tdep->sc_num_regs = ARRAY_SIZE (amd64_gnu_sc_reg_offset);
++
++ /* Hurd uses SVR4-style shared libraries. */
++ set_solib_svr4_fetch_link_map_offsets
++ (gdbarch, svr4_lp64_fetch_link_map_offsets);
++}
++
++void _initialize_amd64_gnu_tdep ();
++void
++_initialize_amd64_gnu_tdep ()
++{
++ gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64,
++ GDB_OSABI_HURD, amd64_gnu_init_abi);
++}
+diff --git a/gdb/config/i386/nm-i386gnu.h b/gdb/config/i386/nm-x86-gnu.h
+similarity index 83%
+rename from gdb/config/i386/nm-i386gnu.h
+rename to gdb/config/i386/nm-x86-gnu.h
+index d2d5de83948..ed4d1729227 100644
+--- a/gdb/config/i386/nm-i386gnu.h
++++ b/gdb/config/i386/nm-x86-gnu.h
+@@ -22,9 +22,16 @@
+ /* Thread flavors used in re-setting the T bit. */
+ #define THREAD_STATE_FLAVOR i386_REGS_SEGS_STATE
+ #define THREAD_STATE_SIZE i386_THREAD_STATE_COUNT
++#ifdef __x86_64__
++#define THREAD_STATE_SET_TRACED(state) \
++ ((struct i386_thread_state *) (state))->rfl |= 0x100
++#define THREAD_STATE_CLEAR_TRACED(state) \
++ ((((struct i386_thread_state *) (state))->rfl &= ~0x100), 1)
++#else
+ #define THREAD_STATE_SET_TRACED(state) \
+ ((struct i386_thread_state *) (state))->efl |= 0x100
+ #define THREAD_STATE_CLEAR_TRACED(state) \
+ ((((struct i386_thread_state *) (state))->efl &= ~0x100), 1)
++#endif /* __x86_64__ */
+
+ #endif /* CONFIG_I386_NM_I386GNU_H */
+diff --git a/gdb/config/i386/i386gnu.mn b/gdb/config/i386/x86-gnu.mn
+similarity index 100%
+rename from gdb/config/i386/i386gnu.mn
+rename to gdb/config/i386/x86-gnu.mn
+diff --git a/gdb/configure.host b/gdb/configure.host
+index da71675b201..999af8e59ae 100644
+--- a/gdb/configure.host
++++ b/gdb/configure.host
+@@ -184,6 +184,7 @@ x86_64-*-mingw*) gdb_host=mingw64
+ gdb_host_obs=mingw-hdep.o
+ ;;
+ x86_64-*-cygwin*) gdb_host=cygwin64 ;;
++x86_64-*-gnu*) gdb_host=gnu64 ;;
+ m32r*-*-linux*) gdb_host=linux ;;
+
+ xtensa*-*-linux*) gdb_host=linux ;;
+diff --git a/gdb/configure.nat b/gdb/configure.nat
+index 8b98511cef7..00402f888a9 100644
+--- a/gdb/configure.nat
++++ b/gdb/configure.nat
+@@ -211,23 +211,44 @@ case ${gdb_host} in
+ ;;
+ esac
+ ;;
++ gnu64)
++ case ${gdb_host_cpu} in
++ i386)
++ # Host: x86_64 running the GNU Hurd
++ NATDEPFILES='x86-gnu-nat.o gnu-nat.o \
++ x86-nat.o nat/x86-dregs.o \
++ amd64-nat.o fork-child.o \
++ nat/fork-inferior.o \
++ notify_S.o process_reply_S.o msg_reply_S.o \
++ msg_U.o exc_request_U.o exc_request_S.o'
++ HAVE_NATIVE_GCORE_HOST=1
++
++ NAT_FILE='nm-x86-gnu.h'
++ MH_CFLAGS='-D_GNU_SOURCE'
++
++ XM_CLIBS='-lshouldbeinlibc'
++
++ nat_makefile_frag="${srcdir}/config/${gdb_host_cpu}/x86-gnu.mn"
++ ;;
++ esac
++ ;;
+ i386gnu)
+ case ${gdb_host_cpu} in
+ i386)
+ # Host: Intel 386 running the GNU Hurd
+- NATDEPFILES='i386-gnu-nat.o gnu-nat.o \
++ NATDEPFILES='x86-gnu-nat.o gnu-nat.o \
+ x86-nat.o nat/x86-dregs.o fork-child.o \
+ nat/fork-inferior.o \
+ notify_S.o process_reply_S.o msg_reply_S.o \
+ msg_U.o exc_request_U.o exc_request_S.o'
+ HAVE_NATIVE_GCORE_HOST=1
+
+- NAT_FILE='nm-i386gnu.h'
++ NAT_FILE='nm-x86-gnu.h'
+ MH_CFLAGS='-D_GNU_SOURCE'
+
+ XM_CLIBS='-lshouldbeinlibc'
+
+- nat_makefile_frag="${srcdir}/config/${gdb_host_cpu}/i386gnu.mn"
++ nat_makefile_frag="${srcdir}/config/${gdb_host_cpu}/x86-gnu.mn"
+ ;;
+ esac
+ ;;
+diff --git a/gdb/configure.tgt b/gdb/configure.tgt
+index 47a674201f9..df9e9917ad1 100644
+--- a/gdb/configure.tgt
++++ b/gdb/configure.tgt
+@@ -328,7 +328,7 @@ i[34567]86-*-linux*)
+ ;;
+ i[34567]86-*-gnu*)
+ # Target: Intel 386 running the GNU Hurd
+- gdb_target_obs="i386-gnu-tdep.o solib-svr4.o"
++ gdb_target_obs="i386-gnu-tdep.o glibc-tdep.o solib-svr4.o"
+ ;;
+ i[34567]86-*-cygwin*)
+ # Target: Intel 386 running win32
+@@ -744,6 +744,10 @@ x86_64-*-openbsd*)
+ x86_64-*-rtems*)
+ gdb_target_obs="${amd64_tobjs} ${i386_tobjs} i386-bsd-tdep.o"
+ ;;
++x86_64-*-gnu*)
++ # Target: x86_64 running the GNU Hurd
++ gdb_target_obs="amd64-gnu-tdep.o glibc-tdep.o solib-svr4.o"
++ ;;
+ xtensa*-*-*linux*)
+ # Target: GNU/Linux Xtensa
+ gdb_target_obs="xtensa-linux-tdep.o symfile-mem.o linux-tdep.o"
+diff --git a/gdb/i386-gnu-tdep.c b/gdb/i386-gnu-tdep.c
+index 98e11518a91..5ffc1388ec0 100644
+--- a/gdb/i386-gnu-tdep.c
++++ b/gdb/i386-gnu-tdep.c
+@@ -21,6 +21,7 @@
+ #include "osabi.h"
+ #include "solib-svr4.h"
+
++#include "glibc-tdep.h"
+ #include "i386-tdep.h"
+
+ /* Recognizing signal handler frames. */
+@@ -72,8 +73,7 @@ i386_gnu_sigtramp_start (const frame_info_ptr &this_frame)
+ return pc;
+ }
+
+-/* Return whether THIS_FRAME corresponds to a GNU/Linux sigtramp
+- routine. */
++/* Return whether THIS_FRAME corresponds to a Hurd sigtramp routine. */
+
+ static int
+ i386_gnu_sigtramp_p (const frame_info_ptr &this_frame)
+@@ -178,9 +178,18 @@ i386gnu_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
+ /* GNU uses ELF. */
+ i386_elf_init_abi (info, gdbarch);
+
++ /* Hurd uses SVR4-style shared libraries. */
++ set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target);
+ set_solib_svr4_fetch_link_map_offsets
+ (gdbarch, svr4_ilp32_fetch_link_map_offsets);
+
++ /* Hurd uses the dynamic linker included in the GNU C Library. */
++ set_gdbarch_skip_solib_resolver (gdbarch, glibc_skip_solib_resolver);
++
++ /* Enable TLS support. */
++ set_gdbarch_fetch_tls_load_module_address (gdbarch,
++ svr4_fetch_objfile_link_map);
++
+ tdep->gregset_reg_offset = i386gnu_gregset_reg_offset;
+ tdep->gregset_num_regs = ARRAY_SIZE (i386gnu_gregset_reg_offset);
+ tdep->sizeof_gregset = 19 * 4;
+diff --git a/gdb/i386-gnu-nat.c b/gdb/x86-gnu-nat.c
+similarity index 68%
+rename from gdb/i386-gnu-nat.c
+rename to gdb/x86-gnu-nat.c
+index 52d4a4b7cec..da3b7e923dd 100644
+--- a/gdb/i386-gnu-nat.c
++++ b/gdb/x86-gnu-nat.c
+@@ -34,7 +34,13 @@ extern "C"
+ #include "floatformat.h"
+ #include "regcache.h"
+
++
++#ifdef __x86_64__
++#include "amd64-tdep.h"
++#include "amd64-nat.h"
++#else
+ #include "i386-tdep.h"
++#endif
+
+ #include "inf-child.h"
+ #include "i387-tdep.h"
+@@ -42,21 +48,82 @@ extern "C"
+ /* Offset to the thread_state_t location where REG is stored. */
+ #define REG_OFFSET(reg) offsetof (struct i386_thread_state, reg)
+
++#ifdef __x86_64__
++
+ /* At REG_OFFSET[N] is th
This message was truncated. Download the full message here.
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 48/51] gnu: findutils: Disable tests on the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
f4b7b2714d3a97db49a6d3403f120964d5244e87.1731999203.git.janneke@gnu.org
* gnu/packages/base.scm (findutils)[arguments]: When building on the 64bit
Hurd, set #:tests? #f.

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

Toggle diff (17 lines)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index bab1f258c6..692721acc6 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -425,7 +425,9 @@ (define-public findutils
(patches (search-patches "findutils-localstatedir.patch"))))
(build-system gnu-build-system)
(arguments
- `(#:configure-flags (list
+ `(#:tests? ,(and (not (%current-target-system))
+ (not (system-hurd64?)))
+ #:configure-flags (list
;; Tell 'updatedb' to write to /var.
"--localstatedir=/var")
#:phases (modify-phases %standard-phases
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 50/51] system: examples: Add devel-hurd64.tmpl.
(address . 74290@debbugs.gnu.org)
2555c1df98288dd6e4e391eb179f6649c9cdf53d.1731999203.git.janneke@gnu.org
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

Toggle diff (198 lines)
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..146a35adcf
--- /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-15
+ git-minimal
+ gnu-make
+ m4
+ openssh-sans-x
+ (append
+ guix-packages
+ hurd-packages
+ %base-packages/hurd)))))
+
+%hurd64-devel-os
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 49/51] system: examples: Add bare-hurd64.tmpl.
(address . 74290@debbugs.gnu.org)
4d02e4ec4161b1a85150e942f2d8ee260b3961da.1731999203.git.janneke@gnu.org
* 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

Toggle diff (126 lines)
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
--
2.46.0
J
J
Janneke Nieuwenhuizen wrote 2 days ago
[PATCH v3 51/51] gnu: Use gcc-14, gcc-toolchain-14 on the 64bit Hurd.
(address . 74290@debbugs.gnu.org)
97d520ff961ad1712437b48861d6cdee4519c809.1731999203.git.janneke@gnu.org
This enables building packages in a 64bit childhurd. It will not enable
offloading to a childhurd.

* guix/utils.scm (host-hurd?, host-x86-64, host-hurd64?): New procedures.
* gnu/packages/commencement.scm (gcc-toolchain): Use them to determine if the
host is a 64bit Hurd, and use gcc-toolchain-14.
* gnu/packages/gcc.scm (gcc): Likewise, to use gcc-14.

Change-Id: I55e43fdc61e3ea5fc13065fc7ca854b951c94930
---
gnu/packages/commencement.scm | 4 +++-
gnu/packages/gcc.scm | 5 ++++-
guix/utils.scm | 20 ++++++++++++++++++++
3 files changed, 27 insertions(+), 2 deletions(-)

Toggle diff (71 lines)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index a14de3002f..3f11bb3384 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3642,7 +3642,9 @@ (define-public gcc-toolchain-14
;; The default GCC
(define-public gcc-toolchain
- gcc-toolchain-11)
+ (if (host-hurd64?)
+ gcc-toolchain-14
+ gcc-toolchain-11))
(define-public gcc-toolchain-aka-gcc
;; It's natural for users to try "guix install gcc". This package
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 64ba37fd69..070a0965e6 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -857,7 +857,10 @@ (define-public gcc-14
;; Note: When changing the default gcc version, update
;; the gcc-toolchain-* definitions.
-(define-public gcc gcc-11)
+(define-public gcc
+ (if (host-hurd64?)
+ gcc-14
+ gcc-11))
;;;
diff --git a/guix/utils.scm b/guix/utils.scm
index e100c03365..7a71919f73 100644
--- a/guix/utils.scm
+++ b/guix/utils.scm
@@ -96,6 +96,9 @@ (define-module (guix utils)
system-hurd?
target-hurd64?
system-hurd64?
+ host-hurd?
+ host-hurd64?
+ host-x86-64?
target-mingw?
target-x86-32?
target-x86-64?
@@ -729,6 +732,23 @@ (define* (system-hurd64?)
(and (system-hurd?)
(target-64bit? (%current-system))))
+(define (host-hurd?)
+ "Are we running on a Hurd system? This is almost never the right function,
+use target-hurd? or system-hurd? instead."
+ (equal? (utsname:sysname (uname)) "GNU"))
+
+(define (host-x86-64?)
+ "Are we running on a x86_64bit system? This is almost never the right
+function, use target-x86-64? or system-x86-64? instead."
+ (and (host-hurd?)
+ (equal? (utsname:machine (uname)) "x86_64")))
+
+(define (host-hurd64?)
+ "Are we running on a 64bit Hurd? This is almost never the right
+function, use target-hurd64? or system-hurd64? instead."
+ (and (host-hurd?)
+ (host-x86-64?)))
+
(define* (target-mingw? #:optional (target (%current-target-system)))
"Is the operating system of TARGET Windows?"
(and target
--
2.46.0
L
L
Ludovic Courtès wrote 22 hours ago
Re: [bug#74290] [PATCH v2 05/40] gnu: Add basic support for x86_64-pc-gnu target, aka 64bit Hurd.
(address . janneke@gnu.org)
878qteyvu8.fsf@gnu.org
Hi,

<janneke@gnu.org> skribis:

Toggle quote (13 lines)
>> diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
>> index a14de3002f..2b0b4b07b4 100644
>> --- a/gnu/packages/commencement.scm
>> +++ b/gnu/packages/commencement.scm
>> @@ -3642,7 +3642,9 @@ (define-public gcc-toolchain-14
>>
>> ;; The default GCC
>> (define-public gcc-toolchain
>> - gcc-toolchain-11)
>> + (if (system-hurd64?)
>
> Hmm, no that doesn't work; (%current-system) is #f at toplevel.

Right. It would work, but only where %current-system defaults to
“x86_64-gnu”.

Ludo’.
L
L
Ludovic Courtès wrote 22 hours ago
(address . janneke@gnu.org)
87v7wixh17.fsf@gnu.org
Hi,

<janneke@gnu.org> skribis:

Toggle quote (2 lines)
> Ludovic Courtès writes:

[...]

Toggle quote (22 lines)
>> how about changing the GCC version used for cross-compilation, and
>> only that:
>>
>> diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
>> index 5781341a87..6120740b3c 100644
>> --- a/gnu/packages/cross-base.scm
>> +++ b/gnu/packages/cross-base.scm
>> @@ -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 gcc-14))
>
> Interesting...I would have thought this would cause a world rebuild,
> because of the cross-gcc in commencement. Apparently, it doesn't.
>
>> That would affect also non-Hurd cross-compilation targets, but if it
>> works, it’s simpler.
>
> Ok, I very much like the simplicity of this.

Yay.

Toggle quote (10 lines)
>> Then, as a second step, we could prepare a ‘core-packages-team’ branch
>> that upgrades ‘gcc’ globally, and that way we keep something consistent
>> and simpler, without ‘current-gcc’. (Though it means we’d have to wait
>> before we can build natively on x86_64-gnu.)
>>
>> WDYT?
>
> I've been thinking about this route and decided against it because it
> seems to me that upgrading to gcc-14 will cause a lot of trouble/work.

True.

Toggle quote (4 lines)
> However, if that work is shared, and we have the build farm to help, it
> may be the best route. Maybe the wait doesn't have to be too long?
> Also, in the mean time, upstream support might improve.

Well yes, it’s going to take a bit of time, let’s face it.

But hopefully quite a few of us would work on it and we’d set up ci.guix
to build the branch.

Also, with the reduced scope of ‘core-packages’, I hope it can be faster
than ‘core-updates’ was before. And we can choose to have a cycle that
changes very little beside GCC.

Toggle quote (6 lines)
> Maybe we can decide to go the route you propose and also keep this
> current-gcc patch on the hurd-team branch for a bit (we prepend a fat
> REMOVEME in front of it). We can keep working on native Hurd builds
> that use gcc-14 on hurd-team using this hack, until core-packages-team
> is ready to make it obsolete?

Yes.

At least, we can already merge cross-compilation support.

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote 22 hours ago
Re: [bug#74290] [PATCH v2 14/40] DRAFT gnu: bootstrap: Add support for x86_64-gnu, aka the 64bit Hurd.
(address . janneke@gnu.org)
87r076xgy4.fsf@gnu.org
<janneke@gnu.org> skribis:

Toggle quote (29 lines)
> Ludovic Courtès writes:
>
>> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>>
>>> +++ 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")))
>>
>> Are the i586-gnu binaries usable on x86_64-gnu?
>
> No, at least not currently. The mach message format even differs, AFAIK.
>
> root@guixygnu64 ~# file bash-i586
> bash-i586: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Hurd 0.0.0, stripped
>
> root@guixygnu64 ~# ./bash-i586 --help
> -bash: ./bash-i586: cannot execute binary file: Exec format error

OK. But yeah, all the Mach messages and RPCs are probably encoded
differently anyway. Too bad!

Ludo’.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 74290@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 74290
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch