summaryrefslogtreecommitdiff
path: root/sys-devel/gdb/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-05-12 16:42:50 +0300
committerV3n3RiX <venerix@koprulu.sector>2022-05-12 16:42:50 +0300
commit752d6256e5204b958b0ef7905675a940b5e9172f (patch)
tree330d16e6362a49cbed8875a777fe641a43376cd3 /sys-devel/gdb/files
parent0c100b7dd2b30e75b799d806df4ef899fd98e1ea (diff)
gentoo resync : 12.05.2022
Diffstat (limited to 'sys-devel/gdb/files')
-rw-r--r--sys-devel/gdb/files/gdb-10.1-cet.patch103
-rw-r--r--sys-devel/gdb/files/gdb-10.2-DW_LLE-riscv64.patch41
-rw-r--r--sys-devel/gdb/files/gdb-10.2-sparc-nat.patch47
-rw-r--r--sys-devel/gdb/files/gdb-11.1-glibc-2.34-sim.patch110
-rw-r--r--sys-devel/gdb/files/gdb-11.2-glibc-2.35-fsqrt.patch32
-rw-r--r--sys-devel/gdb/files/gdb-12.1-readline-8.2-build.patch29
6 files changed, 61 insertions, 301 deletions
diff --git a/sys-devel/gdb/files/gdb-10.1-cet.patch b/sys-devel/gdb/files/gdb-10.1-cet.patch
deleted file mode 100644
index 7477ff90ac95..000000000000
--- a/sys-devel/gdb/files/gdb-10.1-cet.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-https://bugs.gentoo.org/771765
-https://sourceware.org/PR27397
-
-On i586-like CPUs endbr32 added by -Wl,-z,ibt,-z,shstk
-generates crashing binaries and causes ./configure failure.
-
-From 847e4b3207f97762dc641db8d3b188081c3370c3 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Fri, 12 Feb 2021 16:30:23 -0800
-Subject: [PATCH] GCC_CET_HOST_FLAGS: Check if host supports multi-byte NOPs
-
----
- config/cet.m4 | 19 ++++++++++++++++---
- libiberty/configure | 29 +++++++++++++++++++++++++++++
- 2 files changed, 45 insertions(+), 3 deletions(-)
-
-diff --git a/config/cet.m4 b/config/cet.m4
-index c67fb4f35b6..7718be1afe8 100644
---- a/config/cet.m4
-+++ b/config/cet.m4
-@@ -130,6 +130,18 @@ fi
- if test x$may_have_cet = xyes; then
- if test x$cross_compiling = xno; then
- AC_TRY_RUN([
-+int
-+main ()
-+{
-+ asm ("endbr32");
-+ return 0;
-+}
-+ ],
-+ [have_multi_byte_nop=yes],
-+ [have_multi_byte_nop=no])
-+ have_cet=no
-+ if test x$have_multi_byte_nop = xyes; then
-+ AC_TRY_RUN([
- static void
- foo (void)
- {
-@@ -155,9 +167,10 @@ main ()
- bar ();
- return 0;
- }
-- ],
-- [have_cet=no],
-- [have_cet=yes])
-+ ],
-+ [have_cet=no],
-+ [have_cet=yes])
-+ fi
- if test x$enable_cet = xno -a x$have_cet = xyes; then
- AC_MSG_ERROR([Intel CET must be enabled on Intel CET enabled host])
- fi
-diff --git a/libiberty/configure b/libiberty/configure
-index 160b8c9e8b1..29a690d44fc 100755
---- a/libiberty/configure
-+++ b/libiberty/configure
-@@ -5539,6 +5539,34 @@ else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
- /* end confdefs.h. */
-
-+int
-+main ()
-+{
-+ asm ("endbr32");
-+ return 0;
-+}
-+
-+_ACEOF
-+if ac_fn_c_try_run "$LINENO"; then :
-+ have_multi_byte_nop=yes
-+else
-+ have_multi_byte_nop=no
-+fi
-+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-+ conftest.$ac_objext conftest.beam conftest.$ac_ext
-+fi
-+
-+ have_cet=no
-+ if test x$have_multi_byte_nop = xyes; then
-+ if test "$cross_compiling" = yes; then :
-+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+as_fn_error $? "cannot run test program while cross compiling
-+See \`config.log' for more details" "$LINENO" 5; }
-+else
-+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-+/* end confdefs.h. */
-+
- static void
- foo (void)
- {
-@@ -5575,6 +5603,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
- fi
-
-+ fi
- if test x$enable_cet = xno -a x$have_cet = xyes; then
- as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" "$LINENO" 5
- fi
---
-2.29.2
-
diff --git a/sys-devel/gdb/files/gdb-10.2-DW_LLE-riscv64.patch b/sys-devel/gdb/files/gdb-10.2-DW_LLE-riscv64.patch
deleted file mode 100644
index 0d3e8c5cb949..000000000000
--- a/sys-devel/gdb/files/gdb-10.2-DW_LLE-riscv64.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=80d1206d7fea6eb756183e2825abdfd0f00cd976
-https://sourceware.org/PR27999
-
-From 80d1206d7fea6eb756183e2825abdfd0f00cd976 Mon Sep 17 00:00:00 2001
-From: Andreas Schwab <schwab@suse.de>
-Date: Mon, 21 Jun 2021 11:38:23 +0200
-Subject: [PATCH] gdb: Support DW_LLE_start_end
-
-Without that it is impossible to debug on riscv64.
-
---- a/gdb/dwarf2/loc.c
-+++ b/gdb/dwarf2/loc.c
-@@ -255,9 +255,27 @@ decode_debug_loclists_addresses (dwarf2_per_cu_data *per_cu,
- *new_ptr = loc_ptr;
- return DEBUG_LOC_OFFSET_PAIR;
-
-+ case DW_LLE_start_end:
-+ if (loc_ptr + 2 * addr_size > buf_end)
-+ return DEBUG_LOC_BUFFER_OVERFLOW;
-+
-+ if (signed_addr_p)
-+ *low = extract_signed_integer (loc_ptr, addr_size, byte_order);
-+ else
-+ *low = extract_unsigned_integer (loc_ptr, addr_size, byte_order);
-+
-+ loc_ptr += addr_size;
-+ if (signed_addr_p)
-+ *high = extract_signed_integer (loc_ptr, addr_size, byte_order);
-+ else
-+ *high = extract_unsigned_integer (loc_ptr, addr_size, byte_order);
-+
-+ loc_ptr += addr_size;
-+ *new_ptr = loc_ptr;
-+ return DEBUG_LOC_START_END;
-+
- /* Following cases are not supported yet. */
- case DW_LLE_startx_endx:
-- case DW_LLE_start_end:
- case DW_LLE_default_location:
- default:
- return DEBUG_LOC_INVALID_ENTRY;
diff --git a/sys-devel/gdb/files/gdb-10.2-sparc-nat.patch b/sys-devel/gdb/files/gdb-10.2-sparc-nat.patch
deleted file mode 100644
index 5e71efa0d33a..000000000000
--- a/sys-devel/gdb/files/gdb-10.2-sparc-nat.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 288e3189fce8f466ca60411c27e8f1c0dac5d582 Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich <siarheit@google.com>
-Date: Sun, 25 Apr 2021 20:50:38 +0100
-Subject: [PATCH] gdb: fix sparc build failure of linux-nat
-
-On sparc build failed as:
-
-```
-gdb/sparc-linux-nat.c: In member function
- 'virtual void sparc_linux_nat_target::fetch_registers(regcache*, int)':
-gdb/sparc-linux-nat.c:36:37:
- error: cannot convert 'regcache*' to 'process_stratum_target*'
- 36 | { sparc_fetch_inferior_registers (regcache, regnum); }
- | ^~~~~~~~
- | |
- | regcache*
-```
-
-The fix adopts gdb/sparc-nat.h API change in d1e93af64a6
-("gdb: set current thread in sparc_{fetch,collect}_inferior_registers").
-
-gdb/ChangeLog:
-
- * sparc-linux-nat.c (sparc_linux_nat_target): fix sparc build
- by passing `process_stratum_target*` parameter.
----
- gdb/sparc-linux-nat.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/gdb/sparc-linux-nat.c
-+++ b/gdb/sparc-linux-nat.c
-@@ -33,10 +33,10 @@ class sparc_linux_nat_target final : public linux_nat_target
- public:
- /* Add our register access methods. */
- void fetch_registers (struct regcache *regcache, int regnum) override
-- { sparc_fetch_inferior_registers (regcache, regnum); }
-+ { sparc_fetch_inferior_registers (this, regcache, regnum); }
-
- void store_registers (struct regcache *regcache, int regnum) override
-- { sparc_store_inferior_registers (regcache, regnum); }
-+ { sparc_store_inferior_registers (this, regcache, regnum); }
- };
-
- static sparc_linux_nat_target the_sparc_linux_nat_target;
---
-2.31.1
-
diff --git a/sys-devel/gdb/files/gdb-11.1-glibc-2.34-sim.patch b/sys-devel/gdb/files/gdb-11.1-glibc-2.34-sim.patch
deleted file mode 100644
index 15ab45f278f1..000000000000
--- a/sys-devel/gdb/files/gdb-11.1-glibc-2.34-sim.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=39d53d04357606a15efd400147fa7369d71baf2c;hp=46039d3632e32d9a404c1f18cf55f14c894e4627
-https://bugs.gentoo.org/813831
-
-From 39d53d04357606a15efd400147fa7369d71baf2c Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Sun, 3 Oct 2021 12:02:53 -0400
-Subject: [PATCH 1/1] sim: filter out SIGSTKSZ [PR sim/28302]
-
-We map target signals to host signals so we can propagate signals
-between the host & simulated worlds. That means we need to know
-the symbolic names & values of all signals that might be sent.
-
-The tools that generate that list use signal.h and include all
-symbols that start with "SIG" so as to automatically include any
-new symbols that the C library might add. Unfortunately, this
-also picks up "SIGSTKSZ" which is not actually a signal itself,
-but a signal related setting -- it's the size of the stack when
-a signal is handled.
-
-By itself this doesn't super matter as we will never see a signal
-with that same value (since the range of valid signals tend to be
-way less than 1024, and the size of the default signal stack will
-never be that small). But with recent glibc changes that make this
-into a dynamic value instead of a compile-time constant, some users
-see build failures when building the sim.
-
-As suggested by Adam Sampson, update our scripts to ignore this
-symbol to simplify everything and avoid the build failure.
-
-Bug: https://sourceware.org/PR28302
----
- sim/bfin/linux-targ-map.h | 5 +----
- sim/common/gennltvals.py | 6 ++++--
- sim/common/nltvals.def | 1 -
- 3 files changed, 5 insertions(+), 7 deletions(-)
-
-diff --git a/sim/bfin/linux-targ-map.h b/sim/bfin/linux-targ-map.h
-index e9c8c8f273b..0340ed54764 100644
---- a/sim/bfin/linux-targ-map.h
-+++ b/sim/bfin/linux-targ-map.h
-@@ -30,6 +30,7 @@ echo
- # XXX: nothing uses this ?
- echo '#include <signal.h>' | \
- bfin-uclinux-gcc -E -dD -P - | \
-+grep -v SIGSTKSZ | \
- sed -r -n \
- -e '1istatic CB_TARGET_DEFS_MAP cb_linux_signal_map[] = {' \
- -e '$i\ \ { 0, -1, -1 }\n};' \
-@@ -1987,10 +1988,6 @@ static CB_TARGET_DEFS_MAP cb_linux_signal_map[] =
- #ifdef SIG_SETMASK
- # define TARGET_LINUX_SIG_SETMASK 2
- { "SIG_SETMASK", SIG_SETMASK, TARGET_LINUX_SIG_SETMASK },
--#endif
--#ifdef SIGSTKSZ
--# define TARGET_LINUX_SIGSTKSZ 8192
-- { "SIGSTKSZ", SIGSTKSZ, TARGET_LINUX_SIGSTKSZ },
- #endif
- { 0, -1, -1 }
- };
-diff --git a/sim/common/gennltvals.py b/sim/common/gennltvals.py
-index db3ff641d40..955ace34311 100755
---- a/sim/common/gennltvals.py
-+++ b/sim/common/gennltvals.py
-@@ -67,6 +67,7 @@ FILE_HEADER = f"""\
- def gentvals(output: TextIO, cpp: str, srctype: str, srcdir: Path,
- headers: Iterable[str],
- pattern: str,
-+ filter: str = r'^$',
- target: str = None):
- """Extract constants from the specified files using a regular expression.
-
-@@ -94,12 +95,13 @@ def gentvals(output: TextIO, cpp: str, srctype: str, srcdir: Path,
- srcfile = ''.join(f'#include <{x}>\n' for x in headers)
- syms = set()
- define_pattern = re.compile(r'^#\s*define\s+(' + pattern + ')')
-+ filter_pattern = re.compile(filter)
- for header in headers:
- with open(srcdir / header, 'r', encoding='utf-8') as fp:
- data = fp.read()
- for line in data.splitlines():
- m = define_pattern.match(line)
-- if m:
-+ if m and not filter_pattern.search(line):
- syms.add(m.group(1))
- for sym in sorted(syms):
- srcfile += f'#ifdef {sym}\nDEFVAL {{ "{sym}", {sym} }},\n#endif\n'
-@@ -129,7 +131,7 @@ def gen_common(output: TextIO, newlib: Path, cpp: str):
- ('errno.h', 'sys/errno.h'), 'E[A-Z0-9]*')
-
- gentvals(output, cpp, 'signal', newlib / 'newlib/libc/include',
-- ('signal.h', 'sys/signal.h'), r'SIG[A-Z0-9]*')
-+ ('signal.h', 'sys/signal.h'), r'SIG[A-Z0-9]*', filter=r'SIGSTKSZ')
-
- gentvals(output, cpp, 'open', newlib / 'newlib/libc/include',
- ('fcntl.h', 'sys/fcntl.h', 'sys/_default_fcntl.h'), r'O_[A-Z0-9]*')
-diff --git a/sim/common/nltvals.def b/sim/common/nltvals.def
-index 8ae88397249..8bc6ae59026 100644
---- a/sim/common/nltvals.def
-+++ b/sim/common/nltvals.def
-@@ -116,7 +116,6 @@
- { "SIGPROF", 27 },
- { "SIGQUIT", 3 },
- { "SIGSEGV", 11 },
-- { "SIGSTKSZ", 8192 },
- { "SIGSTOP", 17 },
- { "SIGSYS", 12 },
- { "SIGTERM", 15 },
---
-2.27.0
-
diff --git a/sys-devel/gdb/files/gdb-11.2-glibc-2.35-fsqrt.patch b/sys-devel/gdb/files/gdb-11.2-glibc-2.35-fsqrt.patch
new file mode 100644
index 000000000000..5e0121f85029
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-11.2-glibc-2.35-fsqrt.patch
@@ -0,0 +1,32 @@
+https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=a532eb7277ff64fb073e209d418b0a97f686c0e3
+https://bugs.gentoo.org/833590
+
+From: Sergei Trofimovich <siarheit@google.com>
+Date: Mon, 14 Feb 2022 17:12:41 +0000
+Subject: [PATCH] microblaze: fix fsqrt collicion to build on glibc-2.35
+
+ * microblaze-opcm.h: Renamed 'fsqrt' to 'microblaze_fsqrt'.
+ * microblaze-opc.h: Follow 'fsqrt' rename.
+--- a/opcodes/microblaze-opc.h
++++ b/opcodes/microblaze-opc.h
+@@ -268,7 +268,7 @@ const struct op_code_struct
+ {"fcmp.un", INST_TYPE_RD_R1_R2, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000200, OPCODE_MASK_H4, fcmp_un, arithmetic_inst },
+ {"flt", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000280, OPCODE_MASK_H4, flt, arithmetic_inst },
+ {"fint", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000300, OPCODE_MASK_H4, fint, arithmetic_inst },
+- {"fsqrt", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000380, OPCODE_MASK_H4, fsqrt, arithmetic_inst },
++ {"fsqrt", INST_TYPE_RD_R1, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x58000380, OPCODE_MASK_H4, microblaze_fsqrt, arithmetic_inst },
+ {"tget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C001000, OPCODE_MASK_H32, tget, anyware_inst },
+ {"tcget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C003000, OPCODE_MASK_H32, tcget, anyware_inst },
+ {"tnget", INST_TYPE_RD_RFSL, INST_NO_OFFSET, NO_DELAY_SLOT, IMMVAL_MASK_NON_SPECIAL, 0x6C005000, OPCODE_MASK_H32, tnget, anyware_inst },
+--- a/opcodes/microblaze-opcm.h
++++ b/opcodes/microblaze-opcm.h
+@@ -42,7 +42,8 @@ enum microblaze_instr
+ shr, sw, swr, swx, lbui, lhui, lwi,
+ sbi, shi, swi, msrset, msrclr, tuqula, mbi_fadd, frsub, mbi_fmul, mbi_fdiv,
+ fcmp_lt, fcmp_eq, fcmp_le, fcmp_gt, fcmp_ne, fcmp_ge, fcmp_un, flt,
+- fint, fsqrt,
++ /* 'fsqrt' is a glibc:math.h symbol. */
++ fint, microblaze_fsqrt,
+ tget, tcget, tnget, tncget, tput, tcput, tnput, tncput,
+ eget, ecget, neget, necget, eput, ecput, neput, necput,
+ teget, tecget, tneget, tnecget, teput, tecput, tneput, tnecput,
diff --git a/sys-devel/gdb/files/gdb-12.1-readline-8.2-build.patch b/sys-devel/gdb/files/gdb-12.1-readline-8.2-build.patch
new file mode 100644
index 000000000000..fad27ee4ca85
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-12.1-readline-8.2-build.patch
@@ -0,0 +1,29 @@
+https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=1add37b567a7dee39d99f37b37802034c3fce9c4
+https://bugs.gentoo.org/842252
+
+From: Andreas Schwab <schwab@linux-m68k.org>
+Date: Sun, 20 Mar 2022 14:01:54 +0100
+Subject: [PATCH] Add support for readline 8.2
+
+In readline 8.2 the type of rl_completer_word_break_characters changed to
+include const.
+--- a/gdb/completer.c
++++ b/gdb/completer.c
+@@ -36,7 +36,7 @@
+ calling a hook instead so we eliminate the CLI dependency. */
+ #include "gdbcmd.h"
+
+-/* Needed for rl_completer_word_break_characters() and for
++/* Needed for rl_completer_word_break_characters and for
+ rl_filename_completion_function. */
+ #include "readline/readline.h"
+
+@@ -2011,7 +2011,7 @@ gdb_completion_word_break_characters_throw ()
+ rl_basic_quote_characters = NULL;
+ }
+
+- return rl_completer_word_break_characters;
++ return (char *) rl_completer_word_break_characters;
+ }
+
+ char *