Merge remote-tracking branch 'up/master' into master-riscv64
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
This commit is contained in:
commit
bf8d3e475d
@ -394,3 +394,9 @@ Patch096: gdb-vla-intel-fix-print-char-array.patch
|
|||||||
# =fedoratest
|
# =fedoratest
|
||||||
Patch097: gdb-rhbz1553104-s390x-arch12-test.patch
|
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
|
||||||
|
|
||||||
|
# Backport fix for deprecation of PyEval_InitThreads in Python 3.9.
|
||||||
|
Patch099: gdb-rhbz1822715-fix-python-deprecation.patch
|
||||||
|
|
||||||
|
@ -95,3 +95,5 @@
|
|||||||
%patch095 -p1
|
%patch095 -p1
|
||||||
%patch096 -p1
|
%patch096 -p1
|
||||||
%patch097 -p1
|
%patch097 -p1
|
||||||
|
%patch098 -p1
|
||||||
|
%patch099 -p1
|
||||||
|
@ -95,3 +95,5 @@ gdb-rhbz1398387-tab-crash-test.patch
|
|||||||
gdb-archer.patch
|
gdb-archer.patch
|
||||||
gdb-vla-intel-fix-print-char-array.patch
|
gdb-vla-intel-fix-print-char-array.patch
|
||||||
gdb-rhbz1553104-s390x-arch12-test.patch
|
gdb-rhbz1553104-s390x-arch12-test.patch
|
||||||
|
gdb-rhbz1818011-bfd-gcc10-error.patch
|
||||||
|
gdb-rhbz1822715-fix-python-deprecation.patch
|
||||||
|
49
gdb-rhbz1818011-bfd-gcc10-error.patch
Normal file
49
gdb-rhbz1818011-bfd-gcc10-error.patch
Normal file
@ -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. */
|
70
gdb-rhbz1822715-fix-python-deprecation.patch
Normal file
70
gdb-rhbz1822715-fix-python-deprecation.patch
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kevin Buettner <kevinb@redhat.com>
|
||||||
|
Date: Thu, 16 Apr 2020 05:27:26 -0700
|
||||||
|
Subject: gdb-rhbz1822715-fix-python-deprecation.patch
|
||||||
|
|
||||||
|
;; Backport fix for deprecation of PyEval_InitThreads in Python 3.9.
|
||||||
|
|
||||||
|
Fix compilation of python/python.c for Python 3.9
|
||||||
|
|
||||||
|
This commit fixes a compilation warning/error when building GDB
|
||||||
|
with Python 3.9:
|
||||||
|
|
||||||
|
g++ -x c++ -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DDNF_DEBUGINFO_INSTALL -I. -I../../gdb -I../../gdb/config -DLOCALEDIR="\"/usr/share/locale\"" -DHAVE_CONFIG_H -I../../gdb/../include/opcode -I../bfd -I../../gdb/../bfd -I../../gdb/../include -I../libdecnumber -I../../gdb/../libdecnumber -I../../gdb/../gnulib/import -I../gnulib/import -DTUI=1 -I/usr/include/guile/2.0 -pthread -I/usr/include/python3.9 -I/usr/include/python3.9 -I../../gdb/.. -pthread -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-variable -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-error=maybe-uninitialized -Wno-mismatched-tags -Wsuggest-override -Wimplicit-fallthrough=3 -Wduplicated-cond -Wshadow=local -Wdeprecated-copy -Wdeprecated-copy-dtor -Wredundant-move -Wformat -Wformat-nonliteral -Wno-unused -Werror -c -o ser-tcp.o -MT ser-tcp.o -MMD -MP -MF ./.deps/ser-tcp.Tpo ../../gdb/ser-tcp.c
|
||||||
|
../../gdb/python/python.c: In function 'bool do_start_initialization()':
|
||||||
|
../../gdb/python/python.c:1621:23: error: 'void PyEval_InitThreads()' is deprecated [-Werror=deprecated-declarations]
|
||||||
|
1621 | PyEval_InitThreads ();
|
||||||
|
| ^
|
||||||
|
In file included from /usr/include/python3.9/Python.h:141,
|
||||||
|
from ../../gdb/python/python-internal.h:86,
|
||||||
|
from ../../gdb/python/python.c:92:
|
||||||
|
/usr/include/python3.9/ceval.h:132:37: note: declared here
|
||||||
|
132 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
|
||||||
|
| ^~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Information about the deprecated function can be found here:
|
||||||
|
|
||||||
|
https://docs.python.org/3.9/whatsnew/3.9.html#deprecated
|
||||||
|
|
||||||
|
Specifically, with regard to PyEval_InitThreads(), it says:
|
||||||
|
|
||||||
|
The PyEval_InitThreads() and PyEval_ThreadsInitialized() functions
|
||||||
|
are now deprecated and will be removed in Python 3.11. Calling
|
||||||
|
PyEval_InitThreads() now does nothing. The GIL is initialized by
|
||||||
|
Py_Initialize() since Python 3.7. (Contributed by Victor Stinner
|
||||||
|
in bpo-39877.)
|
||||||
|
|
||||||
|
I chose to disable the call with a #if test using PY_VERSION_HEX.
|
||||||
|
There is precedent for use of PY_VERSION_HEX; it's used in two places
|
||||||
|
in python-internal.h. I noticed that under certain circumstances
|
||||||
|
python-internal.h defines PyEval_InitThreads to be nothing, which
|
||||||
|
accomplishes the same thing. I considered doing something similar for
|
||||||
|
this case, but decided against it because, at some point in the future,
|
||||||
|
the presence of PyEval_InitThreads() without some explanation will be
|
||||||
|
confusing to a reader who won't be able to find PyEval_InitThreads in
|
||||||
|
the current (future for us) Python API. IMO, use of the #if along
|
||||||
|
with an accompanying comment seemed more straightforward.
|
||||||
|
|
||||||
|
gdb/ChangeLog:
|
||||||
|
|
||||||
|
* python/python.c (do_start_initialization): Don't call
|
||||||
|
PyEval_InitThreads for Python 3.9 and beyond.
|
||||||
|
|
||||||
|
Change-Id: I0679fc10b6b76761a99538568f13188c6d8014e0
|
||||||
|
|
||||||
|
diff --git a/gdb/python/python.c b/gdb/python/python.c
|
||||||
|
--- a/gdb/python/python.c
|
||||||
|
+++ b/gdb/python/python.c
|
||||||
|
@@ -1618,7 +1618,12 @@ do_start_initialization ()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
Py_Initialize ();
|
||||||
|
+#if PY_VERSION_HEX < 0x03090000
|
||||||
|
+ /* PyEval_InitThreads became deprecated in Python 3.9 and will
|
||||||
|
+ be removed in Python 3.11. Prior to Python 3.7, this call was
|
||||||
|
+ required to initialize the GIL. */
|
||||||
|
PyEval_InitThreads ();
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#ifdef IS_PY3K
|
||||||
|
gdb_module = PyImport_ImportModule ("_gdb");
|
12
gdb.spec
12
gdb.spec
@ -35,7 +35,7 @@ Version: 9.1
|
|||||||
|
|
||||||
# The release always contains a leading reserved number, start it at 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.
|
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
|
||||||
Release: 4.0.riscv64%{?dist}
|
Release: 6.0.riscv64%{?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
|
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.
|
# Do not provide URL for snapshots as the file lasts there only for 2 days.
|
||||||
@ -1160,9 +1160,17 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sat Mar 21 2020 David Abdurachmanov <david.abdurachmanov@sifive.com> - 9.1-4.0.riscv64
|
* Sat May 2 2020 David Abdurachmanov <david.abdurachmanov@sifive.com> - 9.1-6.0.riscv64
|
||||||
- Add support for RISC-V (riscv64)
|
- Add support for RISC-V (riscv64)
|
||||||
|
|
||||||
|
* Thu Apr 16 2020 Kevin Buettner <kevinb@redhat.com> - 9.1-6
|
||||||
|
- Fix build breakage of gdb/python/python.c due to use of deprecated
|
||||||
|
Python function (RHBZ 1822715, Kevin Buettner)
|
||||||
|
|
||||||
|
* 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
|
* Mon Mar 2 2020 Sergio Durigan Junior <sergiodj@redhat.com> - 9.1-4
|
||||||
- Add '--without-guile' to GDB_MINIMAL_CONFIGURE_FLAGS.
|
- Add '--without-guile' to GDB_MINIMAL_CONFIGURE_FLAGS.
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ for c in `git rev-list --reverse ${common_ancestor}..HEAD` ; do
|
|||||||
# before, even if nothing has changed. This is bad, so we replace
|
# before, even if nothing has changed. This is bad, so we replace
|
||||||
# the commit hash by something constant (the string
|
# the commit hash by something constant (the string
|
||||||
# "FEDORA_PATCHES").
|
# "FEDORA_PATCHES").
|
||||||
git format-patch --no-signature --no-stat --keep -1 --stdout $c | sed -e '1 s/^From [0-9a-f]\+ \(.*\)/From FEDORA_PATCHES \1/' -e '/^index [0-9a-f]\+\.\.[0-9a-f]\+.*$/d' > ../$fname
|
git format-patch --no-signature --no-stat --keep-subject -1 --stdout $c | sed -e '1 s/^From [0-9a-f]\+ \(.*\)/From FEDORA_PATCHES \1/' -e '/^index [0-9a-f]\+\.\.[0-9a-f]\+.*$/d' > ../$fname
|
||||||
(cd .. && git add $fname)
|
(cd .. && git add $fname)
|
||||||
|
|
||||||
cat >> $temp_PATCH_file <<EOF
|
cat >> $temp_PATCH_file <<EOF
|
||||||
|
Loading…
Reference in New Issue
Block a user