Browse Source

dubhe: binutils: Upgrade version to 2.41
Forked from Poky master branch with SRCREV change and patches.
Dropped 9a20fbe23f63d87e30b0291ae1dba863c0f5de31 and 768c89e306d0486acf8bc76cecef90436f6551b3 from Poky as the suffix "-crosssdk" is still needed in Kirkstone version.

Signed-off-by: weiheng.cheng <weiheng.cheng@starfivetech.com>

weiheng.cheng 4 months ago
parent
commit
8810aa9cd2
47 changed files with 413 additions and 1769 deletions
  1. 0 63
      recipes-devtools/binutils/binutils-2.39.inc
  2. 40 0
      recipes-devtools/binutils/binutils-2.41.inc
  3. 0 0
      recipes-devtools/binutils/binutils-cross-canadian_2.41.bb
  4. 2 0
      recipes-devtools/binutils/binutils-cross-testsuite_2.41.bb
  5. 0 0
      recipes-devtools/binutils/binutils-cross_2.41.bb
  6. 0 0
      recipes-devtools/binutils/binutils-crosssdk_2.41.bb
  7. 6 2
      recipes-devtools/binutils/binutils.inc
  8. 0 25
      recipes-devtools/binutils/binutils/0001-Automatic-date-update-in-version.in.patch
  9. 21 30
      recipes-devtools/binutils/binutils/0001-add-customer-pref-support.patch
  10. 5 5
      recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch
  11. 0 25
      recipes-devtools/binutils/binutils/0002-Automatic-date-update-in-version.in.patch
  12. 9 9
      recipes-devtools/binutils/binutils/0002-add-four-instruction-for-custom-CSRs.patch
  13. 2 2
      recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch
  14. 0 25
      recipes-devtools/binutils/binutils/0003-Automatic-date-update-in-version.in.patch
  15. 11 11
      recipes-devtools/binutils/binutils/0003-binutils-nativesdk-Search-for-alternative-ld.so.conf.patch
  16. 0 25
      recipes-devtools/binutils/binutils/0004-Automatic-date-update-in-version.in.patch
  17. 5 5
      recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch
  18. 0 25
      recipes-devtools/binutils/binutils/0005-Automatic-date-update-in-version.in.patch
  19. 2 2
      recipes-devtools/binutils/binutils/0005-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch
  20. 0 25
      recipes-devtools/binutils/binutils/0006-Automatic-date-update-in-version.in.patch
  21. 37 38
      recipes-devtools/binutils/binutils/0006-warn-for-uses-of-system-directories-when-cross-linki.patch
  22. 0 25
      recipes-devtools/binutils/binutils/0007-Automatic-date-update-in-version.in.patch
  23. 4 4
      recipes-devtools/binutils/binutils/0007-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch
  24. 0 25
      recipes-devtools/binutils/binutils/0008-Automatic-date-update-in-version.in.patch
  25. 121 120
      recipes-devtools/binutils/binutils/0008-Use-libtool-2.4.patch
  26. 0 25
      recipes-devtools/binutils/binutils/0009-Automatic-date-update-in-version.in.patch
  27. 1 1
      recipes-devtools/binutils/binutils/0009-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch
  28. 0 25
      recipes-devtools/binutils/binutils/0010-Automatic-date-update-in-version.in.patch
  29. 1 1
      recipes-devtools/binutils/binutils/0010-sync-with-OE-libtool-changes.patch
  30. 0 25
      recipes-devtools/binutils/binutils/0011-Automatic-date-update-in-version.in.patch
  31. 5 5
      recipes-devtools/binutils/binutils/0011-Check-for-clang-before-checking-gcc-version.patch
  32. 0 25
      recipes-devtools/binutils/binutils/0012-Automatic-date-update-in-version.in.patch
  33. 3 3
      recipes-devtools/binutils/binutils/0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch
  34. 0 25
      recipes-devtools/binutils/binutils/0013-Automatic-date-update-in-version.in.patch
  35. 0 36
      recipes-devtools/binutils/binutils/0013-CVE-2022-38533.patch
  36. 48 0
      recipes-devtools/binutils/binutils/0013-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch
  37. 0 25
      recipes-devtools/binutils/binutils/0014-Automatic-date-update-in-version.in.patch
  38. 0 350
      recipes-devtools/binutils/binutils/0014-CVE-2022-38128-1.patch
  39. 0 536
      recipes-devtools/binutils/binutils/0014-CVE-2022-38128-2.patch
  40. 0 95
      recipes-devtools/binutils/binutils/0014-CVE-2022-38128-3.patch
  41. 32 0
      recipes-devtools/binutils/binutils/0014-Remove-duplicate-pe-dll.o-entry-deom-targ_extra_ofil.patch
  42. 0 25
      recipes-devtools/binutils/binutils/0015-Automatic-date-update-in-version.in.patch
  43. 55 0
      recipes-devtools/binutils/binutils/0015-gprofng-Fix-build-with-64bit-file-offset-on-32bit-ma.patch
  44. 0 25
      recipes-devtools/binutils/binutils/0016-Automatic-date-update-in-version.in.patch
  45. 0 25
      recipes-devtools/binutils/binutils/0017-Automatic-date-update-in-version.in.patch
  46. 0 24
      recipes-devtools/binutils/binutils/0020-fix-a-merge-typo.patch
  47. 3 2
      recipes-devtools/binutils/binutils_2.41.bb

+ 0 - 63
recipes-devtools/binutils/binutils-2.39.inc

@@ -1,63 +0,0 @@
-LIC_FILES_CHKSUM="\
-    file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
-    file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
-    file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
-    file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
-    file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
-    file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
-    file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
-    file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
-    file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
-    "
-
-# When upgrading to 2.39, please make sure there is no trailing .0, so
-# that upstream version check can work correctly.
-PV = "2.39"
-CVE_VERSION = "2.39"
-SRCBRANCH ?= "binutils-2_39-branch"
-
-UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
-
-SRCREV ?= "f89058434f13382c85b8729464192bc7763d88a4"
-BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=${SRCBRANCH};protocol=git"
-SRC_URI = "\
-     ${BINUTILS_GIT_URI} \
-     file://0004-Point-scripts-location-to-libdir.patch \
-     file://0005-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
-     file://0006-warn-for-uses-of-system-directories-when-cross-linki.patch \
-     file://0007-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
-     file://0008-Use-libtool-2.4.patch \
-     file://0009-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
-     file://0010-sync-with-OE-libtool-changes.patch \
-     file://0011-Check-for-clang-before-checking-gcc-version.patch \
-     file://0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
-     file://0013-CVE-2022-38533.patch \
-     file://0014-CVE-2022-38128-1.patch \
-     file://0014-CVE-2022-38128-2.patch \
-     file://0014-CVE-2022-38128-3.patch \
-     file://0001-Automatic-date-update-in-version.in.patch \
-     file://0002-Automatic-date-update-in-version.in.patch \
-     file://0003-Automatic-date-update-in-version.in.patch \
-     file://0004-Automatic-date-update-in-version.in.patch \
-     file://0005-Automatic-date-update-in-version.in.patch \
-     file://0006-Automatic-date-update-in-version.in.patch \
-     file://0007-Automatic-date-update-in-version.in.patch \
-     file://0008-Automatic-date-update-in-version.in.patch \
-     file://0009-Automatic-date-update-in-version.in.patch \
-     file://0010-Automatic-date-update-in-version.in.patch \
-     file://0011-Automatic-date-update-in-version.in.patch \
-     file://0012-Automatic-date-update-in-version.in.patch \
-     file://0013-Automatic-date-update-in-version.in.patch \
-     file://0014-Automatic-date-update-in-version.in.patch \
-     file://0015-Automatic-date-update-in-version.in.patch \
-     file://0016-Automatic-date-update-in-version.in.patch \
-     file://0017-Automatic-date-update-in-version.in.patch \
-     file://0018-add-customer-pref-support.patch \
-     file://0019-add-four-instruction-for-custom-CSRs.patch \
-     file://0020-fix-a-merge-typo.patch \
-"
-S  = "${WORKDIR}/git"
-# Already in 2.39 branch
-# - https://sourceware.org/bugzilla/show_bug.cgi?id=29289
-# - https://sourceware.org/bugzilla/show_bug.cgi?id=29290
-CVE_CHECK_IGNORE += "CVE-2022-38126 CVE-2022-38127"

+ 40 - 0
recipes-devtools/binutils/binutils-2.41.inc

@@ -0,0 +1,40 @@
+LIC_FILES_CHKSUM="\
+    file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+    file://COPYING.LIB;md5=9f604d8a4f8e74f4f5140845a21b6674\
+    file://COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+    file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6\
+    file://gas/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+    file://include/COPYING;md5=59530bdf33659b29e73d4adb9f9f6552\
+    file://include/COPYING3;md5=d32239bcb673463ab874e80d47fae504\
+    file://libiberty/COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7\
+    file://bfd/COPYING;md5=d32239bcb673463ab874e80d47fae504\
+    "
+
+# When upgrading to 2.42, please make sure there is no trailing .0, so
+# that upstream version check can work correctly.
+PV = "2.41"
+CVE_VERSION = "2.41"
+SRCBRANCH ?= "binutils-2_41-branch"
+
+UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
+
+SRCREV ?= "6f5fa6dd5ae3fa5b894af63852650785e6325794"
+BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=${SRCBRANCH};protocol=https"
+SRC_URI = "\
+     ${BINUTILS_GIT_URI} \
+     file://0001-add-customer-pref-support.patch \
+     file://0002-add-four-instruction-for-custom-CSRs.patch \
+     file://0004-Point-scripts-location-to-libdir.patch \
+     file://0005-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch \
+     file://0006-warn-for-uses-of-system-directories-when-cross-linki.patch \
+     file://0007-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch \
+     file://0008-Use-libtool-2.4.patch \
+     file://0009-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch \
+     file://0010-sync-with-OE-libtool-changes.patch \
+     file://0011-Check-for-clang-before-checking-gcc-version.patch \
+     file://0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
+     file://0013-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \
+     file://0014-Remove-duplicate-pe-dll.o-entry-deom-targ_extra_ofil.patch \
+     file://0015-gprofng-Fix-build-with-64bit-file-offset-on-32bit-ma.patch \
+"
+S  = "${WORKDIR}/git"

+ 0 - 0
recipes-devtools/binutils/binutils-cross-canadian_2.39.bb → recipes-devtools/binutils/binutils-cross-canadian_2.41.bb


+ 2 - 0
recipes-devtools/binutils/binutils-cross-testsuite_2.39.bb → recipes-devtools/binutils/binutils-cross-testsuite_2.41.bb

