binutils: Upgrade to binutils 2.42

Release Notes are here [1]

[1] https://sourceware.org/pipermail/binutils/2024-January/132213.html

(From OE-Core rev: 795af50ed4005c097069a65f67eb604da9f41b92)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Khem Raj
2024-02-02 16:27:29 -08:00
committed by Richard Purdie
parent 17a2c6e38d
commit b0e5542e7a
22 changed files with 1299 additions and 1461 deletions

View File

@@ -18,7 +18,7 @@ PREFERRED_PROVIDER_virtual/gettext ??= "gettext"
GCCVERSION ?= "13.%"
SDKGCCVERSION ?= "${GCCVERSION}"
BINUVERSION ?= "2.41%"
BINUVERSION ?= "2.42%"
GDBVERSION ?= "14.%"
GLIBCVERSION ?= "2.38%"
LINUXLIBCVERSION ?= "6.6%"

View File

@@ -12,13 +12,13 @@ LIC_FILES_CHKSUM="\
# 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"
PV = "2.42"
CVE_VERSION = "2.42"
SRCBRANCH ?= "binutils-2_42-branch"
UPSTREAM_CHECK_GITTAGREGEX = "binutils-(?P<pver>\d+_(\d_?)*)"
SRCREV ?= "c1321df4eb0a136304205085cd4913dd4eb01054"
SRCREV ?= "42cde237366398f6e318232f4ce080bef42f0371"
BINUTILS_GIT_URI ?= "git://sourceware.org/git/binutils-gdb.git;branch=${SRCBRANCH};protocol=https"
SRC_URI = "\
${BINUTILS_GIT_URI} \
@@ -33,6 +33,5 @@ SRC_URI = "\
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"

View File

@@ -1,4 +1,4 @@
From 95e23fba624c90d0e62c1adaf2bcc4f3cd3175c0 Mon Sep 17 00:00:00 2001
From 07237f83e4bfefab6473ed7c7b601d9d23b11edd 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,7 +21,7 @@ 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 b94855f8662..51f2d74d79d 100644
index b43ae841a6c..6101a95195b 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -5102,7 +5102,7 @@ Layout::create_interp(const Target* target)
@@ -34,10 +34,10 @@ index b94855f8662..51f2d74d79d 100644
Output_section_data* odata = new Output_data_const(interp, len, 1);
diff --git a/ld/genscripts.sh b/ld/genscripts.sh
index 382bd07ffe2..9fbd0c4cb8a 100755
index d6ceb3fe4f5..365c0e778cc 100755
--- a/ld/genscripts.sh
+++ b/ld/genscripts.sh
@@ -304,6 +304,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
@@ -298,6 +298,7 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
LD_FLAG=r
DATA_ALIGNMENT=${DATA_ALIGNMENT_r}
DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
@@ -45,7 +45,7 @@ index 382bd07ffe2..9fbd0c4cb8a 100755
( echo "/* Script for -r */"
source_sh ${CUSTOMIZER_SCRIPT}
source_sh ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
@@ -312,10 +313,12 @@ DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
@@ -306,10 +307,12 @@ DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
LD_FLAG=u
DATA_ALIGNMENT=${DATA_ALIGNMENT_u}
CONSTRUCTING=" "
@@ -59,10 +59,10 @@ index 382bd07ffe2..9fbd0c4cb8a 100755
DATA_ALIGNMENT=${DATA_ALIGNMENT_}
RELOCATING=" "
diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index 1e3c5aa8504..b8d1977b3f0 100644
index fae7c2ad71c..7fe37eb1874 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
@@ -148,8 +148,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then
@@ -150,8 +150,8 @@ if test -z "$DATA_SEGMENT_ALIGN"; then
DATA_SEGMENT_RELRO_END=". = DATA_SEGMENT_RELRO_END (${SEPARATE_GOTPLT-0}, .);"
fi
fi

View File

@@ -1,4 +1,4 @@
From 2b3017e7dab4d929d3ab664c5e6f94226b0a6d31 Mon Sep 17 00:00:00 2001
From 4988a5a42289e43ab0fbd87793f293e263dc3dc1 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,10 +22,10 @@ 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 9fbd0c4cb8a..6be07038c9b 100755
index 365c0e778cc..b0893fda3c5 100755
--- a/ld/genscripts.sh
+++ b/ld/genscripts.sh
@@ -235,31 +235,6 @@ append_to_lib_path()
@@ -229,31 +229,6 @@ append_to_lib_path()
fi
}

