Hello community,

here is the log from the commit of package gdb for openSUSE:Factory checked in 
at 2020-04-19 21:35:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gdb (Old)
 and      /work/SRC/openSUSE:Factory/.gdb.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gdb"

Sun Apr 19 21:35:01 2020 rev:138 rq:793869 version:8.3.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/gdb/gdb.changes  2020-02-22 18:56:28.409178538 
+0100
+++ /work/SRC/openSUSE:Factory/.gdb.new.2738/gdb.changes        2020-04-19 
21:35:10.218355615 +0200
@@ -1,0 +2,6 @@
+Tue Apr 14 07:40:12 UTC 2020 - Tom de Vries <tdevr...@suse.com>
+
+- Fix build with gcc 10 [bsc#1169368, swo#25717].
+  * bfd-change-num_group-to-unsigned-int.patch
+
+-------------------------------------------------------------------

New:
----
  bfd-change-num_group-to-unsigned-int.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gdb.spec ++++++
--- /var/tmp/diff_new_pack.d3WdXi/_old  2020-04-19 21:35:13.286361943 +0200
+++ /var/tmp/diff_new_pack.d3WdXi/_new  2020-04-19 21:35:13.290361951 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package gdb
 #
-# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 # Copyright (c) 2012 RedHat
 #
 # All modifications and additions to the file contributed by third parties
@@ -39,7 +39,7 @@
 # Do not provide URL for snapshots as the file lasts there only for 2 days.
 # ftp://sourceware.org/pub/gdb/releases/gdb-%%{version}.tar.gz
 Source:         gdb-%{version}.tar.bz2
-Url:            http://gnu.org/software/gdb/
+URL:            http://gnu.org/software/gdb/
 
 %if "%{scl}" == "devtoolset-1.1"
 Obsoletes:      devtoolset-1.0-%{pkg_name}
@@ -251,6 +251,7 @@
 Patch2013:      gdb-arch13-1.diff
 Patch2014:      gdb-arch13-2.diff
 Patch2015:      gdb-arch13-3.diff
+Patch2016:      bfd-change-num_group-to-unsigned-int.patch
 
 # Proposed patch for PR symtab/24971
 Patch2500:      gdb-symtab-prefer-var-def-over-decl.patch
@@ -610,6 +611,7 @@
 %patch2013 -p1
 %patch2014 -p1
 %patch2015 -p1
+%patch2016 -p1
 
 %patch2500 -p1
 %patch2501 -p1

++++++ bfd-change-num_group-to-unsigned-int.patch ++++++
bfd: Change num_group to unsigned int

elf.c failed with to with GCC 10 as of

commit 906b3eb9df6c577d3f6e9c3ea5c9d7e4d1e90536
Author: Martin Liska <mli...@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.

---
 bfd/elf-bfd.h | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index c546b583b8..5f3a5cc04b 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1953,7 +1953,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.  */

Reply via email to