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

commit f649c21e32bb7aa597f2828b846cea8e0c382dcf
Author: Janneke Nieuwenhuizen <[email protected]>
AuthorDate: Wed Jan 1 11:46:51 2025 +0100

    gnu: nvi: Fix build with gcc-14.
    
    * gnu/packages/nvi.scm (nvi)[arguments]: Add CFLAGS to #:make-flags to relax
    gcc-14's strictness.
    
    Change-Id: I8572a13360c1571c5afe29789061d6277d1fb977
---
 gnu/packages/nvi.scm | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/nvi.scm b/gnu/packages/nvi.scm
index f1f461f2b4..0fc860b482 100644
--- a/gnu/packages/nvi.scm
+++ b/gnu/packages/nvi.scm
@@ -1,6 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2014 Marek Benc <[email protected]>
 ;;; Copyright © 2020 Marius Bakke <[email protected]>
+;;; Copyright © 2025 Janneke Nieuwenhuizen <[email protected]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -71,6 +72,13 @@
           ,@(if (%current-target-system)
                 '("vi_cv_sprintf_count=yes")
                 '()))
+        #:make-flags
+        (list
+         ;; nvi's configure chokes on passing CFLAGS and ignores
+         ;; CFLAGS set in the environment
+         (string-append "CFLAGS=-g -O2"
+                        " -Wno-error=implicit-function-declaration"
+                        " -Wno-error=incompatible-pointer-types"))
         #:phases
         (modify-phases %standard-phases
           (add-before 'configure 'fix-configure
@@ -87,8 +95,7 @@
                               ,(version-major+minor
                                 (package-version automake))
                               "/" file) "."))
-                          '("config.sub")))
-              #t)))))
+                          '("config.sub"))))))))
     (inputs
       (list bdb ncurses))
     (native-inputs

Reply via email to