View File

@@ -1,4 +1,4 @@
From c00ead7264dc1335cb43222cb742b95614666be8 Mon Sep 17 00:00:00 2001
From a0047134327e312a22f798bd328becf4053a6973 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,38 +29,38 @@ 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 c3adbb0ccad..ce0f7e7f85d 100644
index f9ee05b1400..07801c2c3ac 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -42,7 +42,8 @@ ZLIBINC = @zlibinc@
ELF_CLFAGS=-DELF_LIST_OPTIONS=@elf_list_options@ \
ELF_CFLAGS=-DELF_LIST_OPTIONS=@elf_list_options@ \
-DELF_SHLIB_LIST_OPTIONS=@elf_shlib_list_options@ \
- -DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@
+ -DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@ \
+ -DSYSCONFDIR="\"$(sysconfdir)\""
WARN_CFLAGS = @WARN_CFLAGS@
NO_WERROR = @NO_WERROR@
AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) $(JANSSON_CFLAGS) $(ZSTD_CFLAGS)
AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS) $(JANSSON_CFLAGS) $(ZSTD_CFLAGS)
diff --git a/ld/Makefile.in b/ld/Makefile.in
index d1a56026437..9d86aed12c6 100644
index abb0565718f..6329a12a0d6 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -566,7 +566,8 @@ ZLIB = @zlibdir@ -lz
@@ -576,7 +576,8 @@ ZLIB = @zlibdir@ -lz
ZLIBINC = @zlibinc@
ELF_CLFAGS = -DELF_LIST_OPTIONS=@elf_list_options@ \
ELF_CFLAGS = -DELF_LIST_OPTIONS=@elf_list_options@ \
-DELF_SHLIB_LIST_OPTIONS=@elf_shlib_list_options@ \
- -DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@
+ -DELF_PLT_UNWIND_LIST_OPTIONS=@elf_plt_unwind_list_options@ \
+ -DSYSCONFDIR="\"$(sysconfdir)\""
AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) $(JANSSON_CFLAGS) $(ZSTD_CFLAGS)
AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS) $(JANSSON_CFLAGS) $(ZSTD_CFLAGS)
diff --git a/ld/ldelf.c b/ld/ldelf.c
index f9a6819366f..1519f8ac4e5 100644
index 2852851dcd5..187b359af86 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,
@@ -939,7 +939,7 @@ ldelf_check_ld_so_conf (const struct bfd_link_needed_list *l, int force,
info.path = NULL;
info.len = info.alloc = 0;
@@ -70,7 +70,7 @@ index f9a6819366f..1519f8ac4e5 100644
if (!ldelf_parse_ld_so_conf (&info, tmppath))
{
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 06ac2c64fa8..5c38e8cd313 100644
index e90c2021b33..01b306e58a1 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -69,6 +69,7 @@ char *program_name;
@@ -82,7 +82,7 @@ index 06ac2c64fa8..5c38e8cd313 100644
/* The canonical representation of ld_sysroot. */
char *ld_canon_sysroot;
diff --git a/ld/ldmain.h b/ld/ldmain.h
index dda124b96e8..ba06a7d7be2 100644
index 0238aed0ebd..2dd00db13b3 100644
--- a/ld/ldmain.h
+++ b/ld/ldmain.h
@@ -23,6 +23,7 @@

View File

@@ -1,4 +1,4 @@
From d2d1281b0b76f96c64a2043772c52c85f58994d5 Mon Sep 17 00:00:00 2001
From 1647f124bf0b48ca90189ecbd9ddd4b2c348ce03 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 ce0f7e7f85d..2e36ab4efc4 100644
index 07801c2c3ac..a2bcffecf73 100644
--- a/ld/Makefile.am
+++ b/ld/Makefile.am
@@ -51,7 +51,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) $(JANSSON_CFLAGS) $(ZSTD_CFLAGS)
@@ -51,7 +51,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS) $(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 ce0f7e7f85d..2e36ab4efc4 100644
EMUL = @EMUL@
EMULATION_OFILES = @EMULATION_OFILES@
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 9d86aed12c6..c21c554e432 100644
index 6329a12a0d6..15311048855 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -574,7 +574,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) $(JANSSON_CFLAGS) $(ZSTD_CFLAGS)
@@ -584,7 +584,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS) $(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.

View File

@@ -1,4 +1,4 @@
From 5564cdf1433255a00acb427fb5b0656b772b2651 Mon Sep 17 00:00:00 2001
From 1e09d056a802c0d12bdf31aceead3725b69bd626 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 f9fbba23e2c..93495e45d6f 100644
index 85c4b6b6ef8..cb6e91c8f9b 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -385,7 +385,8 @@ install-strip: install

View File

@@ -1,4 +1,4 @@
From 41b09c6a9d78a31db0f3c70d27c05475292bde7e Mon Sep 17 00:00:00 2001
From 7a6074edd927273ae6924dc676ca2fdf127ce542 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
@@ -63,10 +63,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
9 files changed, 87 insertions(+), 2 deletions(-)
diff --git a/ld/config.in b/ld/config.in
index ad0dc6a106c..d21edaddce7 100644
index 52d62f06ff0..b5944e7ba55 100644
--- a/ld/config.in
+++ b/ld/config.in
@@ -58,6 +58,9 @@
@@ -70,6 +70,9 @@
language is requested. */
#undef ENABLE_NLS
@@ -77,10 +77,10 @@ index ad0dc6a106c..d21edaddce7 100644
#undef EXTRA_SHLIB_EXTENSION
diff --git a/ld/configure b/ld/configure
index 1503936432f..29896853a90 100755
index add770f883c..867f3f62c88 100755
--- a/ld/configure
+++ b/ld/configure
@@ -839,6 +839,7 @@ with_lib_path
@@ -844,6 +844,7 @@ with_lib_path
enable_targets
enable_64_bit_bfd
with_sysroot
@@ -88,7 +88,7 @@ index 1503936432f..29896853a90 100755
enable_gold
enable_got
enable_compressed_debug_sections
@@ -1521,6 +1522,8 @@ Optional Features:
@@ -1534,6 +1535,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 1503936432f..29896853a90 100755
--enable-gold[=ARG] build gold [ARG={default,yes,no}]
--enable-got=<type> GOT handling scheme (target, single, negative,
multigot)
@@ -15483,6 +15486,19 @@ fi
@@ -15566,6 +15569,19 @@ fi
@@ -118,7 +118,7 @@ index 1503936432f..29896853a90 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 77edac3258c..a74dac63038 100644
index 4a11787ae71..104a531fb0f 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -103,6 +103,16 @@ AC_SUBST(use_sysroot)
@@ -139,10 +139,10 @@ index 77edac3258c..a74dac63038 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 a0f8a15c7a9..e3db345f3a5 100644
index 54d9079678c..9f0163b2911 100644
--- a/ld/ld.h
+++ b/ld/ld.h
@@ -163,6 +163,14 @@ typedef struct
@@ -166,6 +166,14 @@ typedef struct
in the linker script. */
bool force_group_allocation;
@@ -158,11 +158,11 @@ index a0f8a15c7a9..e3db345f3a5 100644
enum endian_enum endian;
diff --git a/ld/ld.texi b/ld/ld.texi
index aa8b1aa86eb..9bc4bc28823 100644
index 4fda259a552..22685f5f1dd 100644
--- a/ld/ld.texi
+++ b/ld/ld.texi
@@ -3059,6 +3059,18 @@ creation of the metadata note, if one had been enabled by an earlier
occurrence of the --package-metdata option.
@@ -3119,6 +3119,18 @@ creation of the metadata note, if one had been enabled by an earlier
occurrence of the --package-metadata option.
If the linker has been built with libjansson, then the JSON string
will be validated.
+
@@ -181,7 +181,7 @@ index aa8b1aa86eb..9bc4bc28823 100644
@c man end
diff --git a/ld/ldfile.c b/ld/ldfile.c
index df7c9cbd65e..0c965593225 100644
index dc9875d8813..49d899ee49d 100644
--- a/ld/ldfile.c
+++ b/ld/ldfile.c
@@ -327,6 +327,23 @@ ldfile_add_library_path (const char *name, bool cmdline)
@@ -209,7 +209,7 @@ index df7c9cbd65e..0c965593225 100644
/* Try to open a BFD for a lang_input_statement. */
diff --git a/ld/ldlex.h b/ld/ldlex.h
index 87cac02141d..d1a478fb827 100644
index 161a9d4d8dc..757fe2f7650 100644
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
@@ -147,6 +147,8 @@ enum option_values
@@ -222,7 +222,7 @@ index 87cac02141d..d1a478fb827 100644
OPTION_PRINT_OUTPUT_FORMAT,
OPTION_PRINT_SYSROOT,
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 5c38e8cd313..04eed320aca 100644
index 01b306e58a1..eddefc24332 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -326,6 +326,8 @@ main (int argc, char **argv)
@@ -253,10 +253,10 @@ index 5c38e8cd313..04eed320aca 100644
{
if (error_count < MAX_ERRORS_IN_A_ROW)
diff --git a/ld/lexsup.c b/ld/lexsup.c
index fe8722313fe..1df7af3ccaa 100644
index 099dff8ecde..e9939000b2e 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -629,6 +629,14 @@ static const struct ld_option ld_options[] =
@@ -642,6 +642,14 @@ static const struct ld_option ld_options[] =
" <method> is: share-unconflicted (default),\n"
" share-duplicated"),
TWO_DASHES },
@@ -271,7 +271,7 @@ index fe8722313fe..1df7af3ccaa 100644
};
#define OPTION_COUNT ARRAY_SIZE (ld_options)
@@ -1787,6 +1795,13 @@ parse_args (unsigned argc, char **argv)
@@ -1818,6 +1826,13 @@ parse_args (unsigned argc, char **argv)
case OPTION_PRINT_MAP_LOCALS:
config.print_map_locals = true;