@@ -47,6 +47,8 @@ python check_prepare() {
         content.append(d.expand('set CC "${TARGET_PREFIX}gcc --sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}"'))
         content.append(d.expand('set CXX "${TARGET_PREFIX}g++ --sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}"'))
         content.append(d.expand('set CFLAGS_FOR_TARGET "--sysroot=${STAGING_DIR_TARGET} ${TUNE_CCARGS}"'))
+        content.append(d.expand('set LD "${TARGET_PREFIX}ld ${TUNE_LDARGS}"'))
+        content.append(d.expand('set LDFLAGS_FOR_TARGET "${TUNE_LDARGS}"'))
 
         if suite == "ld" and d.getVar("TUNE_ARCH") == "mips64":
             # oe patches binutils to have the default mips64 abi as 64bit, but

+ 0 - 0
recipes-devtools/binutils/binutils-cross_2.39.bb → recipes-devtools/binutils/binutils-cross_2.41.bb


+ 0 - 0
recipes-devtools/binutils/binutils-crosssdk_2.39.bb → recipes-devtools/binutils/binutils-crosssdk_2.41.bb


+ 6 - 2
recipes-devtools/binutils/binutils.inc

@@ -33,6 +33,8 @@ FILES:${PN}-dev = " \
 	${libdir}/libctf-nobfd.so \
 	${libdir}/libopcodes.so"
 
+FILES:${PN}-staticdev += "${libdir}/gprofng/*.a"
+
 # Rather than duplicating multiple entries for these, make one
 # list and reuse it.
 
@@ -57,6 +59,7 @@ GPROFNG_ALTS:aarch64 = "${GPROFNGS}"
 LDGOLD_ALTS ?= "ld.gold dwp"
 LDGOLD_ALTS:riscv64 = ""
 LDGOLD_ALTS:riscv32 = ""
+LDGOLD_ALTS:loongarch64 = ""
 LDGOLD_ALTS:libc-glibc:mipsarch = ""
 
 USE_ALTERNATIVES_FOR = " \
@@ -95,6 +98,7 @@ EXTRA_OECONF = "--program-prefix=${TARGET_PREFIX} \
                 --disable-werror \
                 --enable-deterministic-archives \
                 --enable-plugins \
+                --enable-new-dtags \
                 --disable-gdb \
                 --disable-gdbserver \
                 --disable-libdecnumber \
@@ -198,6 +202,6 @@ ALTERNATIVE_PRIORITY = "100"
 ALTERNATIVE:${PN}:class-target = "${USE_ALTERNATIVES_FOR}"
 
 python () {
-    if bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', True, False, d) and bb.utils.contains_any('TARGET_ARCH', 'riscv32 riscv64', True, False, d):
-        bb.fatal("Gold linker does not _yet_ support RISC-V architecture please remove ld-is-gold from DISTRO_FEATURES")
+    if bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', True, False, d) and bb.utils.contains_any('TARGET_ARCH', 'riscv32 riscv64 loongarch64', True, False, d):
+        bb.fatal("Gold linker does not _yet_ support RISC-V and LoongArch architecture please remove ld-is-gold from DISTRO_FEATURES")
 }

+ 0 - 25
recipes-devtools/binutils/binutils/0001-Automatic-date-update-in-version.in.patch

@@ -1,25 +0,0 @@
-From 08aa4430eacd272a320067a23cffd81fac492bae Mon Sep 17 00:00:00 2001
-From: GDB Administrator <gdbadmin@sourceware.org>
-Date: Sat, 20 Aug 2022 00:00:44 +0000
-Subject: [PATCH 01/20] Automatic date update in version.in
-
----
- bfd/version.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bfd/version.h b/bfd/version.h
-index 44451de6b7..c5c3ce4fd5 100644
---- a/bfd/version.h
-+++ b/bfd/version.h
-@@ -16,7 +16,7 @@
- 
-    In releases, the date is not included in either version strings or
-    sonames.  */
--#define BFD_VERSION_DATE 20220819
-+#define BFD_VERSION_DATE 20220820
- #define BFD_VERSION @bfd_version@
- #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
- #define REPORT_BUGS_TO @report_bugs_to@
--- 
-2.25.1
-

+ 21 - 30
recipes-devtools/binutils/binutils/0018-add-customer-pref-support.patch → recipes-devtools/binutils/binutils/0001-add-customer-pref-support.patch

@@ -1,21 +1,21 @@
-From 3514789d54fb3515547a29405596d4f2cddd4585 Mon Sep 17 00:00:00 2001
+From ed52ba73f555c0a103e10f18127864e390c98443 Mon Sep 17 00:00:00 2001
 From: "max.ma" <max.ma@starfivetech.com>
 Date: Mon, 5 Sep 2022 01:17:31 -0700
-Subject: [PATCH 18/20] add customer pref support
+Subject: [PATCH 1/2] add customer pref support
 
 ---
  gas/config/tc-riscv.c      | 44 +++++++++++++++++++++++++++++++++++++-
- include/opcode/riscv-opc.h |  3 +++
+ include/opcode/riscv-opc.h |  1 +
  include/opcode/riscv.h     |  9 ++++++++
  opcodes/riscv-dis.c        | 10 +++++++++
  opcodes/riscv-opc.c        |  1 +
- 5 files changed, 66 insertions(+), 1 deletion(-)
+ 5 files changed, 64 insertions(+), 1 deletion(-)
 
 diff --git a/gas/config/tc-riscv.c b/gas/config/tc-riscv.c
-index a0e8456a0d..934eddc811 100644
+index 297bb9b2a81..e995cbf6417 100644
 --- a/gas/config/tc-riscv.c
 +++ b/gas/config/tc-riscv.c
-@@ -1201,7 +1201,9 @@ validate_riscv_insn (const struct riscv_opcode *opc, int length)
+@@ -1354,7 +1354,9 @@ validate_riscv_insn (const struct riscv_opcode *opc, int length)
  	case ')': break;
  	case '<': USE_BITS (OP_MASK_SHAMTW, OP_SH_SHAMTW); break;
  	case '>': USE_BITS (OP_MASK_SHAMT, OP_SH_SHAMT); break;
@@ -24,9 +24,9 @@ index a0e8456a0d..934eddc811 100644
 +  case '+': used_bits |= ENCODE_PREF_SIMM (-1U); break;
 +  case 'A': break; /* Macro operand, must be symbol.  */
  	case 'B': break; /* Macro operand, must be symbol or constant.  */
+ 	case 'c': break; /* Macro operand, must be symbol or constant.  */
  	case 'I': break; /* Macro operand, must be constant.  */
- 	case 'D': /* RD, floating point.  */
-@@ -1600,6 +1602,27 @@ check_absolute_expr (struct riscv_cl_insn *ip, expressionS *ex,
+@@ -1803,6 +1805,27 @@ check_absolute_expr (struct riscv_cl_insn *ip, expressionS *ex,
    normalize_constant_expr (ex);
  }
  
@@ -54,8 +54,8 @@ index a0e8456a0d..934eddc811 100644
  static symbolS *
  make_internal_label (void)
  {
-@@ -2906,6 +2929,25 @@ riscv_ip (char *str, struct riscv_cl_insn *ip, expressionS *imm_expr,
- 	      asarg = expr_end;
+@@ -3165,6 +3188,25 @@ riscv_ip (char *str, struct riscv_cl_insn *ip, expressionS *imm_expr,
+ 	      asarg = expr_parse_end;
  	      continue;
  
 +      case '#':
@@ -81,7 +81,7 @@ index a0e8456a0d..934eddc811 100644
  	      insn_with_csr = true;
  	      explicit_priv_attr = true;
 diff --git a/include/opcode/riscv-opc.h b/include/opcode/riscv-opc.h
-index 88b8d7ff59..6f08c72c88 100644
+index 90f44153750..07d5a11f733 100644
 --- a/include/opcode/riscv-opc.h
 +++ b/include/opcode/riscv-opc.h
 @@ -255,6 +255,7 @@
@@ -92,20 +92,11 @@ index 88b8d7ff59..6f08c72c88 100644
  #define MATCH_CSRRW 0x1073
  #define MASK_CSRRW  0x707f
  #define MATCH_CSRRS 0x2073
-@@ -2852,6 +2853,8 @@ DECLARE_INSN(cbo_clean, MATCH_CBO_CLEAN, MASK_CBO_CLEAN);
- DECLARE_INSN(cbo_flush, MATCH_CBO_FLUSH, MASK_CBO_FLUSH);
- DECLARE_INSN(cbo_inval, MATCH_CBO_INVAL, MASK_CBO_INVAL);
- DECLARE_INSN(cbo_zero, MATCH_CBO_ZERO, MASK_CBO_ZERO);
-+DECLARE_INSN(cbo_zero, MATCH_CBO_ZERO, MASK_CBO_ZERO);
-+
- #endif /* DECLARE_INSN */
- #ifdef DECLARE_CSR
- /* Unprivileged Counter/Timers CSRs.  */
 diff --git a/include/opcode/riscv.h b/include/opcode/riscv.h
-index b115e338a0..4afb16c092 100644
+index d859f44fc92..40ae251ae3c 100644
 --- a/include/opcode/riscv.h
 +++ b/include/opcode/riscv.h
-@@ -156,6 +156,10 @@ static const char * const riscv_pred_succ[16] =
+@@ -153,6 +153,10 @@ static inline unsigned int riscv_insn_length (insn_t insn)
    (RV_X(x, 0, 10) << 20)
  #define ENCODE_RVV_VC_IMM(x) \
    (RV_X(x, 0, 11) << 20)
@@ -113,10 +104,10 @@ index b115e338a0..4afb16c092 100644
 +  (RV_X(x, 0, 4) << 20)
 +#define ENCODE_PREF_SIMM(x) \
 +  (RV_X(x, 0, 8) << 24)
+ #define ENCODE_RVV_VI_UIMM6(x) \
+   (RV_X(x, 0, 5) << 15 | RV_X(x, 5, 1) << 26)
  
- #define VALID_ITYPE_IMM(x) (EXTRACT_ITYPE_IMM(ENCODE_ITYPE_IMM(x)) == (x))
- #define VALID_STYPE_IMM(x) (EXTRACT_STYPE_IMM(ENCODE_STYPE_IMM(x)) == (x))
-@@ -256,6 +260,11 @@ static const char * const riscv_pred_succ[16] =
+@@ -255,6 +259,11 @@ static inline unsigned int riscv_insn_length (insn_t insn)
  #define OP_MASK_FUNCT2		0x3
  #define OP_SH_FUNCT2		25
  
@@ -129,11 +120,11 @@ index b115e338a0..4afb16c092 100644
  
  #define OP_MASK_OP2		0x3
 diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c
-index 164fd209db..9a9660cf21 100644
+index 827d9b67437..3bb530a632c 100644
 --- a/opcodes/riscv-dis.c
 +++ b/opcodes/riscv-dis.c
-@@ -490,6 +490,16 @@ print_insn_args (const char *oparg, insn_t l, bfd_vma pc, disassemble_info *info
- 		 (int)EXTRACT_OPERAND (SHAMTW, l));
+@@ -519,6 +519,16 @@ print_insn_args (const char *oparg, insn_t l, bfd_vma pc, disassemble_info *info
+ 		 (unsigned)EXTRACT_OPERAND (SHAMTW, l));
  	  break;
  
 +	case '#':
@@ -150,10 +141,10 @@ index 164fd209db..9a9660cf21 100644
  	case 'U':
  	  print (info->stream, dis_style_register, "%s", riscv_fpr_names[rs1]);
 diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c
-index 2f9945aa93..5632408ebd 100644
+index 533e3f4a079..985e2d1b275 100644
 --- a/opcodes/riscv-opc.c
 +++ b/opcodes/riscv-opc.c
-@@ -401,6 +401,7 @@ const struct riscv_opcode riscv_opcodes[] =
+@@ -470,6 +470,7 @@ const struct riscv_opcode riscv_opcodes[] =
  {"snez",        0, INSN_CLASS_I, "d,t",       MATCH_SLTU, MASK_SLTU|MASK_RS1, match_opcode, INSN_ALIAS },
  {"sltz",        0, INSN_CLASS_I, "d,s",       MATCH_SLT, MASK_SLT|MASK_RS2, match_opcode, INSN_ALIAS },
  {"sgtz",        0, INSN_CLASS_I, "d,t",       MATCH_SLT, MASK_SLT|MASK_RS1, match_opcode, INSN_ALIAS },

+ 5 - 5
recipes-devtools/binutils/binutils/0001-binutils-crosssdk-Generate-relocatable-SDKs.patch

@@ -1,4 +1,4 @@
-From a0ac147aec127c66c9e38292faa50bb56d3c2a19 Mon Sep 17 00:00:00 2001
+From 95e23fba624c90d0e62c1adaf2bcc4f3cd3175c0 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:58:54 +0000
 Subject: [PATCH] binutils-crosssdk: Generate relocatable SDKs
@@ -21,10 +21,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
  3 files changed, 6 insertions(+), 3 deletions(-)
 
 diff --git a/gold/layout.cc b/gold/layout.cc
-index 3efe8d98ae9..9cc389664a6 100644
+index b94855f8662..51f2d74d79d 100644
 --- a/gold/layout.cc
 +++ b/gold/layout.cc
-@@ -5033,7 +5033,7 @@ Layout::create_interp(const Target* target)
+@@ -5102,7 +5102,7 @@ Layout::create_interp(const Target* target)
        gold_assert(interp != NULL);
      }
  
@@ -34,7 +34,7 @@ index 3efe8d98ae9..9cc389664a6 100644
    Output_section_data* odata = new Output_data_const(interp, len, 1);
  
 diff --git a/ld/genscripts.sh b/ld/genscripts.sh
-index 278f212bdad..0c52ebee4d0 100755
+index 382bd07ffe2..9fbd0c4cb8a 100755
 --- a/ld/genscripts.sh
 +++ b/ld/genscripts.sh
 @@ -304,6 +304,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
@@ -59,7 +59,7 @@ index 278f212bdad..0c52ebee4d0 100755
  DATA_ALIGNMENT=${DATA_ALIGNMENT_}
  RELOCATING=" "
 diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
-index bf2268bb0ad..b1811ef130f 100644
+index 1e3c5aa8504..b8d1977b3f0 100644
 --- a/ld/scripttempl/elf.sc
 +++ b/ld/scripttempl/elf.sc
 @@ -148,8 +148,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then

+ 0 - 25
recipes-devtools/binutils/binutils/0002-Automatic-date-update-in-version.in.patch

@@ -1,25 +0,0 @@
-From 8b5c16b504a5af8508b3fc72ae7b0edcb9857be8 Mon Sep 17 00:00:00 2001
-From: GDB Administrator <gdbadmin@sourceware.org>
-Date: Sun, 21 Aug 2022 00:05:27 +0000
-Subject: [PATCH 02/20] Automatic date update in version.in
-
----
- bfd/version.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bfd/version.h b/bfd/version.h
-index c5c3ce4fd5..d15b543bdb 100644
---- a/bfd/version.h
-+++ b/bfd/version.h
-@@ -16,7 +16,7 @@
- 
-    In releases, the date is not included in either version strings or
-    sonames.  */
--#define BFD_VERSION_DATE 20220820
-+#define BFD_VERSION_DATE 20220821
- #define BFD_VERSION @bfd_version@
- #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
- #define REPORT_BUGS_TO @report_bugs_to@
--- 
-2.25.1
-

+ 9 - 9
recipes-devtools/binutils/binutils/0019-add-four-instruction-for-custom-CSRs.patch → recipes-devtools/binutils/binutils/0002-add-four-instruction-for-custom-CSRs.patch

@@ -1,7 +1,7 @@
-From fdda53d94ccaa445c01ead385b85a2b4a5819f11 Mon Sep 17 00:00:00 2001
+From a0b29d1a6a89927ae7b5637ff47a9ee9e6ec49ec Mon Sep 17 00:00:00 2001
 From: "yilun.xie" <yilun.xie@starfivetech.com>
 Date: Tue, 6 Sep 2022 01:34:07 -0700
-Subject: [PATCH 19/20] add four instruction for custom CSRs
+Subject: [PATCH 2/2] add four instruction for custom CSRs
 
 ---
  include/opcode/riscv-opc.h | 16 ++++++++++++++++
@@ -9,7 +9,7 @@ Subject: [PATCH 19/20] add four instruction for custom CSRs
  2 files changed, 22 insertions(+)
 
 diff --git a/include/opcode/riscv-opc.h b/include/opcode/riscv-opc.h
-index 6f08c72c88..b130357392 100644
+index 07d5a11f733..c1c46dd3371 100644
 --- a/include/opcode/riscv-opc.h
 +++ b/include/opcode/riscv-opc.h
 @@ -256,6 +256,16 @@
@@ -29,7 +29,7 @@ index 6f08c72c88..b130357392 100644
  #define MATCH_CSRRW 0x1073
  #define MASK_CSRRW  0x707f
  #define MATCH_CSRRS 0x2073
-@@ -2637,6 +2647,12 @@ DECLARE_INSN(dret, MATCH_DRET, MASK_DRET)
+@@ -3065,6 +3075,12 @@ DECLARE_INSN(dret, MATCH_DRET, MASK_DRET)
  DECLARE_INSN(sfence_vm, MATCH_SFENCE_VM, MASK_SFENCE_VM)
  DECLARE_INSN(sfence_vma, MATCH_SFENCE_VMA, MASK_SFENCE_VMA)
  DECLARE_INSN(wfi, MATCH_WFI, MASK_WFI)
@@ -43,10 +43,10 @@ index 6f08c72c88..b130357392 100644
  DECLARE_INSN(csrrs, MATCH_CSRRS, MASK_CSRRS)
  DECLARE_INSN(csrrc, MATCH_CSRRC, MASK_CSRRC)
 diff --git a/opcodes/riscv-opc.c b/opcodes/riscv-opc.c
-index 5632408ebd..380677e317 100644
+index 985e2d1b275..787aa36b819 100644
 --- a/opcodes/riscv-opc.c
 +++ b/opcodes/riscv-opc.c
-@@ -884,6 +884,12 @@ const struct riscv_opcode riscv_opcodes[] =
+@@ -952,6 +952,12 @@ const struct riscv_opcode riscv_opcodes[] =
  {"c.fswsp",   32, INSN_CLASS_F_AND_C, "CT,CM(Cc)", MATCH_C_FSWSP, MASK_C_FSWSP, match_opcode, INSN_DREF|INSN_4_BYTE },
  {"c.fsw",     32, INSN_CLASS_F_AND_C, "CD,Ck(Cs)", MATCH_C_FSW, MASK_C_FSW, match_opcode, INSN_DREF|INSN_4_BYTE },
  
@@ -56,9 +56,9 @@ index 5632408ebd..380677e317 100644
 +{"cflush.d.l2",   0, INSN_CLASS_ZICSR,   "s",   MATCH_CFLUSH_D_L2, MASK_CFLUSH_D_L2, match_opcode, 0 },
 +{"cdiscard.d.l2", 0, INSN_CLASS_ZICSR,   "s",   MATCH_CDISCARD_D_L2, MASK_CDISCARD_D_L2, match_opcode, 0 },
 +
- /* Supervisor instructions.  */
- {"csrr",       0, INSN_CLASS_ZICSR,"d,E",      MATCH_CSRRS, MASK_CSRRS|MASK_RS1, match_opcode, INSN_ALIAS },
- {"csrwi",      0, INSN_CLASS_ZICSR,"E,Z",      MATCH_CSRRWI, MASK_CSRRWI|MASK_RD, match_opcode, INSN_ALIAS },
+ /* Zicbom and Zicboz instructions.  */
+ {"cbo.clean",  0, INSN_CLASS_ZICBOM, "0(s)", MATCH_CBO_CLEAN, MASK_CBO_CLEAN, match_opcode, 0 },
+ {"cbo.flush",  0, INSN_CLASS_ZICBOM, "0(s)", MATCH_CBO_FLUSH, MASK_CBO_FLUSH, match_opcode, 0 },
 -- 
 2.25.1
 

+ 2 - 2
recipes-devtools/binutils/binutils/0002-binutils-cross-Do-not-generate-linker-script-directo.patch

@@ -1,4 +1,4 @@
-From fd7065bfd20364679e3c3f329b19059bbc51ab02 Mon Sep 17 00:00:00 2001
+From 2b3017e7dab4d929d3ab664c5e6f94226b0a6d31 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 6 Mar 2017 23:37:05 -0800
 Subject: [PATCH] binutils-cross: Do not generate linker script directories
@@ -22,7 +22,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
  1 file changed, 25 deletions(-)
 
 diff --git a/ld/genscripts.sh b/ld/genscripts.sh
-index 0c52ebee4d0..1acbe66bd2e 100755
+index 9fbd0c4cb8a..6be07038c9b 100755
 --- a/ld/genscripts.sh
 +++ b/ld/genscripts.sh
 @@ -235,31 +235,6 @@ append_to_lib_path()

+ 0 - 25
recipes-devtools/binutils/binutils/0003-Automatic-date-update-in-version.in.patch

@@ -1,25 +0,0 @@
-From f03072f6f2eacf2368f85fc6a18942a189715ce4 Mon Sep 17 00:00:00 2001
-From: GDB Administrator <gdbadmin@sourceware.org>
-Date: Mon, 22 Aug 2022 00:00:37 +0000
-Subject: [PATCH 03/20] Automatic date update in version.in
-
----
- bfd/version.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bfd/version.h b/bfd/version.h
-index d15b543bdb..9f1d2bf9a7 100644
---- a/bfd/version.h
-+++ b/bfd/version.h
-@@ -16,7 +16,7 @@
- 
-    In releases, the date is not included in either version strings or
-    sonames.  */
--#define BFD_VERSION_DATE 20220821
-+#define BFD_VERSION_DATE 20220822
- #define BFD_VERSION @bfd_version@
- #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
- #define REPORT_BUGS_TO @report_bugs_to@
--- 
-2.25.1
-

+ 11 - 11
recipes-devtools/binutils/binutils/0003-binutils-nativesdk-Search-for-alternative-ld.so.conf.patch

@@ -1,4 +1,4 @@
-From 67735b3647f98ce0f010ff8b4f9b5c5da576cb17 Mon Sep 17 00:00:00 2001
+From c00ead7264dc1335cb43222cb742b95614666be8 Mon Sep 17 00:00:00 2001
 From: Richard Purdie <richard.purdie@linuxfoundation.org>
 Date: Wed, 19 Feb 2020 09:51:16 -0800
 Subject: [PATCH] binutils-nativesdk: Search for alternative ld.so.conf in SDK
@@ -29,7 +29,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
  5 files changed, 7 insertions(+), 3 deletions(-)
 
 diff --git a/ld/Makefile.am b/ld/Makefile.am
-index d31021c13e2..29782385ca4 100644
+index c3adbb0ccad..ce0f7e7f85d 100644
 --- a/ld/Makefile.am
 +++ b/ld/Makefile.am
 @@ -42,7 +42,8 @@ ZLIBINC = @zlibinc@
@@ -41,12 +41,12 @@ index d31021c13e2..29782385ca4 100644
 +           -DSYSCONFDIR="\"$(sysconfdir)\""
  WARN_CFLAGS = @WARN_CFLAGS@
  NO_WERROR = @NO_WERROR@
- AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) $(JANSSON_CFLAGS)
+ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) $(JANSSON_CFLAGS) $(ZSTD_CFLAGS)
 diff --git a/ld/Makefile.in b/ld/Makefile.in
-index ee0c98f65b0..04ee68a2c67 100644
+index d1a56026437..9d86aed12c6 100644
 --- a/ld/Makefile.in
 +++ b/ld/Makefile.in
-@@ -562,7 +562,8 @@ ZLIB = @zlibdir@ -lz
+@@ -566,7 +566,8 @@ ZLIB = @zlibdir@ -lz
  ZLIBINC = @zlibinc@
  ELF_CLFAGS = -DELF_LIST_OPTIONS=@elf_list_options@ \
  	   -DELF_SHLIB_LIST_OPTIONS=@elf_shlib_list_options@ \
@@ -54,10 +54,10 @@ index ee0c98f65b0..04ee68a2c67 100644
 +	   -DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@ \
 +           -DSYSCONFDIR="\"$(sysconfdir)\""
  
- AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) $(JANSSON_CFLAGS)
+ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) $(JANSSON_CFLAGS) $(ZSTD_CFLAGS)
  
 diff --git a/ld/ldelf.c b/ld/ldelf.c
