guix-commits
[Top][All Lists]
Advanced

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

02/06: gnu: commencement: static-bash-for-glibc: Build fix for x86_64-li


From: guix-commits
Subject: 02/06: gnu: commencement: static-bash-for-glibc: Build fix for x86_64-linux with gcc-14.
Date: Tue, 3 Dec 2024 11:19:36 -0500 (EST)

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

commit 737a7b3e2e43fd08f4bbe5a481f1b98f3e2892d7
Author: Janneke Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Tue Dec 3 12:55:01 2024 +0100

    gnu: commencement: static-bash-for-glibc: Build fix for x86_64-linux  with 
gcc-14.
    
    * gnu/packages/commencement.scm (gcc-boot0)[arguments]: When building for
    x86_64-linux, add -Wno-implicit-function-declaration to #:configule-flags.
    
    Change-Id: I6e552aaa458755ec920873a0535f599c88a1f74f
---
 gnu/packages/commencement.scm | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 5708714342..1ba2378feb 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -3064,13 +3064,22 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker 
-Wl,~a/~a \"$@\"~%"
 
        ,@(substitute-keyword-arguments (package-arguments static-bash)
            ((#:configure-flags flags #~'())
-            ;; Add a '-L' flag so that the pseudo-cross-ld of
-            ;; BINUTILS-BOOT0 can find libc.a.
-            #~(append #$flags
-                      (list (string-append "LDFLAGS=-static -L"
-                                           (assoc-ref %build-inputs
-                                                      "libc:static")
-                                           "/lib")))))))))
+            #~(append
+               #$flags
+               ;; gcc-14 implictly uses -Wimplicit-function-declaration
+               ;; which together with -Werror causes:
+               ;; ./enable.def:492:11: error: implicit declaration of function 
‘dlclose’;
+               ;; Doing it here rather than in `bash-minimal' or `static-bash'
+               ;; avoids a boot0-world rebuild.
+               #$(if (and (target-x86-64?) (target-linux?))
+                     #~'("CFLAGS=-g -O2 -Wno-implicit-function-declaration")
+                     #~'())
+               ;; Add a '-L' flag so that the pseudo-cross-ld of
+               ;; BINUTILS-BOOT0 can find libc.a.
+               (list (string-append "LDFLAGS=-static -L"
+                                    (assoc-ref %build-inputs
+                                               "libc:static")
+                                    "/lib")))))))))
 
 (define gettext-boot0
   ;; A minimal gettext used during bootstrap.



reply via email to

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