diff options
author | 2022-02-09 18:00:29 (GMT) | |
---|---|---|
committer | 2022-02-13 07:47:12 (GMT) | |
commit | ba680a3e5b8c62a7c1554e71f6d09903dac95a2f (patch) | |
tree | 7ae47b96f1061863b18f0a1e5f84a1d31cafc10e /packages/binutils/2.38/0006-sysroot.patch | |
parent | c5565f175aa0d5b25d47c839610bab6f9ee999a1 (diff) |
packages/binutils: add binutils-2.38
Binutils version 2.38 has been released
https://www.phoronix.com/scan.php?page=news_item&px=GNU-Binutils-2.38
https://sourceware.org/pipermail/binutils/2022-February/119721.html
Patches 0000 to 0008 from binutils-2.37 applied clean, so forward ported
them.
The following patches are now applied from upstream, hence dropped:
0010-change-uint-to-unsigned.patch
0011-bfd-close-the-file-descriptor-if-there-is-no-archive-fd.patch
0012-pr28391-strip-objcopy-preserve-dates-a-cannot-set-time.patch
0013-ld-pru-fix-resource_table-output-section-alignment.patch
0014-pr28422-build_id-use-after-free.patch
0015-pr28459-readelf-issues-bogus-warning.patch
0016-pr28417-std-string-no-longer-allows-accepting-nullptr_t.patch
0017-pr28540-segmentation-fault-on-NULL-byte_get.patch
0018-gold-place-note-gnu-property-section-before-other-note-sections.patch
0019-waddress-warning-in-ldelf.c.patch
Signed-off-by: Hans-Christian Noren Egtvedt <hegtvedt@cisco.com>
Diffstat (limited to 'packages/binutils/2.38/0006-sysroot.patch')
-rw-r--r-- | packages/binutils/2.38/0006-sysroot.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/packages/binutils/2.38/0006-sysroot.patch b/packages/binutils/2.38/0006-sysroot.patch new file mode 100644 index 0000000..3b3c0ec --- /dev/null +++ b/packages/binutils/2.38/0006-sysroot.patch @@ -0,0 +1,41 @@ +Signed-off-by: Sven Rebhan <odinshorse@googlemail.com> + +Always try to prepend the sysroot prefix to absolute filenames first. + +http://bugs.gentoo.org/275666 +http://sourceware.org/bugzilla/show_bug.cgi?id=10340 + +--- + ld/ldfile.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +--- a/ld/ldfile.c ++++ b/ld/ldfile.c +@@ -340,18 +340,25 @@ + directory first. */ + if (!entry->flags.maybe_archive) + { +- if (entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename)) ++ /* For absolute pathnames, try to always open the file in the ++ sysroot first. If this fails, try to open the file at the ++ given location. */ ++ entry->flags.sysrooted = is_sysrooted_pathname (entry->filename); ++ if (!entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename) ++ && ld_sysroot) + { + char *name = concat (ld_sysroot, entry->filename, + (const char *) NULL); + if (ldfile_try_open_bfd (name, entry)) + { + entry->filename = name; ++ entry->flags.sysrooted = true; + return true; + } + free (name); + } +- else if (ldfile_try_open_bfd (entry->filename, entry)) ++ ++ if (ldfile_try_open_bfd (entry->filename, entry)) + return true; + + if (IS_ABSOLUTE_PATH (entry->filename)) |