View File

@@ -1,4 +1,4 @@
From 7f04e82ac2ded9a7f68dba9fabf1251d680bd0b9 Mon Sep 17 00:00:00 2001
From 9784134b2670b284fb4d31360964a14d1e9a070d 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,7 +14,7 @@ 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 37f1aeb780c..45774c7cf79 100644
index e55bfe846cd..66b37e36e6f 100644
--- a/opcodes/ppc-opc.c
+++ b/opcodes/ppc-opc.c
@@ -7138,8 +7138,6 @@ const struct powerpc_opcode powerpc_opcodes[] = {

View File

@@ -1,4 +1,4 @@
From 73d1af65ccfed87662342274d9ec33900786beb3 Mon Sep 17 00:00:00 2001
From 37a395151679d74c98a23ad5c39ed02009487f9c 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
@@ -19,7 +19,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/ltmain.sh b/ltmain.sh
index 70e856e0659..11ee684cccf 100644
index 7f7104ffc82..f59eb4aa631 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -8035,9 +8035,11 @@ EOF

View File

@@ -1,4 +1,4 @@
From da9dc36e90c6cf7d3d3bf6f4e337261a93d63428 Mon Sep 17 00:00:00 2001
From 8c2788cee8eb69c8bde5778129a6b66287868c3b 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
@@ -26,7 +26,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 28 insertions(+), 6 deletions(-)
diff --git a/ltmain.sh b/ltmain.sh
index 11ee684cccf..3b19ac15328 100644
index f59eb4aa631..ce97db42ce7 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -8053,8 +8053,16 @@ EOF

View File

@@ -1,4 +1,4 @@
From f6105e5202180627e9690884d483fd5b7dc28652 Mon Sep 17 00:00:00 2001
From 11bbb4f62b0f914f59f3f01a9d835930f9eb1122 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 9cb953a197e..b63b5cd3de0 100755
index 670684d83d1..f9ba1c0a4f7 100755
--- a/configure
+++ b/configure
@@ -5460,7 +5460,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
@@ -5432,7 +5432,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -31,10 +31,10 @@ index 9cb953a197e..b63b5cd3de0 100755
#endif
int main() {}
diff --git a/configure.ac b/configure.ac
index e95a9ed116e..2df870b86af 100644
index 88b4800e298..6cd4530db56 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1444,7 +1444,7 @@ if test "$GCC" = yes; then
@@ -1410,7 +1410,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([

View File

@@ -1,4 +1,4 @@
From 13cbec5bc5c75dd4c3e1d5f3ca80e5b64f7116d1 Mon Sep 17 00:00:00 2001
From 65c8ea481cda572b60d0949648df912e616d3884 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,10 +14,10 @@ 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 1519f8ac4e5..2a7c76dc29c 100644
index 187b359af86..ad792f02d63 100644
--- a/ld/ldelf.c
+++ b/ld/ldelf.c
@@ -1127,6 +1127,9 @@ ldelf_handle_dt_needed (struct elf_link_hash_table *htab,
@@ -1130,6 +1130,9 @@ ldelf_handle_dt_needed (struct elf_link_hash_table *htab,
&& command_line.rpath == NULL)
{
path = (const char *) getenv ("LD_RUN_PATH");
@@ -27,7 +27,7 @@ index 1519f8ac4e5..2a7c76dc29c 100644
if (path
&& ldelf_search_needed (path, &n, force,
is_linux, elfsize))
@@ -1802,6 +1805,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
@@ -1805,6 +1808,8 @@ ldelf_before_allocation (char *audit, char *depaudit,
rpath = command_line.rpath;
if (rpath == NULL)
rpath = (const char *) getenv ("LD_RUN_PATH");

View File

@@ -1,4 +1,4 @@
From 9d451ca9ca6bf34b43a089033565ae7570db2065 Mon Sep 17 00:00:00 2001
From ad6942752570199d3959e344c432bc92d9fc43ad 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
@@ -25,10 +25,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
1 file changed, 10 insertions(+)
diff --git a/libiberty/sha1.c b/libiberty/sha1.c
index 6c71e3ebb41..a2caf947d31 100644
index 49e8e0b6c2b..72de5cc8ad6 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)
@@ -234,7 +234,17 @@ sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx)
if (len >= 64)
{
#if !_STRING_ARCH_unaligned

View File

@@ -1,4 +1,4 @@
From f0c39effd46d4dec0813276b1903d6deddcd82dc Mon Sep 17 00:00:00 2001
From 6a21059fb86423304358693a200f1ad568cd6699 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
@@ -18,10 +18,10 @@ Cc: Zac Walker <zac.walker@linaro.org>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ld/configure.tgt b/ld/configure.tgt
index c62b9581d9b..e78644d04e2 100644
index f937f78b876..830613744c2 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -1055,7 +1055,7 @@ x86_64-*-cygwin) targ_emul=i386pep ;
@@ -1067,7 +1067,7 @@ x86_64-*-cygwin) targ_emul=i386pep ;
;;
x86_64-*-mingw*) targ_emul=i386pep ;
targ_extra_emuls=i386pe

View File

@@ -1,55 +0,0 @@
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)