guix-commits
[Top][All Lists]
Advanced

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

branch master updated: gnu: guile-fibers: Fix cross-build to the Hurd.


From: guix-commits
Subject: branch master updated: gnu: guile-fibers: Fix cross-build to the Hurd.
Date: Sat, 02 Nov 2024 09:13:59 -0400

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

janneke pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 20c7b8dd04 gnu: guile-fibers: Fix cross-build to the Hurd.
20c7b8dd04 is described below

commit 20c7b8dd04e421a139a02438cf1ddfdfe544a446
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Sat Nov 2 13:36:41 2024 +0100

    gnu: guile-fibers: Fix cross-build to the Hurd.
    
    This fixes
    <https://lists.gnu.org/archive/html/guile-user/2024-10/msg00009.html>,
    <https://github.com/wingo/fibers/issues/111>.
    
    * gnu/packages/patches/guile-fibers-cross-build-fix.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Register it.
    * gnu/packages/guile-xyz.scm (guile-fibers)[arguments]: When cross-building,
    add `apply-cross-build-fix-patch' phase to apply it.
    
    Change-Id: Ic845db832b9446c8cb5b534cc2db63b98c417b1a
---
 gnu/local.mk                                       |  1 +
 gnu/packages/guile-xyz.scm                         | 16 +++++++--
 .../patches/guile-fibers-cross-build-fix.patch     | 40 ++++++++++++++++++++++
 3 files changed, 54 insertions(+), 3 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 84a6768f53..5b28de35f2 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1496,6 +1496,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/guile-3.0-linux-syscalls.patch          \
   %D%/packages/patches/guile-ac-d-bus-fix-tests.patch          \
   %D%/packages/patches/guile-lib-fix-tests-for-guile2.2.patch          \
+  %D%/packages/patches/guile-fibers-cross-build-fix.patch      \
   %D%/packages/patches/guile-fibers-destroy-peer-schedulers.patch \
   %D%/packages/patches/guile-fibers-epoll-instance-is-dead.patch \
   %D%/packages/patches/guile-fibers-fd-finalizer-leak.patch    \
diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 5f34ea98a6..ea192c2c03 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -9,7 +9,7 @@
 ;;; Copyright © 2016, 2017, 2021 Alex Kost <alezost@gmail.com>
 ;;; Copyright © 2016, 2017 Adonay "adfeno" Felipe Nogueira 
<https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
 ;;; Copyright © 2016, 2021 Amirouche <amirouche@hypermove.net>
-;;; Copyright © 2016, 2019, 2021, 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2016, 2019, 2021, 2023, 2024 Janneke Nieuwenhuizen 
<janneke@gnu.org>
 ;;; Copyright © 2017 Andy Wingo <wingo@igalia.com>
 ;;; Copyright © 2017 David Thompson <davet@gnu.org>
 ;;; Copyright © 2017, 2018, 2019, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
@@ -875,14 +875,24 @@ tables.")
                          (substitute* "tests/basic.scm"
                            ((".*spawn-fiber-chain 5000000.*") ""))
                          (substitute* "tests/channels.scm"
-                           ((".*assert-run-fibers-terminates .*pingpong.*") 
"")))))))))
+                           ((".*assert-run-fibers-terminates .*pingpong.*") 
"")))))
+                   #$@(if (%current-target-system)
+                          #~((add-after 'unpack 'apply-cross-build-fix-patch
+                               (lambda _
+                                 (let ((patch-file
+                                        #$(local-file
+                                           (search-patch
+                                            
"guile-fibers-cross-build-fix.patch"))))
+                                   (invoke "patch" "--force" "-p1" "-i"
+                                           patch-file)))))
+                          #~())))))
     (native-inputs
      (list texinfo pkg-config autoconf-2.71 automake libtool
            guile-3.0            ;for 'guild compile
            ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS'
            gettext-minimal))
     (inputs
-     (append (list guile-3.0)                     ;for libguile-3.0.so
+     (append (list guile-3.0)           ;for libguile-3.0.so
              (if (target-hurd?)
                  (list libevent)
                  '())))
diff --git a/gnu/packages/patches/guile-fibers-cross-build-fix.patch 
b/gnu/packages/patches/guile-fibers-cross-build-fix.patch
new file mode 100644
index 0000000000..b4037d705e
--- /dev/null
+++ b/gnu/packages/patches/guile-fibers-cross-build-fix.patch
@@ -0,0 +1,40 @@
+Upstream-status: Presented to guile-user@gnu.org.
+
+From cfdf36ee5dc2a854781cd2ba27a8ced776c7b313 Mon Sep 17 00:00:00 2001
+From: Janneke Nieuwenhuizen <janneke@gnu.org>
+Date: Sat, 2 Nov 2024 13:31:28 +0100
+Subject: [PATCH] build: Fix cross-building from i686-linux to i586-pc-gnu.
+Content-Transfer-Encoding: 8bit
+Content-Type: text/plain; charset=UTF-8
+
+Fixes #111.
+
+* build-aux/guile.am (.scm.go)[CROSS_COMPILING]: Do not go through
+./env.
+---
+ build-aux/guile.am | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/build-aux/guile.am b/build-aux/guile.am
+index 5e94c96..db8ab72 100644
+--- a/build-aux/guile.am
++++ b/build-aux/guile.am
+@@ -22,7 +22,14 @@ CLEANFILES = $(GOBJECTS)
+ EXTRA_DIST = $(SOURCES) $(NOCOMP_SOURCES)
+ GUILE_WARNINGS = -Wunbound-variable -Warity-mismatch -Wformat
+ SUFFIXES = .scm .go
++if CROSS_COMPILING
++.scm.go:
++      $(AM_V_GEN) \
++        $(GUILE_TOOLS) compile $(GUILE_TARGET) -L "$(abs_top_srcdir)" \
++        $(GUILE_WARNINGS) -o "$@" "$<"
++else
+ .scm.go:
+       $(AM_V_GEN) $(top_builddir)/env \
+         $(GUILE_TOOLS) compile $(GUILE_TARGET) -L "$(abs_top_srcdir)" \
+         $(GUILE_WARNINGS) -o "$@" "$<"
++endif
+-- 
+Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
+Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com
+



reply via email to

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