guix_mirror_bot pushed a commit to branch core-packages-team
in repository guix.

commit de7d2b9e28943d2e6f5ad57aa5c1d1a2c68fc94f
Author: Yelninei <yelni...@tutamail.com>
AuthorDate: Mon May 12 16:09:00 2025 +0000

    gnu: bison: Link with pthread on the Hurd.
    
    * gnu/packages/bison.scm (bison): Add LIBS=-lphtread on the Hurd.
    * gnu/packages/commencement.scm (bison-boot0): Strip configure-flags.
    
    Change-Id: If47c10c3a653df5fd07119a6fa53a40527d37b56
---
 gnu/packages/bison.scm        | 10 ++++++++--
 gnu/packages/commencement.scm |  3 ++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/bison.scm b/gnu/packages/bison.scm
index 6cd7abe420..feca074304 100644
--- a/gnu/packages/bison.scm
+++ b/gnu/packages/bison.scm
@@ -24,6 +24,7 @@
   #:use-module (guix licenses)
   #:use-module (guix packages)
   #:use-module (guix download)
+  #:use-module (guix utils)
   #:use-module (guix build-system gnu)
   #:use-module (gnu packages m4)
   #:use-module (gnu packages perl)
@@ -44,14 +45,19 @@
         "1wjvbbzrr16k1jlby3l436an3kvv492h08arbnf0gwgprha05flv"))))
     (build-system gnu-build-system)
     (arguments
-     '(;; Building in parallel on many-core systems may cause an error such as
+     `(;; Building in parallel on many-core systems may cause an error such as
        ;; "mv: cannot stat 'examples/c/reccalc/scan.stamp.tmp': No such file or
        ;; directory".  See <https://bugs.gnu.org/36238>.
        #:parallel-build? #f
        ;; Similarly, when building tests in parallel, Make may produce this 
error:
        ;; "./examples/c/reccalc/scan.l:13:10: fatal error: parse.h: No such 
file
        ;; or directory".  Full log in <https://bugs.gnu.org/36238>.
-       #:parallel-tests? #f))
+       #:parallel-tests? #f
+       ;; On the Hurd with glibc 2.41 bison uses weak symbols from pthread
+       ;; but does not link to it.
+       ,@(if (target-hurd?)
+             (list #:configure-flags ''("LIBS=-lpthread"))
+             '())))
     (native-inputs (list perl
                          ;; m4 is not present in PATH when cross-building.
                          m4))
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 26187b670a..7b12f1320f 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -2625,7 +2625,8 @@ exec " gcc "/bin/" program
            (_
             '(#:configure-flags '("gl_cv_func_posix_spawn_works=no"))))
 
-       ,@(package-arguments bison)))))
+       ,@(strip-keyword-arguments '(#:configure-flags)
+                                 (package-arguments bison))))))
 
 (define flex-boot0
   ;; This Flex is needed to build MiG as well as Linux-Libre headers.

Reply via email to