-index bfa0d54753a..0d61a3209ec 100644
+index f9a6819366f..1519f8ac4e5 100644
 --- a/ld/ldelf.c
 +++ b/ld/ldelf.c
 @@ -936,7 +936,7 @@ ldelf_check_ld_so_conf (const struct bfd_link_needed_list *l, int force,
@@ -65,15 +65,15 @@ index bfa0d54753a..0d61a3209ec 100644
        info.path = NULL;
        info.len = info.alloc = 0;
 -      tmppath = concat (ld_sysroot, prefix, "/etc/ld.so.conf",
-+      tmppath = concat (ld_sysconfdir, "/etc/ld.so.conf",
++      tmppath = concat (ld_sysconfdir, "/ld.so.conf",
  			(const char *) NULL);
        if (!ldelf_parse_ld_so_conf (&info, tmppath))
  	{
 diff --git a/ld/ldmain.c b/ld/ldmain.c
-index ea72b14a301..1ae90a77749 100644
+index 06ac2c64fa8..5c38e8cd313 100644
 --- a/ld/ldmain.c
 +++ b/ld/ldmain.c
-@@ -70,6 +70,7 @@ char *program_name;
+@@ -69,6 +69,7 @@ char *program_name;
  
  /* The prefix for system library directories.  */
  const char *ld_sysroot;
@@ -82,7 +82,7 @@ index ea72b14a301..1ae90a77749 100644
  /* The canonical representation of ld_sysroot.  */
  char *ld_canon_sysroot;
 diff --git a/ld/ldmain.h b/ld/ldmain.h
-index f6d05a02f59..e60292cd522 100644
+index dda124b96e8..ba06a7d7be2 100644
 --- a/ld/ldmain.h
 +++ b/ld/ldmain.h
 @@ -23,6 +23,7 @@

+ 0 - 25
recipes-devtools/binutils/binutils/0004-Automatic-date-update-in-version.in.patch

@@ -1,25 +0,0 @@
-From 97cc478a8008a3ade822403044bb2732494daf48 Mon Sep 17 00:00:00 2001
-From: GDB Administrator <gdbadmin@sourceware.org>
-Date: Tue, 23 Aug 2022 00:00:43 +0000
-Subject: [PATCH 04/20] Automatic date update in version.in
-
----
- bfd/version.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bfd/version.h b/bfd/version.h
-index 9f1d2bf9a7..bdaafe0fc7 100644
---- a/bfd/version.h
-+++ b/bfd/version.h
-@@ -16,7 +16,7 @@
- 
-    In releases, the date is not included in either version strings or
-    sonames.  */
--#define BFD_VERSION_DATE 20220822
-+#define BFD_VERSION_DATE 20220823
- #define BFD_VERSION @bfd_version@
- #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
- #define REPORT_BUGS_TO @report_bugs_to@
--- 
-2.25.1
-

+ 5 - 5
recipes-devtools/binutils/binutils/0004-Point-scripts-location-to-libdir.patch

@@ -1,4 +1,4 @@
-From 2158e5bd4c6ea4db89e33d46ef25428e37bfc3a6 Mon Sep 17 00:00:00 2001
+From d2d1281b0b76f96c64a2043772c52c85f58994d5 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:09:58 +0000
 Subject: [PATCH] Point scripts location to libdir
@@ -12,10 +12,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/ld/Makefile.am b/ld/Makefile.am
-index 29782385ca4..062e6b6814b 100644
+index ce0f7e7f85d..2e36ab4efc4 100644
 --- a/ld/Makefile.am
 +++ b/ld/Makefile.am
-@@ -51,7 +51,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) $(JANSSON_CFLAGS)
+@@ -51,7 +51,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) $(JANSSON_CFLAGS) $(ZSTD_CFLAGS)
  # We put the scripts in the directory $(scriptdir)/ldscripts.
  # We can't put the scripts in $(datadir) because the SEARCH_DIR
  # directives need to be different for native and cross linkers.
@@ -25,10 +25,10 @@ index 29782385ca4..062e6b6814b 100644
  EMUL = @EMUL@
  EMULATION_OFILES = @EMULATION_OFILES@
 diff --git a/ld/Makefile.in b/ld/Makefile.in
-index 04ee68a2c67..782d4017a60 100644
+index 9d86aed12c6..c21c554e432 100644
 --- a/ld/Makefile.in
 +++ b/ld/Makefile.in
-@@ -570,7 +570,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) $(JANSSON_CFLAGS)
+@@ -574,7 +574,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) $(JANSSON_CFLAGS) $(ZSTD_CFLAGS)
  # We put the scripts in the directory $(scriptdir)/ldscripts.
  # We can't put the scripts in $(datadir) because the SEARCH_DIR
  # directives need to be different for native and cross linkers.

+ 0 - 25
recipes-devtools/binutils/binutils/0005-Automatic-date-update-in-version.in.patch

@@ -1,25 +0,0 @@
-From 4301cb3b83adcd7d43a677effd75d606ae698270 Mon Sep 17 00:00:00 2001
-From: GDB Administrator <gdbadmin@sourceware.org>
-Date: Wed, 24 Aug 2022 00:00:44 +0000
-Subject: [PATCH 05/20] Automatic date update in version.in
-
----
- bfd/version.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bfd/version.h b/bfd/version.h
-index bdaafe0fc7..f8f1ae262a 100644
---- a/bfd/version.h
-+++ b/bfd/version.h
-@@ -16,7 +16,7 @@
- 
-    In releases, the date is not included in either version strings or
-    sonames.  */
--#define BFD_VERSION_DATE 20220823
-+#define BFD_VERSION_DATE 20220824
- #define BFD_VERSION @bfd_version@
- #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
- #define REPORT_BUGS_TO @report_bugs_to@
--- 
-2.25.1
-

+ 2 - 2
recipes-devtools/binutils/binutils/0005-don-t-let-the-distro-compiler-point-to-the-wrong-ins.patch

@@ -1,4 +1,4 @@
-From e74d765a1a95253c9247228bd7ccbcabecdd8f7e Mon Sep 17 00:00:00 2001
+From 5564cdf1433255a00acb427fb5b0656b772b2651 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:39:01 +0000
 Subject: [PATCH] don't let the distro compiler point to the wrong installation
@@ -17,7 +17,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
-index abef3c4601b..880c8826482 100644
+index f9fbba23e2c..93495e45d6f 100644
 --- a/libiberty/Makefile.in
 +++ b/libiberty/Makefile.in
 @@ -385,7 +385,8 @@ install-strip: install

+ 0 - 25
recipes-devtools/binutils/binutils/0006-Automatic-date-update-in-version.in.patch

@@ -1,25 +0,0 @@
-From ab2cad361d2d6f809065ac6a05b53223e061eeda Mon Sep 17 00:00:00 2001
-From: GDB Administrator <gdbadmin@sourceware.org>
-Date: Thu, 25 Aug 2022 00:00:44 +0000
-Subject: [PATCH 06/20] Automatic date update in version.in
-
----
- bfd/version.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bfd/version.h b/bfd/version.h
-index f8f1ae262a..2e0b0917c1 100644
---- a/bfd/version.h
-+++ b/bfd/version.h
-@@ -16,7 +16,7 @@
- 
-    In releases, the date is not included in either version strings or
-    sonames.  */
--#define BFD_VERSION_DATE 20220824
-+#define BFD_VERSION_DATE 20220825
- #define BFD_VERSION @bfd_version@
- #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
- #define REPORT_BUGS_TO @report_bugs_to@
--- 
-2.25.1
-

+ 37 - 38
recipes-devtools/binutils/binutils/0006-warn-for-uses-of-system-directories-when-cross-linki.patch

@@ -1,4 +1,4 @@
-From 2c43b1357db6b09d1645704afd3f45be6de0cf4d Mon Sep 17 00:00:00 2001
+From 41b09c6a9d78a31db0f3c70d27c05475292bde7e Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Fri, 15 Jan 2016 06:31:09 +0000
 Subject: [PATCH] warn for uses of system directories when cross linking
@@ -59,14 +59,14 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
  ld/ldfile.c     | 17 +++++++++++++++++
  ld/ldlex.h      |  2 ++
  ld/ldmain.c     |  6 ++++--
- ld/lexsup.c     | 16 ++++++++++++++++
- 9 files changed, 88 insertions(+), 2 deletions(-)
+ ld/lexsup.c     | 15 +++++++++++++++
+ 9 files changed, 87 insertions(+), 2 deletions(-)
 
 diff --git a/ld/config.in b/ld/config.in
-index d4c1fc420b5..1aece0b2c29 100644
+index ad0dc6a106c..d21edaddce7 100644
 --- a/ld/config.in
 +++ b/ld/config.in
-@@ -55,6 +55,9 @@
+@@ -58,6 +58,9 @@
     language is requested. */
  #undef ENABLE_NLS
  
@@ -77,10 +77,10 @@ index d4c1fc420b5..1aece0b2c29 100644
  #undef EXTRA_SHLIB_EXTENSION
  
 diff --git a/ld/configure b/ld/configure
-index e58fb7f3a35..d0a467ac101 100755
+index 1503936432f..29896853a90 100755
 --- a/ld/configure
 +++ b/ld/configure
-@@ -836,6 +836,7 @@ with_lib_path
+@@ -839,6 +839,7 @@ with_lib_path
  enable_targets
  enable_64_bit_bfd
  with_sysroot
@@ -88,7 +88,7 @@ index e58fb7f3a35..d0a467ac101 100755
  enable_gold
  enable_got
  enable_compressed_debug_sections
-@@ -1514,6 +1515,8 @@ Optional Features:
+@@ -1521,6 +1522,8 @@ Optional Features:
    --enable-checking       enable run-time checks
    --enable-targets        alternative target configurations
    --enable-64-bit-bfd     64-bit support (on hosts with narrower word sizes)
@@ -97,7 +97,7 @@ index e58fb7f3a35..d0a467ac101 100755
    --enable-gold[=ARG]     build gold [ARG={default,yes,no}]
    --enable-got=<type>     GOT handling scheme (target, single, negative,
                            multigot)
