GNU bug report logs - #74798
[PATCH] gnu: gdb: Ensure configure-flags are appended to original package

Previous Next

Package: guix-patches;

Reported by: Rutherther <rutherther <at> ditigal.xyz>

Date: Wed, 11 Dec 2024 19:36:01 UTC

Severity: normal

Tags: patch

Done: Janneke Nieuwenhuizen <janneke <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 74798 in the body.
You can then email your comments to 74798 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#74798; Package guix-patches. (Wed, 11 Dec 2024 19:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rutherther <rutherther <at> ditigal.xyz>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 11 Dec 2024 19:36:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Rutherther <rutherther <at> ditigal.xyz>
To: guix-patches <at> gnu.org
Cc: Rutherther <rutherther <at> ditigal.xyz>
Subject: [PATCH] gnu: gdb: Ensure configure-flags are appended to original
 package
Date: Wed, 11 Dec 2024 20:35:45 +0100
Since recently there has been a change to gdb package that introduced
configure-flags, three gdb packages broke, since they assumed there are no
configure-flags in gdb. That means they produced the same gdb as gdb-14.

* gnu/packages/embedded.scm (make-gdb-arm-none-eabi)[arguments]: Append
configure-flags to original flags.
* gnu/packages/gdb.scm (gdb-multiarch)[arguments]: Append
configure-flags to original flags.
* gnu/packages/gdb.scm (avr-gdb)[arguments]: Append
configure-flags to original flags.

Change-Id: Ia8748b86dc72197bd4eef307d091b6af44fc5611
---
 gnu/packages/embedded.scm | 14 ++++++++------
 gnu/packages/gdb.scm      | 32 ++++++++++++++++----------------
 2 files changed, 24 insertions(+), 22 deletions(-)

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 0dcfc6669f..930857d0aa 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -741,12 +741,14 @@ (define make-gdb-arm-none-eabi
       (inherit gdb)
       (name "gdb-arm-none-eabi")
       (arguments
-       `(#:configure-flags '("--target=arm-none-eabi"
-                             "--enable-multilib"
-                             "--enable-interwork"
-                             "--enable-languages=c,c++"
-                             "--disable-nls")
-         ,@(package-arguments gdb))))))
+       (substitute-keyword-arguments (package-arguments gdb)
+         ((#:configure-flags flags '())
+          #~(cons* "--target=arm-none-eabi"
+                   "--enable-multilib"
+                   "--enable-interwork"
+                   "--enable-languages=c,c++"
+                   "--disable-nls"
+                   #$flags)))))))
 
 (define-public libjaylink
   (package
diff --git a/gnu/packages/gdb.scm b/gnu/packages/gdb.scm
index af5ebde3f6..ef100306b4 100644
--- a/gnu/packages/gdb.scm
+++ b/gnu/packages/gdb.scm
@@ -184,14 +184,14 @@ (define-public gdb-multiarch
   (package/inherit gdb-14
     (name "gdb-multiarch")
     (arguments
-     (append
-      (list #:configure-flags
-            #~(list "--enable-targets=all"
-                    "--enable-multilib"
-                    "--enable-interwork"
-                    "--enable-languages=c,c++"
-                    "--disable-nls"))
-      (package-arguments gdb-14)))
+     (substitute-keyword-arguments (package-arguments gdb-14)
+       ((#:configure-flags flags '())
+        #~(cons* "--enable-targets=all"
+                 "--enable-multilib"
+                 "--enable-interwork"
+                 "--enable-languages=c,c++"
+                 "--disable-nls"
+                 #$flags))))
     (synopsis "The GNU debugger (with all architectures enabled)")))
 
 (define-public gdb-minimal
@@ -210,14 +210,14 @@ (define-public avr-gdb
   (package/inherit gdb-14
     (name "avr-gdb")
     (arguments
-     (append
-      (list #:configure-flags
-            #~(list "--target=avr"
-                    "--disable-nls"
-                    "--enable-languages=c,c++"
-                    "--with-system-readline"
-                    "--enable-source-highlight"))
-      (package-arguments gdb-14)))
+     (substitute-keyword-arguments (package-arguments gdb-14)
+       ((#:configure-flags flags '())
+        #~(cons* "--target=avr"
+                 "--disable-nls"
+                 "--enable-languages=c,c++"
+                 "--with-system-readline"
+                 "--enable-source-highlight"
+                 #$flags))))
     (synopsis "The GNU Debugger for AVR")
     (description
      "GDB is the GNU debugger.  With it, you can monitor what a program is

base-commit: 27750bd0cddddab9e900f289a5520314ef66487e
-- 
2.46.0




Information forwarded to guix-patches <at> gnu.org:
bug#74798; Package guix-patches. (Wed, 11 Dec 2024 20:04:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Janneke Nieuwenhuizen <janneke <at> gnu.org>
To: Rutherther via Guix-patches via <guix-patches <at> gnu.org>
Cc: 74798-done <at> debbugs.gnu.org, Rutherther <rutherther <at> ditigal.xyz>
Subject: Re: [bug#74798] [PATCH] gnu: gdb: Ensure configure-flags are
 appended to original package
Date: Wed, 11 Dec 2024 21:02:49 +0100
Rutherther via Guix-patches via writes:

Hello,

> Since recently there has been a change to gdb package that introduced
> configure-flags, three gdb packages broke, since they assumed there are no
> configure-flags in gdb. That means they produced the same gdb as gdb-14.
>
> * gnu/packages/embedded.scm (make-gdb-arm-none-eabi)[arguments]: Append
> configure-flags to original flags.
> * gnu/packages/gdb.scm (gdb-multiarch)[arguments]: Append
> configure-flags to original flags.
> * gnu/packages/gdb.scm (avr-gdb)[arguments]: Append
> configure-flags to original flags.
>
> Change-Id: Ia8748b86dc72197bd4eef307d091b6af44fc5611

Thank you!  And sorry for breaking things :)

I've changed the commit message to

--8<---------------cut here---------------start------------->8---
gnu: gdb: Fix build of target-specific variants.

This is a follow-up to commit
    baf4a3330762d184f5b10846151a9e3afd7c3dbe
    gnu: Add gdb-15.2, with support for the 64bit Hurd.

That commit changed the gdb package, introducing #:configure-flags, breaking
three gdb packages, since they assumed there are no #:configure-flags in gdb.
That means they produced the same gdb as gdb-14.

This patch fixes that by ensuring #:configure-flags are appended to original
package.

* gnu/packages/embedded.scm (make-gdb-arm-none-eabi)[arguments]:
Append #configure-flags to original flags.
(gdb-multiarch)[arguments]: Likewise.
(avr-gdb)[arguments]: Likewise.
--8<---------------cut here---------------end--------------->8---

and pushed to master as 98908e0777889aeec2796dbdc4f0809a1898dd3b.

Greetings,
Janneke

-- 
Janneke Nieuwenhuizen <janneke <at> gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | AvatarĀ® https://AvatarAcademy.com




Reply sent to Janneke Nieuwenhuizen <janneke <at> gnu.org>:
You have taken responsibility. (Wed, 11 Dec 2024 20:04:02 GMT) Full text and rfc822 format available.

Notification sent to Rutherther <rutherther <at> ditigal.xyz>:
bug acknowledged by developer. (Wed, 11 Dec 2024 20:04:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 09 Jan 2025 12:24:15 GMT) Full text and rfc822 format available.

This bug report was last modified 161 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.