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

commit d19250c99c953383dfb511479c001c815d4de00d
Author: Janneke Nieuwenhuizen <jann...@gnu.org>
AuthorDate: Thu Jan 2 18:24:44 2025 +0100

    gnu: freeipmi: Fix build with gcc-14.
    
    * gnu/packages/freeipmi.scm (freeipmi)[arguments]: Add CFLAGS to 
#:configure-flags
    to relax gcc-14's strictness.
    
    Change-Id: I468eab233af14ee41f50fed851bd3e107f8ba617
---
 gnu/packages/freeipmi.scm | 46 +++++++++++++++++++++++++---------------------
 1 file changed, 25 insertions(+), 21 deletions(-)

diff --git a/gnu/packages/freeipmi.scm b/gnu/packages/freeipmi.scm
index 0febd97122..b3a3c8cdc0 100644
--- a/gnu/packages/freeipmi.scm
+++ b/gnu/packages/freeipmi.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2013 Ludovic Courtès <l...@gnu.org>
 ;;; Copyright © 2015, 2016, 2017, 2020, 2021, 2022 Efraim Flashner 
<efr...@flashner.co.il>
 ;;; Copyright © 2019–2022 Tobias Geerinckx-Rice <m...@tobias.gr>
+;;; Copyright © 2025 Janneke Nieuwenhuizen <jann...@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -41,27 +42,30 @@
                "1bwc5gz3985fly84ap1yq8jkddkf6s5px2dinmswxx9r8qsrr4nn"))))
     (build-system gnu-build-system)
     (arguments
-     (append (if (and (%current-target-system)
-                      (target-riscv64?))
-                 (list #:phases
-                       #~(modify-phases %standard-phases
-                           (add-after 'unpack 'update-config-scripts
-                             (lambda* (#:key inputs native-inputs 
#:allow-other-keys)
-                               ;; Replace outdated config.guess and config.sub.
-                               (for-each (lambda (file)
-                                           (install-file
-                                            (search-input-file
-                                             (or native-inputs inputs)
-                                             (string-append "/bin/" file)) 
"config"))
-                                         '("config.guess" "config.sub"))))))
-                 '())
-             (list #:configure-flags #~'("--disable-static"
-                                         #$@(if (%current-target-system)
-                                                ;; We cannot check for these 
devices
-                                                ;; when cross compiling.
-                                                `("ac_cv_file__dev_random=yes"
-                                                  
"ac_cv_file__dev_urandom=yes")
-                                                '())))))
+     (append
+      (if (and (%current-target-system)
+               (target-riscv64?))
+          (list #:phases
+                #~(modify-phases %standard-phases
+                    (add-after 'unpack 'update-config-scripts
+                      (lambda* (#:key inputs native-inputs #:allow-other-keys)
+                        ;; Replace outdated config.guess and config.sub.
+                        (for-each (lambda (file)
+                                    (install-file
+                                     (search-input-file
+                                      (or native-inputs inputs)
+                                      (string-append "/bin/" file)) "config"))
+                                  '("config.guess" "config.sub"))))))
+          '())
+             (list #:configure-flags
+                   #~'("CFLAGS=-g -O2 -Wno-error=implicit-function-declaration"
+                       "--disable-static"
+                       #$@(if (%current-target-system)
+                              ;; We cannot check for these devices
+                              ;; when cross compiling.
+                              `("ac_cv_file__dev_random=yes"
+                                "ac_cv_file__dev_urandom=yes")
+                              '())))))
     (native-inputs
      (if (and (%current-target-system)
               (target-riscv64?))

Reply via email to