guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch core-updates updated: gnu: gnumach: Fix build for i686-linux.


From: guix-commits
Subject: branch core-updates updated: gnu: gnumach: Fix build for i686-linux.
Date: Mon, 22 Jan 2024 03:45:20 -0500

This is an automated email from the git hooks/post-receive script.

janneke pushed a commit to branch core-updates
in repository guix.

The following commit(s) were added to refs/heads/core-updates by this push:
     new c569d2b3df gnu: gnumach: Fix build for i686-linux.
c569d2b3df is described below

commit c569d2b3dff815157860f1b812b7c41e2f9ec9a3
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Sun Jan 21 19:40:43 2024 +0100

    gnu: gnumach: Fix build for i686-linux.
    
    * gnu/packages/patches/gnumach-fix-i686-linux-build.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Add it.
    * gnu/packages/hurd.scm (gnumach)[source]: Use it.
    [arguments]: Remove #:make-flags to avoid overriding now-essential CFLAGS 
set
    by configure.  Rewrite to use gexps.
    [supported-systems]: Add i686-linux.
    
    Change-Id: Ibec03121f90b30160725c87e999e38f677b2e369
---
 gnu/local.mk                                       |  3 +-
 gnu/packages/hurd.scm                              | 24 +++++------
 .../patches/gnumach-fix-i686-linux-build.patch     | 50 ++++++++++++++++++++++
 3 files changed, 63 insertions(+), 14 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 011d92511f..e5c73d7ae2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -11,7 +11,7 @@
 # Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
 # Copyright © 2016, 2017, 2018, 2019 Alex Vong <alexvong1995@gmail.com>
 # Copyright © 2016-2023 Efraim Flashner <efraim@flashner.co.il>
-# Copyright © 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 Jan (janneke) 
Nieuwenhuizen <janneke@gnu.org>
+# Copyright © 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Janneke 
Nieuwenhuizen <janneke@gnu.org>
 # Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
 # Copyright © 2017, 2018, 2023 Clément Lassieur <clement@lassieur.org>
 # Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
@@ -1368,6 +1368,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/gnome-settings-daemon-gc.patch          \
   %D%/packages/patches/gnome-session-support-elogind.patch     \
   %D%/packages/patches/gnome-tweaks-search-paths.patch         \
+  %D%/packages/patches/gnumach-fix-i686-linux-build.patch      \
   %D%/packages/patches/gnumach-support-noide.patch             \
   %D%/packages/patches/gnupg-default-pinentry.patch            \
   %D%/packages/patches/gnupg-1-build-with-gcc10.patch          \
diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm
index 1d3a0eadfa..2cfd8f998f 100644
--- a/gnu/packages/hurd.scm
+++ b/gnu/packages/hurd.scm
@@ -255,26 +255,24 @@ Hurd-minimal package which are needed for both glibc and 
GCC.")
               (inherit (package-source gnumach-headers))
               (patches
                (append
-                (search-patches "gnumach-support-noide.patch")
+                (search-patches "gnumach-support-noide.patch"
+                                "gnumach-fix-i686-linux-build.patch")
                 (origin-patches (package-source gnumach-headers))))))
     (arguments
      (substitute-keyword-arguments (package-arguments gnumach-headers)
-       ((#:make-flags flags ''())
-        `(cons "CFLAGS=-fcommon" ,flags))
        ((#:configure-flags flags ''())
-        `(cons* "--enable-kdb" ;enable kernel debugger
+        `(cons* "--enable-kdb"          ;enable kernel debugger
                 "--disable-net-group"
                 "--disable-pcmcia-group"
                 "--disable-wireless-group"
-               ,flags))
+                ,flags))
        ((#:phases phases '%standard-phases)
-        `(modify-phases %standard-phases
-           (add-after 'install 'produce-image
-             (lambda* (#:key outputs #:allow-other-keys)
-               (let* ((out  (assoc-ref outputs "out"))
-                      (boot (string-append out "/boot")))
-                 (invoke "make" "gnumach.gz")
-                 (install-file "gnumach.gz" boot))))))))
+        #~(modify-phases %standard-phases
+            (add-after 'install 'produce-image
+              (lambda _
+                (let ((boot (string-append #$output "/boot")))
+                  (invoke "make" "gnumach.gz")
+                  (install-file "gnumach.gz" boot))))))))
     (native-inputs
      (list autoconf
            automake
@@ -283,7 +281,7 @@ Hurd-minimal package which are needed for both glibc and 
GCC.")
                mig)
            perl
            texinfo-4))
-    (supported-systems %hurd-systems)
+    (supported-systems `("i686-linux" ,@%hurd-systems))
     (synopsis "Microkernel of the GNU system")
     (description
      "GNU Mach is the microkernel upon which a GNU Hurd system is based.")))
diff --git a/gnu/packages/patches/gnumach-fix-i686-linux-build.patch 
b/gnu/packages/patches/gnumach-fix-i686-linux-build.patch
new file mode 100644
index 0000000000..dd510b296a
--- /dev/null
+++ b/gnu/packages/patches/gnumach-fix-i686-linux-build.patch
@@ -0,0 +1,50 @@
+Upstream status: presented upstream.
+
+    https://lists.gnu.org/archive/html/bug-hurd/2024-01/msg00198.html
+
+From af5ec3c82ae6a9077ce7d814dda773562ef6757f Mon Sep 17 00:00:00 2001
+From: Janneke Nieuwenhuizen <janneke@gnu.org>
+Date: Mon, 22 Jan 2024 08:41:02 +0100
+Subject: [PATCH] Resurrect x86-linux build.
+
+This avoids using system headers, which may result in
+
+    kern/strings.c: In function 'strchr':
+    kern/strings.c:188:32: error: 'NULL' undeclared (first use in this 
function)
+
+    In file included from util/atoi.c:77:
+    ./util/atoi.h:65:29: error: unknown type name 'u_char'
+
+    device/net_io.c: In function 'bpf_do_filter':
+    device/net_io.c:1636:34: error: 'u_int' undeclared (first use in this 
function); did you mean 'int'?
+
+    In file included from device/subrs.c:36:
+    ./device/if_ether.h:43:9: error: unknown type name 'u_char'
+       43 |         u_char  ether_dhost[6];
+
+    ./linux/dev/include/linux/fs.h:304:5: error: unknown type name 'loff_t'
+      304 |     loff_t f_pos;
+
+This is a follow-up to commit
+    d5e5dd3401ea0d0475aa830c2171be5b8a72f4fa
+    Update configure.ac so that we don't need glibc when running ./configure.
+---
+ Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.am b/Makefile.am
+index e31a875d..ad38249b 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -43,7 +43,7 @@ AM_LDFLAGS =
+ 
+ GCC_INSTALL = $(shell LANG=C $(CC) -print-search-dirs | sed -n -e 's/install: 
\(.*\)/\1/p')
+ AM_CPPFLAGS += \
+-      -imacros config.h -I $(GCC_INSTALL)/include
++      -nostdinc -imacros config.h -I $(GCC_INSTALL)/include
+ 
+ AM_CPPFLAGS += \
+       -I$(systype) \
+-- 
+2.41.0
+



reply via email to

[Prev in Thread] Current Thread [Next in Thread]