-@@ -15349,6 +15352,19 @@ fi
+@@ -15483,6 +15486,19 @@ fi
  
  
  
@@ -118,10 +118,10 @@ index e58fb7f3a35..d0a467ac101 100755
  if test "${enable_gold+set}" = set; then :
    enableval=$enable_gold; case "${enableval}" in
 diff --git a/ld/configure.ac b/ld/configure.ac
-index 4331d6b1302..e2976bc2926 100644
+index 77edac3258c..a74dac63038 100644
 --- a/ld/configure.ac
 +++ b/ld/configure.ac
-@@ -102,6 +102,16 @@ AC_SUBST(use_sysroot)
+@@ -103,6 +103,16 @@ AC_SUBST(use_sysroot)
  AC_SUBST(TARGET_SYSTEM_ROOT)
  AC_SUBST(TARGET_SYSTEM_ROOT_DEFINE)
  
@@ -139,10 +139,10 @@ index 4331d6b1302..e2976bc2926 100644
  dnl "install_as_default" is set to false if gold is the default linker.
  dnl "installed_linker" is the installed BFD linker name.
 diff --git a/ld/ld.h b/ld/ld.h
-index f3086bf30de..db5064243c7 100644
+index a0f8a15c7a9..e3db345f3a5 100644
 --- a/ld/ld.h
 +++ b/ld/ld.h
-@@ -162,6 +162,14 @@ typedef struct
+@@ -163,6 +163,14 @@ typedef struct
       in the linker script.  */
    bool force_group_allocation;
  
@@ -158,10 +158,10 @@ index f3086bf30de..db5064243c7 100644
    enum endian_enum endian;
  
 diff --git a/ld/ld.texi b/ld/ld.texi
-index eabbec8faa9..c4680e4947e 100644
+index aa8b1aa86eb..9bc4bc28823 100644
 --- a/ld/ld.texi
 +++ b/ld/ld.texi
-@@ -2947,6 +2947,18 @@ creation of the metadata note, if one had been enabled by an earlier
+@@ -3059,6 +3059,18 @@ creation of the metadata note, if one had been enabled by an earlier
  occurrence of the --package-metdata option.
  If the linker has been built with libjansson, then the JSON string
  will be validated.
@@ -181,10 +181,10 @@ index eabbec8faa9..c4680e4947e 100644
  
  @c man end
 diff --git a/ld/ldfile.c b/ld/ldfile.c
-index 731ae5f7aed..dd8f03fd960 100644
+index df7c9cbd65e..0c965593225 100644
 --- a/ld/ldfile.c
 +++ b/ld/ldfile.c
-@@ -117,6 +117,23 @@ ldfile_add_library_path (const char *name, bool cmdline)
+@@ -327,6 +327,23 @@ ldfile_add_library_path (const char *name, bool cmdline)
      new_dirs->name = concat (ld_sysroot, name + strlen ("$SYSROOT"), (const char *) NULL);
    else
      new_dirs->name = xstrdup (name);
@@ -209,23 +209,23 @@ index 731ae5f7aed..dd8f03fd960 100644
  
  /* Try to open a BFD for a lang_input_statement.  */
 diff --git a/ld/ldlex.h b/ld/ldlex.h
-index 57ade1f754b..64007ff8684 100644
+index 87cac02141d..d1a478fb827 100644
 --- a/ld/ldlex.h
 +++ b/ld/ldlex.h
-@@ -168,6 +168,8 @@ enum option_values
-   OPTION_NO_WARN_EXECSTACK,
-   OPTION_WARN_RWX_SEGMENTS,
-   OPTION_NO_WARN_RWX_SEGMENTS,
+@@ -147,6 +147,8 @@ enum option_values
+   OPTION_PLUGIN,
+   OPTION_PLUGIN_OPT,
+ #endif /* BFD_SUPPORTS_PLUGINS */
 +  OPTION_NO_POISON_SYSTEM_DIRECTORIES,
 +  OPTION_ERROR_POISON_SYSTEM_DIRECTORIES,
- };
- 
- /* The initial parser states.  */
+   OPTION_DEFAULT_SCRIPT,
+   OPTION_PRINT_OUTPUT_FORMAT,
+   OPTION_PRINT_SYSROOT,
 diff --git a/ld/ldmain.c b/ld/ldmain.c
-index 1ae90a77749..f40750fd816 100644
+index 5c38e8cd313..04eed320aca 100644
 --- a/ld/ldmain.c
 +++ b/ld/ldmain.c
-@@ -322,6 +322,8 @@ main (int argc, char **argv)
+@@ -326,6 +326,8 @@ main (int argc, char **argv)
    command_line.warn_mismatch = true;
    command_line.warn_search_mismatch = true;
    command_line.check_section_addresses = -1;
@@ -234,7 +234,7 @@ index 1ae90a77749..f40750fd816 100644
  
    /* We initialize DEMANGLING based on the environment variable
       COLLECT_NO_DEMANGLE.  The gcc collect2 program will demangle the
-@@ -1447,7 +1449,7 @@ undefined_symbol (struct bfd_link_info *info,
+@@ -1458,7 +1460,7 @@ undefined_symbol (struct bfd_link_info *info,
        argv[1] = "undefined-symbol";
        argv[2] = (char *) name;
        argv[3] = NULL;
@@ -243,7 +243,7 @@ index 1ae90a77749..f40750fd816 100644
        if (verbose)
  	einfo (_("%P: About to run error handling script '%s' with arguments: '%s' '%s'\n"),
  	       argv[0], argv[1], argv[2]);
-@@ -1468,7 +1470,7 @@ undefined_symbol (struct bfd_link_info *info,
+@@ -1479,7 +1481,7 @@ undefined_symbol (struct bfd_link_info *info,
  	 carry on to issue the normal error message.  */
      }
  #endif /* SUPPORT_ERROR_HANDLING_SCRIPT */
@@ -253,10 +253,10 @@ index 1ae90a77749..f40750fd816 100644
      {
        if (error_count < MAX_ERRORS_IN_A_ROW)
 diff --git a/ld/lexsup.c b/ld/lexsup.c
-index 9225f71b3ce..92fb66f1fa2 100644
+index fe8722313fe..1df7af3ccaa 100644
 --- a/ld/lexsup.c
 +++ b/ld/lexsup.c
-@@ -608,6 +608,14 @@ static const struct ld_option ld_options[] =
+@@ -629,6 +629,14 @@ static const struct ld_option ld_options[] =
  		   "                                <method> is: share-unconflicted (default),\n"
  		   "                                             share-duplicated"),
      TWO_DASHES },
@@ -271,18 +271,17 @@ index 9225f71b3ce..92fb66f1fa2 100644
  };
  
  #define OPTION_COUNT ARRAY_SIZE (ld_options)
-@@ -1722,6 +1730,14 @@ parse_args (unsigned argc, char **argv)
- 	  config.print_map_discarded = true;
- 	  break;
+@@ -1787,6 +1795,13 @@ parse_args (unsigned argc, char **argv)
  
+ 	case OPTION_PRINT_MAP_LOCALS:
+ 	  config.print_map_locals = true;
++
 +	case OPTION_NO_POISON_SYSTEM_DIRECTORIES:
 +	  command_line.poison_system_directories = false;
 +	  break;
 +
 +	case OPTION_ERROR_POISON_SYSTEM_DIRECTORIES:
 +	  command_line.error_poison_system_directories = true;
-+	  break;
-+
- 	case OPTION_DEPENDENCY_FILE:
- 	  config.dependency_file = optarg;
  	  break;
+ 
+ 	case OPTION_DEPENDENCY_FILE:

+ 0 - 25
recipes-devtools/binutils/binutils/0007-Automatic-date-update-in-version.in.patch

@@ -1,25 +0,0 @@
-From 2ad1585de0e2b7ecf534ba751e66111a04dc1545 Mon Sep 17 00:00:00 2001
-From: GDB Administrator <gdbadmin@sourceware.org>
-Date: Fri, 26 Aug 2022 00:00:43 +0000
-Subject: [PATCH 07/20] Automatic date update in version.in
-
----
- bfd/version.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bfd/version.h b/bfd/version.h
-index 2e0b0917c1..43b515556c 100644
---- a/bfd/version.h
-+++ b/bfd/version.h
-@@ -16,7 +16,7 @@
- 
-    In releases, the date is not included in either version strings or
-    sonames.  */
--#define BFD_VERSION_DATE 20220825
-+#define BFD_VERSION_DATE 20220826
- #define BFD_VERSION @bfd_version@
- #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
- #define REPORT_BUGS_TO @report_bugs_to@
--- 
-2.25.1
-

+ 4 - 4
recipes-devtools/binutils/binutils/0007-fix-the-incorrect-assembling-for-ppc-wait-mnemonic.patch

@@ -1,4 +1,4 @@
-From 883b6c0930410f8553b3bce0dd98131bc1694fa6 Mon Sep 17 00:00:00 2001
+From 7f04e82ac2ded9a7f68dba9fabf1251d680bd0b9 Mon Sep 17 00:00:00 2001
 From: Zhenhua Luo <zhenhua.luo@nxp.com>
 Date: Sat, 11 Jun 2016 22:08:29 -0500
 Subject: [PATCH] fix the incorrect assembling for ppc wait mnemonic
@@ -14,10 +14,10 @@ Signed-off-by: Zhenhua Luo <zhenhua.luo@nxp.com>
  1 file changed, 1 insertion(+), 3 deletions(-)
 
 diff --git a/opcodes/ppc-opc.c b/opcodes/ppc-opc.c
-index 7637d3e349e..8e074e13208 100644
+index 37f1aeb780c..45774c7cf79 100644
 --- a/opcodes/ppc-opc.c
 +++ b/opcodes/ppc-opc.c
-@@ -6947,8 +6947,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
+@@ -7138,8 +7138,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {
  {"waitasec",	X(31,30),      XRTRARB_MASK, POWER8,	POWER9,		{0}},
  {"waitrsv",	XWCPL(31,30,1,0),0xffffffff, POWER10,	EXT,		{0}},
  {"pause_short",	XWCPL(31,30,2,0),0xffffffff, POWER10,	EXT,		{0}},
@@ -26,7 +26,7 @@ index 7637d3e349e..8e074e13208 100644
  
  {"lwepx",	X(31,31),	X_MASK,	  E500MC|PPCA2, 0,		{RT, RA0, RB}},
  
-@@ -7002,7 +7000,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
+@@ -7193,7 +7191,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
  
  {"waitrsv",	X(31,62)|(1<<21), 0xffffffff, E500MC|PPCA2, EXT,	{0}},
  {"waitimpl",	X(31,62)|(2<<21), 0xffffffff, E500MC|PPCA2, EXT,	{0}},

+ 0 - 25
recipes-devtools/binutils/binutils/0008-Automatic-date-update-in-version.in.patch

@@ -1,25 +0,0 @@
-From 5ba2dcfe79154e08173790d33f8bf08c7d02953b Mon Sep 17 00:00:00 2001
-From: GDB Administrator <gdbadmin@sourceware.org>
-Date: Sat, 27 Aug 2022 00:00:33 +0000
-Subject: [PATCH 08/20] Automatic date update in version.in
-
----
- bfd/version.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bfd/version.h b/bfd/version.h
-index 43b515556c..cd9a20e822 100644
---- a/bfd/version.h
-+++ b/bfd/version.h
-@@ -16,7 +16,7 @@
- 
-    In releases, the date is not included in either version strings or
-    sonames.  */
--#define BFD_VERSION_DATE 20220826
-+#define BFD_VERSION_DATE 20220827
- #define BFD_VERSION @bfd_version@
- #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
- #define REPORT_BUGS_TO @report_bugs_to@
--- 
-2.25.1
-

File diff suppressed because it is too large
+ 121 - 120
recipes-devtools/binutils/binutils/0008-Use-libtool-2.4.patch


+ 0 - 25
recipes-devtools/binutils/binutils/0009-Automatic-date-update-in-version.in.patch

@@ -1,25 +0,0 @@
-From 492afb2114df082807cd942d3e9b0a841e366f7d Mon Sep 17 00:00:00 2001
-From: GDB Administrator <gdbadmin@sourceware.org>
-Date: Sun, 28 Aug 2022 00:00:44 +0000
-Subject: [PATCH 09/20] Automatic date update in version.in
-
----
- bfd/version.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bfd/version.h b/bfd/version.h
-index cd9a20e822..6fc5a5b27f 100644
---- a/bfd/version.h
-+++ b/bfd/version.h
-@@ -16,7 +16,7 @@
- 
-    In releases, the date is not included in either version strings or
-    sonames.  */
--#define BFD_VERSION_DATE 20220827
-+#define BFD_VERSION_DATE 20220828
- #define BFD_VERSION @bfd_version@
- #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
- #define REPORT_BUGS_TO @report_bugs_to@
--- 
-2.25.1
-

+ 1 - 1
recipes-devtools/binutils/binutils/0009-Fix-rpath-in-libtool-when-sysroot-is-enabled.patch

@@ -1,4 +1,4 @@
-From 98410efc334e31ccfbdc0080fb293b0e06885454 Mon Sep 17 00:00:00 2001
+From 73d1af65ccfed87662342274d9ec33900786beb3 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Mon, 2 Mar 2015 01:42:38 +0000
 Subject: [PATCH] Fix rpath in libtool when sysroot is enabled

+ 0 - 25
recipes-devtools/binutils/binutils/0010-Automatic-date-update-in-version.in.patch

@@ -1,25 +0,0 @@
-From 7a277be122cb696a8e7df8ad7bdbe672f1b849a2 Mon Sep 17 00:00:00 2001
-From: GDB Administrator <gdbadmin@sourceware.org>
-Date: Mon, 29 Aug 2022 00:00:52 +0000
-Subject: [PATCH 10/20] Automatic date update in version.in
-
----
- bfd/version.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bfd/version.h b/bfd/version.h
-index 6fc5a5b27f..2c2b0d750a 100644
---- a/bfd/version.h
-+++ b/bfd/version.h
-@@ -16,7 +16,7 @@
- 
-    In releases, the date is not included in either version strings or
-    sonames.  */
--#define BFD_VERSION_DATE 20220828
-+#define BFD_VERSION_DATE 20220829
- #define BFD_VERSION @bfd_version@
- #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
- #define REPORT_BUGS_TO @report_bugs_to@
--- 
-2.25.1
-

+ 1 - 1
recipes-devtools/binutils/binutils/0010-sync-with-OE-libtool-changes.patch

@@ -1,4 +1,4 @@
-From 84fc4ceafcbfad4c6ddc9d65f6a425bd62dd062e Mon Sep 17 00:00:00 2001
+From da9dc36e90c6cf7d3d3bf6f4e337261a93d63428 Mon Sep 17 00:00:00 2001
 From: Ross Burton <ross.burton@intel.com>
 Date: Mon, 6 Mar 2017 23:33:27 -0800
 Subject: [PATCH] sync with OE libtool changes

+ 0 - 25
recipes-devtools/binutils/binutils/0011-Automatic-date-update-in-version.in.patch

@@ -1,25 +0,0 @@
-From a11c56f6d85e38ef47848a0842d6991093ba8ffd Mon Sep 17 00:00:00 2001
-From: GDB Administrator <gdbadmin@sourceware.org>
-Date: Tue, 30 Aug 2022 00:01:02 +0000
-Subject: [PATCH 11/20] Automatic date update in version.in
-
----
- bfd/version.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bfd/version.h b/bfd/version.h
-index 2c2b0d750a..a05db0d255 100644
---- a/bfd/version.h
-+++ b/bfd/version.h
-@@ -16,7 +16,7 @@
- 
-    In releases, the date is not included in either version strings or
-    sonames.  */
--#define BFD_VERSION_DATE 20220829
-+#define BFD_VERSION_DATE 20220830
- #define BFD_VERSION @bfd_version@
- #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
- #define REPORT_BUGS_TO @report_bugs_to@
--- 
-2.25.1
-

+ 5 - 5
recipes-devtools/binutils/binutils/0011-Check-for-clang-before-checking-gcc-version.patch

@@ -1,4 +1,4 @@
-From 628c10087e6e11a7bc748437c5b695835b704aaf Mon Sep 17 00:00:00 2001
+From f6105e5202180627e9690884d483fd5b7dc28652 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Wed, 15 Apr 2020 14:17:20 -0700
 Subject: [PATCH] Check for clang before checking gcc version
@@ -18,10 +18,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
  2 files changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/configure b/configure
-index be433ef6d5d..7494fbd2f06 100755
+index 9cb953a197e..b63b5cd3de0 100755
 --- a/configure
 +++ b/configure
-@@ -5294,7 +5294,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+@@ -5460,7 +5460,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
  /* end confdefs.h.  */
  
@@ -31,10 +31,10 @@ index be433ef6d5d..7494fbd2f06 100755
  #endif
  int main() {}
 diff --git a/configure.ac b/configure.ac
-index 1651cbf3b02..2e2ecc47542 100644
+index e95a9ed116e..2df870b86af 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -1323,7 +1323,7 @@ if test "$GCC" = yes; then
+@@ -1444,7 +1444,7 @@ if test "$GCC" = yes; then
    AC_MSG_CHECKING([whether g++ accepts -static-libstdc++ -static-libgcc])
    AC_LANG_PUSH(C++)
    AC_LINK_IFELSE([AC_LANG_SOURCE([

+ 0 - 25
recipes-devtools/binutils/binutils/0012-Automatic-date-update-in-version.in.patch

@@ -1,25 +0,0 @@
-From 8dae8cb882d7726fe58de8005a8a34d2c48b78a9 Mon Sep 17 00:00:00 2001
-From: GDB Administrator <gdbadmin@sourceware.org>
-Date: Wed, 31 Aug 2022 00:00:36 +0000
-Subject: [PATCH 12/20] Automatic date update in version.in
-
----
- bfd/version.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bfd/version.h b/bfd/version.h
-index a05db0d255..51cec98212 100644
---- a/bfd/version.h
-+++ b/bfd/version.h
-@@ -16,7 +16,7 @@
- 
-    In releases, the date is not included in either version strings or
-    sonames.  */
--#define BFD_VERSION_DATE 20220830
-+#define BFD_VERSION_DATE 20220831
- #define BFD_VERSION @bfd_version@
- #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
- #define REPORT_BUGS_TO @report_bugs_to@
--- 
-2.25.1
-

+ 3 - 3
recipes-devtools/binutils/binutils/0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch

@@ -1,4 +1,4 @@
-From 63157cb403b6aa13147840c036a8555c4ea9c166 Mon Sep 17 00:00:00 2001
+From 13cbec5bc5c75dd4c3e1d5f3ca80e5b64f7116d1 Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Thu, 10 Mar 2022 21:21:33 -0800
 Subject: [PATCH] Only generate an RPATH entry if LD_RUN_PATH is not empty
@@ -14,7 +14,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
  1 file changed, 5 insertions(+)
 
 diff --git a/ld/ldelf.c b/ld/ldelf.c
-index 0d61a3209ec..cd0da2013e2 100644
+index 1519f8ac4e5..2a7c76dc29c 100644
 --- a/ld/ldelf.c
 +++ b/ld/ldelf.c
 @@ -1127,6 +1127,9 @@ ldelf_handle_dt_needed (struct elf_link_hash_table *htab,
@@ -27,7 +27,7 @@ index 0d61a3209ec..cd0da2013e2 100644
  		  if (path
  		      && ldelf_search_needed (path, &n, force,
  					      is_linux, elfsize))
-@@ -1801,6 +1804,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
+@@ -1802,6 +1805,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
    rpath = command_line.rpath;
    if (rpath == NULL)
      rpath = (const char *) getenv ("LD_RUN_PATH");

+ 0 - 25
recipes-devtools/binutils/binutils/0013-Automatic-date-update-in-version.in.patch

@@ -1,25 +0,0 @@
-From 6995ff43693f4013942223267cfe0609272fc7fd Mon Sep 17 00:00:00 2001
-From: GDB Administrator <gdbadmin@sourceware.org>
-Date: Thu, 1 Sep 2022 00:00:53 +0000
-Subject: [PATCH 13/20] Automatic date update in version.in
-
----
- bfd/version.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bfd/version.h b/bfd/version.h
-index 51cec98212..8c973be40f 100644
---- a/bfd/version.h
-+++ b/bfd/version.h
-@@ -16,7 +16,7 @@
- 
-    In releases, the date is not included in either version strings or
-    sonames.  */
--#define BFD_VERSION_DATE 20220831
-+#define BFD_VERSION_DATE 20220901
- #define BFD_VERSION @bfd_version@
- #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
- #define REPORT_BUGS_TO @report_bugs_to@
--- 
-2.25.1
-

+ 0 - 36
recipes-devtools/binutils/binutils/0013-CVE-2022-38533.patch

@@ -1,36 +0,0 @@
-From ef186fe54aa6d281a3ff8a9528417e5cc614c797 Mon Sep 17 00:00:00 2001
-From: Alan Modra <amodra@gmail.com>
-Date: Sat, 13 Aug 2022 15:32:47 +0930
-Subject: [PATCH] PR29482 - strip: heap-buffer-overflow
-
-	PR 29482
-	* coffcode.h (coff_set_section_contents): Sanity check _LIB.
-
-Upstream-Status: Backport [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ef186fe54aa6d281a3ff8a9528417e5cc614c797]
-
-Signed-off-by: Pgowda <pgowda.cve@gmail.com>
-
----
- bfd/coffcode.h | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/bfd/coffcode.h b/bfd/coffcode.h
-index 67aaf158ca1..52027981c3f 100644
---- a/bfd/coffcode.h
-+++ b/bfd/coffcode.h
-@@ -4302,10 +4302,13 @@ coff_set_section_contents (bfd * abfd,
- 
- 	rec = (bfd_byte *) location;
- 	recend = rec + count;
--	while (rec < recend)
-+	while (recend - rec >= 4)
- 	  {
-+	    size_t len = bfd_get_32 (abfd, rec);
-+	    if (len == 0 || len > (size_t) (recend - rec) / 4)
-+	      break;
-+	    rec += len * 4;
- 	    ++section->lma;
--	    rec += bfd_get_32 (abfd, rec) * 4;
- 	  }
- 
- 	BFD_ASSERT (rec == recend);

+ 48 - 0
recipes-devtools/binutils/binutils/0013-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch

@@ -0,0 +1,48 @@
+From 9d451ca9ca6bf34b43a089033565ae7570db2065 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 15 Jan 2023 00:16:25 -0800
+Subject: [PATCH] Define alignof using _Alignof when using C11 or newer
+
+WG14 N2350 made very clear that it is an UB having type definitions
+within "offsetof" [1]. This patch enhances the implementation of macro
+alignof to use builtin "_Alignof" to avoid undefined behavior on
+when using std=c11 or newer
+
+clang 16+ has started to flag this [2]
+
+Fixes build when using -std >= gnu11 and using clang16+
+
+Older compilers gcc < 4.9 or clang < 8 has buggy _Alignof even though it
+may support C11, exclude those compilers too
+
+[1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm
+[2] https://reviews.llvm.org/D133574
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libiberty/sha1.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/libiberty/sha1.c b/libiberty/sha1.c
+index 6c71e3ebb41..a2caf947d31 100644
+--- a/libiberty/sha1.c
++++ b/libiberty/sha1.c
+@@ -229,7 +229,17 @@ sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx)
+   if (len >= 64)
+     {
+ #if !_STRING_ARCH_unaligned
++/* GCC releases before GCC 4.9 had a bug in _Alignof.  See GCC bug 52023
++   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
++   clang versions < 8.0.0 have the same bug.  */
++#if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
++     || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
++	&& !defined __clang__) \
++     || (defined __clang__ && __clang_major__ < 8))
+ # define alignof(type) offsetof (struct { char c; type x; }, x)
++#else
++# define alignof(type) _Alignof(type)
++#endif
+ # define UNALIGNED_P(p) (((size_t) p) % alignof (sha1_uint32) != 0)
+       if (UNALIGNED_P (buffer))
+ 	while (len > 64)

+ 0 - 25
recipes-devtools/binutils/binutils/0014-Automatic-date-update-in-version.in.patch

@@ -1,25 +0,0 @@
-From 3c72107d827373d7b2f64765423891b067e3cf9e Mon Sep 17 00:00:00 2001
-From: GDB Administrator <gdbadmin@sourceware.org>
-Date: Fri, 2 Sep 2022 00:00:52 +0000
-Subject: [PATCH 14/20] Automatic date update in version.in
-
----
- bfd/version.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bfd/version.h b/bfd/version.h
-index 8c973be40f..88b345b255 100644
---- a/bfd/version.h
-+++ b/bfd/version.h
-@@ -16,7 +16,7 @@
- 
-    In releases, the date is not included in either version strings or
-    sonames.  */
--#define BFD_VERSION_DATE 20220901
-+#define BFD_VERSION_DATE 20220902
- #define BFD_VERSION @bfd_version@
- #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
- #define REPORT_BUGS_TO @report_bugs_to@
--- 
-2.25.1
-

+ 0 - 350
recipes-devtools/binutils/binutils/0014-CVE-2022-38128-1.patch

@@ -1,350 +0,0 @@
-From f07c08e115e27cddf5a0030dc6332bbee1bd9c6a Mon Sep 17 00:00:00 2001
-From: Alan Modra <amodra@gmail.com>
-Date: Thu, 21 Jul 2022 08:38:14 +0930
-Subject: [PATCH] binutils/dwarf.c: abbrev caching
-
-I'm inclined to think that abbrev caching is counter-productive.  The
-time taken to search the list of abbrevs converted to internal form is
-non-zero, and it's easy to decode the raw abbrevs.  It's especially
-silly to cache empty lists of decoded abbrevs (happens with zero
-padding in .debug_abbrev), or abbrevs as they are displayed when there
-is no further use of those abbrevs.  This patch stops caching in those
-cases.
-
-	* dwarf.c (record_abbrev_list_for_cu): Add free_list param.
-	Put abbrevs on abbrev_lists here.
-	(new_abbrev_list): Delete function.
-	(process_abbrev_set): Return newly allocated list.  Move
-	abbrev base, offset and size checking to..
-	(find_and_process_abbrev_set): ..here, new function.  Handle
-	lookup of cached abbrevs here, and calculate start and end
-	for process_abbrev_set.  Return free_list if newly alloc'd.
-	(process_debug_info): Consolidate cached list lookup, new list
-	alloc and processing into find_and_process_abbrev_set call.
-	Free list when not cached.
-	(display_debug_abbrev): Similarly.
-
-Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=f07c08e115e27cddf5a0030dc6332bbee1bd9c6a]
-
-Signed-off-by: Pgowda <pgowda.cve@gmail.com>
----
- binutils/dwarf.c | 208 +++++++++++++++++++++++++----------------------
- 1 file changed, 110 insertions(+), 98 deletions(-)
-
-diff --git a/binutils/dwarf.c b/binutils/dwarf.c
-index 267ed3bb382..2fc352f74c5 100644
---- a/binutils/dwarf.c
-+++ b/binutils/dwarf.c
-@@ -882,8 +882,15 @@ static unsigned long  next_free_abbrev_m
- #define ABBREV_MAP_ENTRIES_INCREMENT   8
- 
- static void
--record_abbrev_list_for_cu (dwarf_vma start, dwarf_vma end, abbrev_list * list)
-+record_abbrev_list_for_cu (dwarf_vma start, dwarf_vma end,
-+			   abbrev_list *list, abbrev_list *free_list)
- {
-+  if (free_list != NULL)
-+    {
-+      list->next = abbrev_lists;
-+      abbrev_lists = list;
-+    }
-+
-   if (cu_abbrev_map == NULL)
-     {
-       num_abbrev_map_entries = INITIAL_NUM_ABBREV_MAP_ENTRIES;
-@@ -936,20 +943,6 @@ free_all_abbrevs (void)
- }
- 
- static abbrev_list *
--new_abbrev_list (dwarf_vma abbrev_base, dwarf_vma abbrev_offset)
--{
--  abbrev_list * list = (abbrev_list *) xcalloc (sizeof * list, 1);
--
--  list->abbrev_base = abbrev_base;
--  list->abbrev_offset = abbrev_offset;
--
--  list->next = abbrev_lists;
--  abbrev_lists = list;
--
--  return list;
--}
--
--static abbrev_list *
- find_abbrev_list_by_abbrev_offset (dwarf_vma abbrev_base,
- 				   dwarf_vma abbrev_offset)
- {
-@@ -966,7 +959,7 @@ find_abbrev_list_by_abbrev_offset (dwarf
- /* Find the abbreviation map for the CU that includes OFFSET.
-    OFFSET is an absolute offset from the start of the .debug_info section.  */
- /* FIXME: This function is going to slow down readelf & objdump.
--   Consider using a better algorithm to mitigate this effect.  */
-+   Not caching abbrevs is likely the answer.  */
- 
- static  abbrev_map *
- find_abbrev_map_by_offset (dwarf_vma offset)
-@@ -1033,40 +1026,18 @@ add_abbrev_attr (unsigned long    attrib
-   list->last_abbrev->last_attr = attr;
- }
- 
--/* Processes the (partial) contents of a .debug_abbrev section.
--   Returns NULL if the end of the section was encountered.
--   Returns the address after the last byte read if the end of
--   an abbreviation set was found.  */
-+/* Return processed (partial) contents of a .debug_abbrev section.
-+   Returns NULL on errors.  */
- 
--static unsigned char *
-+static abbrev_list *
- process_abbrev_set (struct dwarf_section *section,
--		    dwarf_vma abbrev_base,
--		    dwarf_vma abbrev_size,
--		    dwarf_vma abbrev_offset,
--		    abbrev_list *list)
-+		    unsigned char *start,
-+		    unsigned char *end)
- {
--  if (abbrev_base >= section->size
--      || abbrev_size > section->size - abbrev_base)
--    {
--      /* PR 17531: file:4bcd9ce9.  */
--      warn (_("Debug info is corrupted, abbrev size (%lx) is larger than "
--	      "abbrev section size (%lx)\n"),
--	      (unsigned long) (abbrev_base + abbrev_size),
--	      (unsigned long) section->size);
--      return NULL;
--    }
--  if (abbrev_offset >= abbrev_size)
--    {
--      warn (_("Debug info is corrupted, abbrev offset (%lx) is larger than "
--	      "abbrev section size (%lx)\n"),
--	    (unsigned long) abbrev_offset,
--	    (unsigned long) abbrev_size);
--      return NULL;
--    }
-+  abbrev_list *list = xmalloc (sizeof (*list));
-+  list->first_abbrev = NULL;
-+  list->last_abbrev = NULL;
- 
--  unsigned char *start = section->start + abbrev_base;
--  unsigned char *end = start + abbrev_size;
--  start += abbrev_offset;
-   while (start < end)
-     {
-       unsigned long entry;
-@@ -1079,14 +1050,18 @@ process_abbrev_set (struct dwarf_section
-       /* A single zero is supposed to end the set according
- 	 to the standard.  If there's more, then signal that to
- 	 the caller.  */
--      if (start == end)
--	return NULL;
--      if (entry == 0)
--	return start;
-+      if (start == end || entry == 0)
-+	{
-+	  list->start_of_next_abbrevs = start != end ? start : NULL;
-+	  return list;
-+	}
- 
-       READ_ULEB (tag, start, end);
-       if (start == end)
--	return NULL;
-+	{
-+	  free (list);
-+	  return NULL;
-+	}
- 
-       children = *start++;
- 
-@@ -1121,9 +1096,67 @@ process_abbrev_set (struct dwarf_section
-   /* Report the missing single zero which ends the section.  */
-   error (_(".debug_abbrev section not zero terminated\n"));
- 
-+  free (list);
-   return NULL;
- }
- 
-+/* Return a sequence of abbrevs in SECTION starting at ABBREV_BASE
-+   plus ABBREV_OFFSET and finishing at ABBREV_BASE + ABBREV_SIZE.
-+   If FREE_LIST is non-NULL search the already decoded abbrevs on
-+   abbrev_lists first and if found set *FREE_LIST to NULL.  If
-+   searching doesn't find a matching abbrev, set *FREE_LIST to the
-+   newly allocated list.  If FREE_LIST is NULL, no search is done and
-+   the returned abbrev_list is always newly allocated.  */
-+
-+static abbrev_list *
-+find_and_process_abbrev_set (struct dwarf_section *section,
-+			     dwarf_vma abbrev_base,
-+			     dwarf_vma abbrev_size,
-+			     dwarf_vma abbrev_offset,
-+			     abbrev_list **free_list)
-+{
-+  if (free_list)
-+    *free_list = NULL;
-+
-+  if (abbrev_base >= section->size
-+      || abbrev_size > section->size - abbrev_base)
-+    {
-+      /* PR 17531: file:4bcd9ce9.  */
-+      warn (_("Debug info is corrupted, abbrev size (%lx) is larger than "
-+	      "abbrev section size (%lx)\n"),
-+	      (unsigned long) (abbrev_base + abbrev_size),
-+	      (unsigned long) section->size);
-+      return NULL;
-+    }
-+  if (abbrev_offset >= abbrev_size)
-+    {
-+      warn (_("Debug info is corrupted, abbrev offset (%lx) is larger than "
-+	      "abbrev section size (%lx)\n"),
-+	    (unsigned long) abbrev_offset,
-+	    (unsigned long) abbrev_size);
-+      return NULL;
-+    }
-+
-+  unsigned char *start = section->start + abbrev_base + abbrev_offset;
-+  unsigned char *end = section->start + abbrev_base + abbrev_size;
-+  abbrev_list *list = NULL;
-+  if (free_list)
-+    list = find_abbrev_list_by_abbrev_offset (abbrev_base, abbrev_offset);
-+  if (list == NULL)
-+    {
-+      list = process_abbrev_set (section, start, end);
-+      if (list)
-+	{
-+	  list->abbrev_base = abbrev_base;
-+	  list->abbrev_offset = abbrev_offset;
-+	  list->next = NULL;
-+	}
-+      if (free_list)
-+	*free_list = list;
-+    }
-+  return list;
-+}
-+
- static const char *
- get_TAG_name (unsigned long tag)
- {
-@@ -3670,7 +3703,6 @@ process_debug_info (struct dwarf_section
-       dwarf_vma                 cu_offset;
-       unsigned int              offset_size;
-       struct cu_tu_set *        this_set;
--      abbrev_list *             list;
-       unsigned char *end_cu;
- 
-       hdrptr = start;
-@@ -3726,22 +3758,18 @@ process_debug_info (struct dwarf_section
- 	  abbrev_size = this_set->section_sizes [DW_SECT_ABBREV];
- 	}
- 
--      list = find_abbrev_list_by_abbrev_offset (abbrev_base,
--						compunit.cu_abbrev_offset);
--      if (list == NULL)
--	{
--	  unsigned char *  next;
--
--	  list = new_abbrev_list (abbrev_base,
--				  compunit.cu_abbrev_offset);
--	  next = process_abbrev_set (&debug_displays[abbrev_sec].section,
--				     abbrev_base, abbrev_size,
--				     compunit.cu_abbrev_offset, list);
--	  list->start_of_next_abbrevs = next;
--	}
--
-+      abbrev_list *list;
-+      abbrev_list *free_list;
-+      list = find_and_process_abbrev_set (&debug_displays[abbrev_sec].section,
-+					  abbrev_base, abbrev_size,
-+					  compunit.cu_abbrev_offset,
-+					  &free_list);
-       start = end_cu;
--      record_abbrev_list_for_cu (cu_offset, start - section_begin, list);
-+      if (list != NULL && list->first_abbrev != NULL)
-+	record_abbrev_list_for_cu (cu_offset, start - section_begin,
-+				   list, free_list);
-+      else if (free_list != NULL)
-+	free_abbrev_list (free_list);
-     }
- 
-   for (start = section_begin, unit = 0; start < end; unit++)
-@@ -3757,7 +3785,6 @@ process_debug_info (struct dwarf_section
-       struct cu_tu_set *this_set;
-       dwarf_vma abbrev_base;
-       size_t abbrev_size;
--      abbrev_list * list = NULL;
-       unsigned char *end_cu;
- 
-       hdrptr = start;
-@@ -3936,20 +3963,10 @@ process_debug_info (struct dwarf_section
- 	}
- 
-       /* Process the abbrevs used by this compilation unit.  */
--      list = find_abbrev_list_by_abbrev_offset (abbrev_base,
--						compunit.cu_abbrev_offset);
--      if (list == NULL)
--	{
--	  unsigned char *next;
--
--	  list = new_abbrev_list (abbrev_base,
--				  compunit.cu_abbrev_offset);
--	  next = process_abbrev_set (&debug_displays[abbrev_sec].section,
--				     abbrev_base, abbrev_size,
--				     compunit.cu_abbrev_offset, list);
--	  list->start_of_next_abbrevs = next;
--	}
--
-+      abbrev_list *list;
-+      list = find_and_process_abbrev_set (&debug_displays[abbrev_sec].section,
-+					  abbrev_base, abbrev_size,
-+					  compunit.cu_abbrev_offset, NULL);
-       level = 0;
-       last_level = level;
-       saved_level = -1;
-@@ -4128,6 +4145,8 @@ process_debug_info (struct dwarf_section
- 	  if (entry->children)
- 	    ++level;
- 	}
-+      if (list != NULL)
-+	free_abbrev_list (list);
-     }
- 
-   /* Set num_debug_info_entries here so that it can be used to check if
-@@ -6353,24 +6372,15 @@ display_debug_abbrev (struct dwarf_secti
- 
-   do
-     {
--      abbrev_list *    list;
--      dwarf_vma        offset;
--
--      offset = start - section->start;
--      list = find_abbrev_list_by_abbrev_offset (0, offset);
-+      dwarf_vma offset = start - section->start;
-+      abbrev_list *list = find_and_process_abbrev_set (section, 0,
-+						       section->size, offset,
-+						       NULL);
-       if (list == NULL)
--	{
--	  list = new_abbrev_list (0, offset);
--	  start = process_abbrev_set (section, 0, section->size, offset, list);
--	  list->start_of_next_abbrevs = start;
--	}
--      else
--	start = list->start_of_next_abbrevs;
--
--      if (list->first_abbrev == NULL)
--	continue;
-+	break;
- 
--      printf (_("  Number TAG (0x%lx)\n"), (long) offset);
-+      if (list->first_abbrev)
-+	printf (_("  Number TAG (0x%lx)\n"), (long) offset);
- 
-       for (entry = list->first_abbrev; entry; entry = entry->next)
- 	{
-@@ -6391,6 +6401,8 @@ display_debug_abbrev (struct dwarf_secti
- 	      putchar ('\n');
- 	    }
- 	}
-+      start = list->start_of_next_abbrevs;
-+      free_abbrev_list (list);
-     }
-   while (start);
- 

+ 0 - 536
recipes-devtools/binutils/binutils/0014-CVE-2022-38128-2.patch

@@ -1,536 +0,0 @@
-From 175b91507b83ad42607d2f6dadaf55b7b511bdbe Mon Sep 17 00:00:00 2001
-From: Alan Modra <amodra@gmail.com>
-Date: Wed, 20 Jul 2022 18:28:50 +0930
-Subject: [PATCH] miscellaneous dwarf.c tidies
-
-	* dwarf.c: Leading and trailing whitespace fixes.
-	(free_abbrev_list): New function.
-	(free_all_abbrevs): Use the above.  Free cu_abbrev_map here too.
-	(process_abbrev_set): Print actual section name on error.
-	(get_type_abbrev_from_form): Add overflow check.
-	(free_debug_memory): Don't free cu_abbrev_map here..
-	(process_debug_info): ..or here.  Warn on another case of not
-	finding a neeeded abbrev.
-
-Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=175b91507b83ad42607d2f6dadaf55b7b511bdbe]
-
-Signed-off-by: Pgowda <pgowda.cve@gmail.com>
----
- binutils/dwarf.c | 216 +++++++++++++++++++++++------------------------
- 1 file changed, 106 insertions(+), 110 deletions(-)
-
-diff --git a/binutils/dwarf.c b/binutils/dwarf.c
-index 2b1eec49422..267ed3bb382 100644
---- a/binutils/dwarf.c
-+++ b/binutils/dwarf.c
-@@ -806,7 +806,7 @@ fetch_indexed_value (dwarf_vma idx,
-       pointer_size = 4;
-       bias = 12;
-     }
-- 
-+
-   dwarf_vma offset = idx * pointer_size;
- 
-   /* Offsets are biased by the size of the section header
-@@ -908,38 +908,41 @@ record_abbrev_list_for_cu (dwarf_vma sta
-   next_free_abbrev_map_entry ++;
- }
- 
--static void
--free_all_abbrevs (void)
-+static abbrev_list *
-+free_abbrev_list (abbrev_list *list)
- {
--  abbrev_list *  list;
-+  abbrev_entry *abbrv = list->first_abbrev;
- 
--  for (list = abbrev_lists; list != NULL;)
-+  while (abbrv)
-     {
--      abbrev_list *   next = list->next;
--      abbrev_entry *  abbrv;
-+      abbrev_attr *attr = abbrv->first_attr;
- 
--      for (abbrv = list->first_abbrev; abbrv != NULL;)
-+      while (attr)
- 	{
--	  abbrev_entry *  next_abbrev = abbrv->next;
--	  abbrev_attr *   attr;
--
--	  for (attr = abbrv->first_attr; attr;)
--	    {
--	      abbrev_attr *next_attr = attr->next;
--
--	      free (attr);
--	      attr = next_attr;
--	    }
--
--	  free (abbrv);
--	  abbrv = next_abbrev;
-+	  abbrev_attr *next_attr = attr->next;
-+	  free (attr);
-+	  attr = next_attr;
- 	}
- 
--      free (list);
--      list = next;
-+      abbrev_entry *next_abbrev = abbrv->next;
-+      free (abbrv);
-+      abbrv = next_abbrev;
-     }
- 
--  abbrev_lists = NULL;
-+  abbrev_list *next = list->next;
-+  free (list);
-+  return next;
-+}
-+
-+static void
-+free_all_abbrevs (void)
-+{
-+  while (abbrev_lists)
-+    abbrev_lists = free_abbrev_list (abbrev_lists);
-+
-+  free (cu_abbrev_map);
-+  cu_abbrev_map = NULL;
-+  next_free_abbrev_map_entry = 0;
- }
- 
- static abbrev_list *
-@@ -971,7 +974,7 @@ find_abbrev_map_by_offset (dwarf_vma off
- 	&& cu_abbrev_map[i].end > offset)
-       return cu_abbrev_map + i;
- 
--  return NULL;	
-+  return NULL;
- }
- 
- static void
-@@ -1094,7 +1097,7 @@ process_abbrev_set (struct dwarf_section
-     }
- 
-   /* Report the missing single zero which ends the section.  */
--  error (_(".debug_abbrev section not zero terminated\n"));
-+  error (_("%s section not zero terminated\n"), section->name);
- 
-   free (list);
-   return NULL;
-@@ -1875,7 +1878,7 @@ fetch_alt_indirect_string (dwarf_vma off
- 	dwarf_vmatoa ("x", offset));
-   return _("<offset is too big>");
- }
--	
-+
- static const char *
- get_AT_name (unsigned long attribute)
- {
-@@ -2157,7 +2160,8 @@ get_type_abbrev_from_form (unsigned long
-     case DW_FORM_ref4:
-     case DW_FORM_ref8:
-     case DW_FORM_ref_udata:
--      if (uvalue + cu_offset > (size_t) (cu_end - section->start))
-+      if (uvalue + cu_offset < uvalue
-+	  || uvalue + cu_offset > (size_t) (cu_end - section->start))
- 	{
- 	  warn (_("Unable to resolve ref form: uvalue %lx + cu_offset %lx > CU size %lx\n"),
- 		uvalue, (long) cu_offset, (long) (cu_end - section->start));
-@@ -2194,7 +2198,7 @@ get_type_abbrev_from_form (unsigned long
-       else
- 	*map_return = NULL;
-     }
--	
-+
-   READ_ULEB (abbrev_number, data, section->start + section->size);
- 
-   for (entry = map->list->first_abbrev; entry != NULL; entry = entry->next)
-@@ -2783,10 +2787,10 @@ read_and_display_attr_value (unsigned lo
- 	  if (form == DW_FORM_loclistx)
- 	    {
- 	      if (dwo)
--	        {
--	          index = fetch_indexed_value (uvalue, loclists_dwo, 0);
--	          index += (offset_size == 8) ? 20 : 12;
--	        }
-+		{
-+		  index = fetch_indexed_value (uvalue, loclists_dwo, 0);
-+		  index += (offset_size == 8) ? 20 : 12;
-+		}
- 	      else if (debug_info_p == NULL)
- 		{
- 		  index = fetch_indexed_value (uvalue, loclists, 0);
-@@ -2804,21 +2808,21 @@ read_and_display_attr_value (unsigned lo
- 	  else if (form == DW_FORM_rnglistx)
- 	    {
- 	      if (dwo)
--	        {
--	          index = fetch_indexed_value (uvalue, rnglists_dwo, 0);
--	          index += (offset_size == 8) ? 20 : 12;
--	        }
-+		{
-+		  index = fetch_indexed_value (uvalue, rnglists_dwo, 0);
-+		  index += (offset_size == 8) ? 20 : 12;
-+		}
- 	      else
--	        {
--	          if (debug_info_p == NULL)
--	            base = 0;
--	          else
--	            base = debug_info_p->rnglists_base;
--	          /* We do not have a cached value this time, so we perform the
--	             computation manually.  */
--	          index = fetch_indexed_value (uvalue, rnglists, base);
--	          index += base;
--	        }
-+		{
-+		  if (debug_info_p == NULL)
-+		    base = 0;
-+		  else
-+		    base = debug_info_p->rnglists_base;
-+		  /* We do not have a cached value this time, so we perform the
-+		     computation manually.  */
-+		  index = fetch_indexed_value (uvalue, rnglists, base);
-+		  index += base;
-+		}
- 	    }
- 	  else
- 	    {
-@@ -2844,7 +2848,7 @@ read_and_display_attr_value (unsigned lo
-       if (!do_loc)
- 	printf ("%c<0x%s>", delimiter, dwarf_vmatoa ("x", uvalue + cu_offset));
-       break;
--      
-+
-     default:
-       warn (_("Unrecognized form: 0x%lx\n"), form);
-       /* What to do?  Consume a byte maybe?  */
-@@ -2869,9 +2873,9 @@ read_and_display_attr_value (unsigned lo
- 	case DW_AT_rnglists_base:
- 	  if (debug_info_p->rnglists_base)
- 	    warn (_("CU @ 0x%s has multiple rnglists_base values (0x%s and 0x%s)"),
--	          dwarf_vmatoa ("x", debug_info_p->cu_offset),
--	          dwarf_vmatoa ("x", debug_info_p->rnglists_base),
--	          dwarf_vmatoa ("x", uvalue));
-+		  dwarf_vmatoa ("x", debug_info_p->cu_offset),
-+		  dwarf_vmatoa ("x", debug_info_p->rnglists_base),
-+		  dwarf_vmatoa ("x", uvalue));
- 	  debug_info_p->rnglists_base = uvalue;
- 	  break;
- 	case DW_AT_str_offsets_base:
-@@ -3021,7 +3025,7 @@ read_and_display_attr_value (unsigned lo
- 	      case DW_FORM_strx3:
- 	      case DW_FORM_strx4:
- 		add_dwo_name (fetch_indexed_string (uvalue, this_set, offset_size, false,
--		                                    debug_info_p->str_offsets_base),
-+						    debug_info_p->str_offsets_base),
- 			      cu_offset);
- 		break;
- 	      case DW_FORM_string:
-@@ -3055,7 +3059,7 @@ read_and_display_attr_value (unsigned lo
- 	      case DW_FORM_strx3:
- 	      case DW_FORM_strx4:
- 		add_dwo_dir (fetch_indexed_string (uvalue, this_set, offset_size, false,
--		                                   debug_info_p->str_offsets_base),
-+						   debug_info_p->str_offsets_base),
- 			     cu_offset);
- 		break;
- 	      case DW_FORM_string:
-@@ -3686,11 +3690,8 @@ process_debug_info (struct dwarf_section
-     introduce (section, false);
- 
-   free_all_abbrevs ();
--  free (cu_abbrev_map);
--  cu_abbrev_map = NULL;
--  next_free_abbrev_map_entry = 0;
- 
--  /* In order to be able to resolve DW_FORM_ref_attr forms we need
-+  /* In order to be able to resolve DW_FORM_ref_addr forms we need
-      to load *all* of the abbrevs for all CUs in this .debug_info
-      section.  This does effectively mean that we (partially) read
-      every CU header twice.  */
-@@ -4045,12 +4046,11 @@ process_debug_info (struct dwarf_section
- 
- 	  /* Scan through the abbreviation list until we reach the
- 	     correct entry.  */
--	  if (list == NULL)
--	    continue;
--
--	  for (entry = list->first_abbrev; entry != NULL; entry = entry->next)
--	    if (entry->number == abbrev_number)
--	      break;
-+	  entry = NULL;
-+	  if (list != NULL)
-+	    for (entry = list->first_abbrev; entry != NULL; entry = entry->next)
-+	      if (entry->number == abbrev_number)
-+		break;
- 
- 	  if (entry == NULL)
- 	    {
-@@ -4074,7 +4074,7 @@ process_debug_info (struct dwarf_section
- 	      break;
- 	    case DW_TAG_compile_unit:
- 	    case DW_TAG_skeleton_unit:
--	      need_base_address = 1;	
-+	      need_base_address = 1;
- 	      need_dwo_info = do_loc;
- 	      break;
- 	    case DW_TAG_entry_point:
-@@ -4459,7 +4459,7 @@ display_debug_sup (struct dwarf_section
- 
-   SAFE_BYTE_GET_AND_INC (is_supplementary, start, 1, end);
-   if (is_supplementary != 0 && is_supplementary != 1)
--    warn (_("corrupt .debug_sup section: is_supplementary not 0 or 1\n"));    
-+    warn (_("corrupt .debug_sup section: is_supplementary not 0 or 1\n"));
- 
-   sup_filename = start;
-   if (is_supplementary && sup_filename[0] != 0)
-@@ -5638,7 +5638,7 @@ display_debug_lines_decoded (struct dwar
- 			printf ("%s  %11d  %#18" DWARF_VMA_FMT "x",
- 				newFileName, state_machine_regs.line,
- 				state_machine_regs.address);
--		    }			
-+		    }
- 		  else
- 		    {
- 		      if (xop == -DW_LNE_end_sequence)
-@@ -6092,7 +6092,7 @@ display_debug_macro (struct dwarf_sectio
-   load_debug_section_with_follow (str, file);
-   load_debug_section_with_follow (line, file);
-   load_debug_section_with_follow (str_index, file);
--  
-+
-   introduce (section, false);
- 
-   while (curr < end)
-@@ -6537,7 +6537,7 @@ display_loc_list (struct dwarf_section *
- 
-       /* Check base address specifiers.  */
-       if (is_max_address (begin, pointer_size)
--          && !is_max_address (end, pointer_size))
-+	  && !is_max_address (end, pointer_size))
- 	{
- 	  base_address = end;
- 	  print_dwarf_vma (begin, pointer_size);
-@@ -6715,7 +6715,7 @@ display_loclists_list (struct dwarf_sect
- 	case DW_LLE_default_location:
- 	  begin = end = 0;
- 	  break;
--	  
-+
- 	case DW_LLE_offset_pair:
- 	  READ_ULEB (begin, start, section_end);
- 	  begin += base_address;
-@@ -7011,7 +7011,7 @@ display_offset_entry_loclists (struct dw
-   unsigned char *  start = section->start;
-   unsigned char * const end = start + section->size;
- 
--  introduce (section, false);  
-+  introduce (section, false);
- 
-   do
-     {
-@@ -7060,14 +7060,14 @@ display_offset_entry_loclists (struct dw
- 		section->name, segment_selector_size);
- 	  return 0;
- 	}
--      
-+
-       if (offset_entry_count == 0)
- 	{
- 	  warn (_("The %s section contains a table without offset\n"),
- 		section->name);
- 	  return 0;
- 	}
--  
-+
-       printf (_("\n   Offset Entries starting at 0x%lx:\n"),
- 	      (long)(start - section->start));
- 
-@@ -8229,7 +8229,7 @@ display_debug_rnglists (struct dwarf_sec
- 	  start = display_debug_rnglists_list
- 	    (start, end, address_size, offset, 0, offset_size);
- 	  if (start >= end)
--	    break;	  
-+	    break;
- 	}
- 
-       start = end;
-@@ -8347,12 +8347,12 @@ display_debug_ranges (struct dwarf_secti
-       next = section_begin + offset + debug_info_p->rnglists_base;
- 
-       /* If multiple DWARF entities reference the same range then we will
--         have multiple entries in the `range_entries' list for the same
--         offset.  Thanks to the sort above these will all be consecutive in
--         the `range_entries' list, so we can easily ignore duplicates
--         here.  */
-+	 have multiple entries in the `range_entries' list for the same
-+	 offset.  Thanks to the sort above these will all be consecutive in
-+	 the `range_entries' list, so we can easily ignore duplicates
-+	 here.  */
-       if (i > 0 && last_offset == offset)
--        continue;
-+	continue;
-       last_offset = offset;
- 
-       if (dwarf_check != 0 && i > 0)
-@@ -10286,7 +10286,7 @@ display_debug_names (struct dwarf_sectio
- 	  printf (_("Out of %lu items there are %zu bucket clashes"
- 		    " (longest of %zu entries).\n"),
- 		  (unsigned long) name_count, hash_clash_count, longest_clash);
--	  
-+
- 	  if (name_count != buckets_filled + hash_clash_count)
- 	    warn (_("The name_count (%lu) is not the same as the used bucket_count (%lu) + the hash clash count (%lu)"),
- 		  (unsigned long) name_count,
-@@ -10390,7 +10390,7 @@ display_debug_names (struct dwarf_sectio
- 		break;
- 	      if (tagno >= 0)
- 		printf ("%s<%lu>",
--		        (tagno == 0 && second_abbrev_tag == 0 ? " " : "\n\t"),
-+			(tagno == 0 && second_abbrev_tag == 0 ? " " : "\n\t"),
- 			(unsigned long) abbrev_tag);
- 
- 	      for (entry = abbrev_lookup;
-@@ -10919,7 +10919,7 @@ process_cu_tu_index (struct dwarf_sectio
- 	 Check for integer overflow (can occur when size_t is 32-bit)
- 	 with overlarge ncols or nused values.  */
-       if (nused == -1u
--	  || _mul_overflow ((size_t) ncols, 4, &temp)	  
-+	  || _mul_overflow ((size_t) ncols, 4, &temp)
- 	  || _mul_overflow ((size_t) nused + 1, temp, &total)
- 	  || total > (size_t) (limit - ppool))
- 	{
-@@ -10927,7 +10927,7 @@ process_cu_tu_index (struct dwarf_sectio
- 		section->name);
- 	  return 0;
- 	}
--      
-+
-       if (do_display)
- 	{
- 	  printf (_("  Offset table\n"));
-@@ -11431,8 +11431,8 @@ add_separate_debug_file (const char * fi
- 
- static bool
- debuginfod_fetch_separate_debug_info (struct dwarf_section * section,
--                                      char ** filename,
--                                      void * file)
-+				      char ** filename,
-+				      void * file)
- {
-   size_t build_id_len;
-   unsigned char * build_id;
-@@ -11450,14 +11450,14 @@ debuginfod_fetch_separate_debug_info (st
- 
-       filelen = strnlen ((const char *)section->start, section->size);
-       if (filelen == section->size)
--        /* Corrupt debugaltlink.  */
--        return false;
-+	/* Corrupt debugaltlink.  */
-+	return false;
- 
-       build_id = section->start + filelen + 1;
-       build_id_len = section->size - (filelen + 1);
- 
-       if (build_id_len == 0)
--        return false;
-+	return false;
-     }
-   else
-     return false;
-@@ -11469,25 +11469,25 @@ debuginfod_fetch_separate_debug_info (st
- 
-       client = debuginfod_begin ();
-       if (client == NULL)
--        return false;
-+	return false;
- 
-       /* Query debuginfod servers for the target file. If found its path
--         will be stored in filename.  */
-+	 will be stored in filename.  */
-       fd = debuginfod_find_debuginfo (client, build_id, build_id_len, filename);
-       debuginfod_end (client);
- 
-       /* Only free build_id if we allocated space for a hex string
--         in get_build_id ().  */
-+	 in get_build_id ().  */
-       if (build_id_len == 0)
--        free (build_id);
-+	free (build_id);
- 
-       if (fd >= 0)
--        {
--          /* File successfully retrieved. Close fd since we want to
--             use open_debug_file () on filename instead.  */
--          close (fd);
--          return true;
--        }
-+	{
-+	  /* File successfully retrieved. Close fd since we want to
-+	     use open_debug_file () on filename instead.  */
-+	  close (fd);
-+	  return true;
-+	}
-     }
- 
-   return false;
-@@ -11500,7 +11500,7 @@ load_separate_debug_info (const char *
- 			  parse_func_type         parse_func,
- 			  check_func_type         check_func,
- 			  void *                  func_data,
--                          void *                  file ATTRIBUTE_UNUSED)
-+			  void *                  file ATTRIBUTE_UNUSED)
- {
-   const char *   separate_filename;
-   char *         debug_filename;
-@@ -11616,11 +11616,11 @@ load_separate_debug_info (const char *
- 						 & tmp_filename,
- 						 file))
-       {
--        /* File successfully downloaded from server, replace
--           debug_filename with the file's path.  */
--        free (debug_filename);
--        debug_filename = tmp_filename;
--        goto found;
-+	/* File successfully downloaded from server, replace
-+	   debug_filename with the file's path.  */
-+	free (debug_filename);
-+	debug_filename = tmp_filename;
-+	goto found;
-       }
-   }
- #endif
-@@ -11787,12 +11787,12 @@ load_build_id_debug_file (const char * m
-   /* In theory we should extract the contents of the section into
-      a note structure and then check the fields.  For now though
-      just use hard coded offsets instead:
--     
-+
-        Field  Bytes    Contents
- 	NSize  0...3   4
- 	DSize  4...7   8+
- 	Type   8..11   3  (NT_GNU_BUILD_ID)
--        Name   12.15   GNU\0
-+	Name   12.15   GNU\0
- 	Data   16....   */
- 
-   /* FIXME: Check the name size, name and type fields.  */
-@@ -11804,7 +11804,7 @@ load_build_id_debug_file (const char * m
-       warn (_(".note.gnu.build-id data size is too small\n"));
-       return;
-     }
--  
-+
-   if (build_id_size > (section->size - 16))
-     {
-       warn (_(".note.gnu.build-id data size is too bug\n"));
-@@ -12100,10 +12100,6 @@ free_debug_memory (void)
- 
-   free_all_abbrevs ();
- 
--  free (cu_abbrev_map);
--  cu_abbrev_map = NULL;
--  next_free_abbrev_map_entry = 0;
--
-   free (shndx_pool);
-   shndx_pool = NULL;
-   shndx_pool_size = 0;

+ 0 - 95
recipes-devtools/binutils/binutils/0014-CVE-2022-38128-3.patch

@@ -1,95 +0,0 @@
-From 695c6dfe7e85006b98c8b746f3fd5f913c94ebff Mon Sep 17 00:00:00 2001
-From: Alan Modra <amodra@gmail.com>
-Date: Thu, 21 Jul 2022 09:56:15 +0930
-Subject: [PATCH] PR29370, infinite loop in display_debug_abbrev
-
-The PR29370 testcase is a fuzzed object file with multiple
-.trace_abbrev sections.  Multiple .trace_abbrev or .debug_abbrev
-sections are not a violation of the DWARF standard.  The DWARF5
-standard even gives an example of multiple .debug_abbrev sections
-contained in groups.  Caching and lookup of processed abbrevs thus
-needs to be done by section and offset rather than base and offset.
-(Why base anyway?)  Or, since section contents are kept, by a pointer
-into the contents.
-
-	PR 29370
-	* dwarf.c (struct abbrev_list): Replace abbrev_base and
-	abbrev_offset with raw field.
-	(find_abbrev_list_by_abbrev_offset): Delete.
-	(find_abbrev_list_by_raw_abbrev): New function.
-	(process_abbrev_set): Set list->raw and list->next.
-	(find_and_process_abbrev_set): Replace abbrev list lookup with
-	new function.  Don't set list abbrev_base, abbrev_offset or next.
-
-Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=695c6dfe7e85006b98c8b746f3fd5f913c94ebff]
-
-Signed-off-by: Pgowda <pgowda.cve@gmail.com>
----
- binutils/dwarf.c | 19 ++++++-------------
- 1 file changed, 6 insertions(+), 13 deletions(-)
-
-diff --git a/binutils/dwarf.c b/binutils/dwarf.c
-index 2fc352f74c5..99fb3566994 100644
---- a/binutils/dwarf.c
-+++ b/binutils/dwarf.c
-@@ -856,8 +856,7 @@ typedef struct abbrev_list
- {
-   abbrev_entry *        first_abbrev;
-   abbrev_entry *        last_abbrev;
--  dwarf_vma             abbrev_base;
--  dwarf_vma             abbrev_offset;
-+  unsigned char *       raw;
-   struct abbrev_list *  next;
-   unsigned char *       start_of_next_abbrevs;
- }
-@@ -946,14 +945,12 @@ free_all_abbrevs (void)
- }
- 
- static abbrev_list *
--find_abbrev_list_by_abbrev_offset (dwarf_vma abbrev_base,
--				   dwarf_vma abbrev_offset)
-+find_abbrev_list_by_raw_abbrev (unsigned char *raw)
- {
-   abbrev_list * list;
- 
-   for (list = abbrev_lists; list != NULL; list = list->next)
--    if (list->abbrev_base == abbrev_base
--	&& list->abbrev_offset == abbrev_offset)
-+    if (list->raw == raw)
-       return list;
- 
-   return NULL;
-@@ -1040,6 +1037,7 @@ process_abbrev_set (struct dwarf_section
-   abbrev_list *list = xmalloc (sizeof (*list));
-   list->first_abbrev = NULL;
-   list->last_abbrev = NULL;
-+  list->raw = start;
- 
-   while (start < end)
-     {
-@@ -1055,6 +1053,7 @@ process_abbrev_set (struct dwarf_section
- 	 the caller.  */
-       if (start == end || entry == 0)
- 	{
-+	  list->next = NULL;
- 	  list->start_of_next_abbrevs = start != end ? start : NULL;
- 	  return list;
- 	}
-@@ -1144,16 +1143,10 @@ find_and_process_abbrev_set (struct dwar
-   unsigned char *end = section->start + abbrev_base + abbrev_size;
-   abbrev_list *list = NULL;
-   if (free_list)
--    list = find_abbrev_list_by_abbrev_offset (abbrev_base, abbrev_offset);
-+    list = find_abbrev_list_by_raw_abbrev (start);
-   if (list == NULL)
-     {
-       list = process_abbrev_set (section, start, end);
--      if (list)
--	{
--	  list->abbrev_base = abbrev_base;
--	  list->abbrev_offset = abbrev_offset;
--	  list->next = NULL;
--	}
-       if (free_list)
- 	*free_list = list;
-     }

+ 32 - 0
recipes-devtools/binutils/binutils/0014-Remove-duplicate-pe-dll.o-entry-deom-targ_extra_ofil.patch

@@ -0,0 +1,32 @@
+From f0c39effd46d4dec0813276b1903d6deddcd82dc Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 18 Jan 2023 19:35:07 -0800
+Subject: [PATCH] Remove duplicate pe-dll.o entry deom targ_extra_ofiles
+
+Commit c60b3806799abf1d7f6cf5108a1b0e733a950b13 added support for
+aarch64-pe which introduced wrapper over pep-dll.c for x86_64 as well as
+aarch64, on x86_64 it was added but the old object pe-dll.o needs to be
+removed too, otherwise build fails with duplicate symbols from pe-dll.o
+and pep-dll-x86_64.o
+
+Upstream-Status: Submitted [https://sourceware.org/pipermail/binutils/2023-January/125739.html]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+Cc: Jedidiah Thompson <wej22007@outlook.com>
+Cc: Zac Walker <zac.walker@linaro.org>
+---
+ ld/configure.tgt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/ld/configure.tgt b/ld/configure.tgt
+index c62b9581d9b..e78644d04e2 100644
+--- a/ld/configure.tgt
++++ b/ld/configure.tgt
+@@ -1055,7 +1055,7 @@ x86_64-*-cygwin)	targ_emul=i386pep ;
+ 			;;
+ x86_64-*-mingw*)	targ_emul=i386pep ;
+ 			targ_extra_emuls=i386pe
+-			targ_extra_ofiles="deffilep.o pdb.o pep-dll.o pe-dll.o"
++			targ_extra_ofiles="deffilep.o pdb.o pe-dll.o"
+ 			;;
+ x86_64-*-gnu*)		targ_emul=elf_x86_64
+ 			targ_extra_emuls="elf32_x86_64 elf_iamcu elf_i386"

+ 0 - 25
recipes-devtools/binutils/binutils/0015-Automatic-date-update-in-version.in.patch

@@ -1,25 +0,0 @@
-From 7be4c9ff47e6832e6f14ab2a7be5aed537887e98 Mon Sep 17 00:00:00 2001
-From: GDB Administrator <gdbadmin@sourceware.org>
-Date: Sat, 3 Sep 2022 00:00:36 +0000
-Subject: [PATCH 15/20] Automatic date update in version.in
-
----
- bfd/version.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bfd/version.h b/bfd/version.h
-index 88b345b255..13315afbe7 100644
---- a/bfd/version.h
-+++ b/bfd/version.h
-@@ -16,7 +16,7 @@
- 
-    In releases, the date is not included in either version strings or
-    sonames.  */
--#define BFD_VERSION_DATE 20220902
-+#define BFD_VERSION_DATE 20220903
- #define BFD_VERSION @bfd_version@
- #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
- #define REPORT_BUGS_TO @report_bugs_to@
--- 
-2.25.1
-

+ 55 - 0
recipes-devtools/binutils/binutils/0015-gprofng-Fix-build-with-64bit-file-offset-on-32bit-ma.patch

@@ -0,0 +1,55 @@
+From 15936ae7cdfd6814654eff367b5cfb2565ea6af8 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 31 Jul 2023 15:23:38 -0700
+Subject: [PATCH] gprofng: Fix build with 64bit file offset on 32bit machines
+
+gprofng/ChangeLog
+2023-07-31  Khem Raj <raj.khem@gmail.com>
+
+* libcollector/iotrace.c: Define open64, fgetpos64, and fsetpos64
+  only when __USE_LARGEFILE64 and __USE_FILE_OFFSET64 are not
+  defined.
+
+Upstream-Status: Submitted [https://sourceware.org/pipermail/binutils/2023-July/128741.html]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gprofng/libcollector/iotrace.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/gprofng/libcollector/iotrace.c b/gprofng/libcollector/iotrace.c
+index c0ea7497b09..81c844048d9 100644
+--- a/gprofng/libcollector/iotrace.c
++++ b/gprofng/libcollector/iotrace.c
+@@ -1030,8 +1030,9 @@ gprofng_open64 (int(real_open64) (const char *, int, ...),
+   }
+ 
+ DCL_FUNC_VER (DCL_OPEN64, open64_2_2, open64@GLIBC_2.2)
++#if !defined(__USE_LARGEFILE64)
+ DCL_OPEN64 (open64)
+-
++#endif
+ 
+ #define F_ERROR_ARG     0
+ #define F_INT_ARG       1
+@@ -2989,8 +2990,9 @@ DCL_FUNC_VER (DCL_FGETPOS64, fgetpos64_2_17, fgetpos64@GLIBC_2.17)
+ DCL_FUNC_VER (DCL_FGETPOS64, fgetpos64_2_2_5, fgetpos64@GLIBC_2.2.5)
+ DCL_FUNC_VER (DCL_FGETPOS64, fgetpos64_2_2, fgetpos64@GLIBC_2.2)
+ DCL_FUNC_VER (DCL_FGETPOS64, fgetpos64_2_1, fgetpos64@GLIBC_2.1)
++#if !defined(__USE_LARGEFILE64)
+ DCL_FGETPOS64 (fgetpos64)
+-
++#endif
+ /*------------------------------------------------------------- fsetpos */
+ static int
+ gprofng_fsetpos (int(real_fsetpos) (FILE *, const fpos_t *),
+@@ -3087,8 +3089,9 @@ DCL_FUNC_VER (DCL_FSETPOS64, fsetpos64_2_17, fsetpos64@GLIBC_2.17)
+ DCL_FUNC_VER (DCL_FSETPOS64, fsetpos64_2_2_5, fsetpos64@GLIBC_2.2.5)
+ DCL_FUNC_VER (DCL_FSETPOS64, fsetpos64_2_2, fsetpos64@GLIBC_2.2)
+ DCL_FUNC_VER (DCL_FSETPOS64, fsetpos64_2_1, fsetpos64@GLIBC_2.1)
++#if !defined(__USE_LARGEFILE64)
+ DCL_FSETPOS64 (fsetpos64)
+-
++#endif
+ /*------------------------------------------------------------- fsync */
+ int
+ fsync (int fildes)

+ 0 - 25
recipes-devtools/binutils/binutils/0016-Automatic-date-update-in-version.in.patch

@@ -1,25 +0,0 @@
-From 2b7770eadeeeb83cd89a7fe2b48e51cb9773fefa Mon Sep 17 00:00:00 2001
-From: GDB Administrator <gdbadmin@sourceware.org>
-Date: Sun, 4 Sep 2022 00:00:36 +0000
-Subject: [PATCH 16/20] Automatic date update in version.in
-
----
- bfd/version.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bfd/version.h b/bfd/version.h
-index 13315afbe7..901062a13e 100644
---- a/bfd/version.h
-+++ b/bfd/version.h
-@@ -16,7 +16,7 @@
- 
-    In releases, the date is not included in either version strings or
-    sonames.  */
--#define BFD_VERSION_DATE 20220903
-+#define BFD_VERSION_DATE 20220904
- #define BFD_VERSION @bfd_version@
- #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
- #define REPORT_BUGS_TO @report_bugs_to@
--- 
-2.25.1
-

+ 0 - 25
recipes-devtools/binutils/binutils/0017-Automatic-date-update-in-version.in.patch

@@ -1,25 +0,0 @@
-From be7c5384155642c882f85b18f756fdb790e0b6ca Mon Sep 17 00:00:00 2001
-From: GDB Administrator <gdbadmin@sourceware.org>
-Date: Mon, 5 Sep 2022 00:00:53 +0000
-Subject: [PATCH 17/20] Automatic date update in version.in
-
----
- bfd/version.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/bfd/version.h b/bfd/version.h
-index 901062a13e..3af4240477 100644
---- a/bfd/version.h
-+++ b/bfd/version.h
-@@ -16,7 +16,7 @@
- 
-    In releases, the date is not included in either version strings or
-    sonames.  */
--#define BFD_VERSION_DATE 20220904
-+#define BFD_VERSION_DATE 20220905
- #define BFD_VERSION @bfd_version@
- #define BFD_VERSION_STRING  @bfd_version_package@ @bfd_version_string@
- #define REPORT_BUGS_TO @report_bugs_to@
--- 
-2.25.1
-

+ 0 - 24
recipes-devtools/binutils/binutils/0020-fix-a-merge-typo.patch

@@ -1,24 +0,0 @@
-From 3378dfe00fa17aece8de221f2f3b51d06e576752 Mon Sep 17 00:00:00 2001
-From: "max.ma" <max.ma@starfivetech.com>
-Date: Tue, 6 Dec 2022 19:34:57 -0800
-Subject: [PATCH 20/20] fix a merge typo
-
----
- include/opcode/riscv-opc.h | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/include/opcode/riscv-opc.h b/include/opcode/riscv-opc.h
-index b130357392..20a541e503 100644
---- a/include/opcode/riscv-opc.h
-+++ b/include/opcode/riscv-opc.h
-@@ -2869,7 +2869,6 @@ DECLARE_INSN(cbo_clean, MATCH_CBO_CLEAN, MASK_CBO_CLEAN);
- DECLARE_INSN(cbo_flush, MATCH_CBO_FLUSH, MASK_CBO_FLUSH);
- DECLARE_INSN(cbo_inval, MATCH_CBO_INVAL, MASK_CBO_INVAL);
- DECLARE_INSN(cbo_zero, MATCH_CBO_ZERO, MASK_CBO_ZERO);
--DECLARE_INSN(cbo_zero, MATCH_CBO_ZERO, MASK_CBO_ZERO);
- 
- #endif /* DECLARE_INSN */
- #ifdef DECLARE_CSR
--- 
-2.25.1
-

+ 3 - 2
recipes-devtools/binutils/binutils_2.39.bb → recipes-devtools/binutils/binutils_2.41.bb

@@ -1,7 +1,8 @@
 require binutils.inc
 require binutils-${PV}.inc
 
-DEPENDS += "zlib"
+# perl-native for pod2man for man page generation
+DEPENDS += "zlib perl-native"
 
 EXTRA_OECONF += "--with-sysroot=/ \
                 --enable-install-libbfd \
@@ -66,7 +67,7 @@ PACKAGE_BEFORE_PN += "libbfd libopcodes gprofng"
 FILES:libbfd = "${libdir}/libbfd-*.so.* ${libdir}/libbfd-*.so"
 FILES:libopcodes = "${libdir}/libopcodes-*.so.* ${libdir}/libopcodes-*.so"
 FILES:gprofng = "${sysconfdir}/gprofng.rc ${libdir}/gprofng/libgp-*.so ${libdir}/gprofng/libgprofng.so.* ${bindir}/gp-* ${bindir}/gprofng"
-FILES:${PN}-dev += "${libdir}/gprofng/libgprofng.so"
+FILES:${PN}-dev += "${libdir}/libgprofng.so ${libdir}/libsframe.so"
 SRC_URI:append:class-nativesdk =  " file://0003-binutils-nativesdk-Search-for-alternative-ld.so.conf.patch "
 
 USE_ALTERNATIVES_FOR:class-nativesdk = ""

Some files were not shown because too many files changed in this diff