public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gdb] gdb-17.2-rebase-f44: Fix build breakage when compiling bfd/elf.c with gcc 10. (RHBZ 1818011,
@ 2026-06-27 23:59 Kevin Buettner
  0 siblings, 0 replies; only message in thread
From: Kevin Buettner @ 2026-06-27 23:59 UTC (permalink / raw)
  To: git-commits

          A new commit has been pushed.

          Repo   : rpms/gdb
          Branch : gdb-17.2-rebase-f44
          Commit : c3e0b255c87eeaf037abcfb4c037674821c433c5
          Author : Kevin Buettner <kevinb@redhat.com>
          Date   : 2020-04-09T10:34:41-04:00
          Stats  : +59/-1 in 5 file(s)
          URL    : https://src.fedoraproject.org/rpms/gdb/c/c3e0b255c87eeaf037abcfb4c037674821c433c5?branch=gdb-17.2-rebase-f44

          Log:
          Fix build breakage when compiling bfd/elf.c with gcc 10. (RHBZ 1818011,
H.J. Lu)

---
diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include
index a3b3538..8f81947 100644
--- a/_gdb.spec.Patch.include
+++ b/_gdb.spec.Patch.include
@@ -394,3 +394,6 @@ Patch096: gdb-vla-intel-fix-print-char-array.patch
 # =fedoratest
 Patch097: gdb-rhbz1553104-s390x-arch12-test.patch
 
+# Fix int conversion error from bfd/elf.c when compiling with gcc 10
+Patch098: gdb-rhbz1818011-bfd-gcc10-error.patch
+

diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include
index 8f619ab..b089bb1 100644
--- a/_gdb.spec.patch.include
+++ b/_gdb.spec.patch.include
@@ -95,3 +95,4 @@
 %patch095 -p1
 %patch096 -p1
 %patch097 -p1
+%patch098 -p1

diff --git a/_patch_order b/_patch_order
index a45566e..16cee99 100644
--- a/_patch_order
+++ b/_patch_order
@@ -95,3 +95,4 @@ gdb-rhbz1398387-tab-crash-test.patch
 gdb-archer.patch
 gdb-vla-intel-fix-print-char-array.patch
 gdb-rhbz1553104-s390x-arch12-test.patch
+gdb-rhbz1818011-bfd-gcc10-error.patch

diff --git a/gdb-rhbz1818011-bfd-gcc10-error.patch b/gdb-rhbz1818011-bfd-gcc10-error.patch
new file mode 100644
index 0000000..6740326
--- /dev/null
+++ b/gdb-rhbz1818011-bfd-gcc10-error.patch
@@ -0,0 +1,49 @@
+From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
+From: Kevin Buettner <kevinb@redhat.com>
+Date: Wed, 8 Apr 2020 16:15:52 -0400
+Subject: gdb-rhbz1818011-bfd-gcc10-error.patch
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+;; Fix int conversion error from bfd/elf.c when compiling with gcc 10
+
+Original commit message from H.J. Lu <hjl.tools@gmail.com> is below:
+
+bfd: Change num_group to unsigned int
+
+elf.c failed with to with GCC 10 as of
+
+commit 906b3eb9df6c577d3f6e9c3ea5c9d7e4d1e90536
+Author: Martin Liska <mliska@suse.cz>
+Date:   Tue Mar 24 11:40:10 2020 +0100
+
+    Improve endianess detection.
+
+            PR lto/94249
+            * plugin-api.h: Add more robust endianess detection.
+
+binutils-gdb/bfd/elf.c: In function ‘setup_group’:
+binutils-gdb/bfd/elf.c:740:35: error: overflow in conversion from ‘unsigned int’ to ‘int’ changes value from ‘num_group = 4294967295’ to ‘-1’ [-Werror=overflow]
+  740 |     elf_tdata (abfd)->num_group = num_group = -1;
+      |                                   ^~~~~~~~~
+cc1: all warnings being treated as errors
+make[2]: *** [Makefile:1608: elf.lo] Error 1
+
+Change num_group in elf_obj_tdata to unsigned int to compile with GCC 10.
+
+	PR binutils/25717
+	* elf-bfd.h (elf_obj_tdata): Change num_group to unsigned int.
+
+diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
+--- a/bfd/elf-bfd.h
++++ b/bfd/elf-bfd.h
+@@ -1937,7 +1937,7 @@ struct elf_obj_tdata
+   struct sdt_note *sdt_note_head;
+ 
+   Elf_Internal_Shdr **group_sect_ptr;
+-  int num_group;
++  unsigned int num_group;
+ 
+   /* Index into group_sect_ptr, updated by setup_group when finding a
+      section's group.  Used to optimize subsequent group searches.  */

diff --git a/gdb.spec b/gdb.spec
index 90f3441..8afe97c 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -35,7 +35,7 @@ Version: 9.1
 
 # The release always contains a leading reserved number, start it at 1.
 # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 4%{?dist}
+Release: 5%{?dist}
 
 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL
 # Do not provide URL for snapshots as the file lasts there only for 2 days.
@@ -1155,6 +1155,10 @@ fi
 %endif
 
 %changelog
+* Wed Apr 08 2020 Kevin Buettner <kevinb@redhat.com> - 9.1-5
+- Fix build breakage when compiling bfd/elf.c with gcc 10. (RHBZ 1818011,
+  H.J. Lu)
+
 * Mon Mar  2 2020 Sergio Durigan Junior <sergiodj@redhat.com> - 9.1-4
 - Add '--without-guile' to GDB_MINIMAL_CONFIGURE_FLAGS.
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-27 23:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-27 23:59 [rpms/gdb] gdb-17.2-rebase-f44: Fix build breakage when compiling bfd/elf.c with gcc 10. (RHBZ 1818011, Kevin Buettner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox