python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / binutils / 2.25.1 / 500-sysroot.patch
blobe49c795332a6975def397087985efd80f5cf72c1
1 Signed-off-by: Sven Rebhan <odinshorse@googlemail.com>
3 Always try to prepend the sysroot prefix to absolute filenames first.
5 http://bugs.gentoo.org/275666
6 http://sourceware.org/bugzilla/show_bug.cgi?id=10340
8 --- a/ld/ldfile.c
9 +++ b/ld/ldfile.c
10 @@ -308,18 +308,25 @@
11 directory first. */
12 if (! entry->flags.maybe_archive)
14 - if (entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename))
15 + /* For absolute pathnames, try to always open the file in the
16 + sysroot first. If this fails, try to open the file at the
17 + given location. */
18 + entry->flags.sysrooted = is_sysrooted_pathname (entry->filename);
19 + if (!entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename)
20 + && ld_sysroot)
22 char *name = concat (ld_sysroot, entry->filename,
23 (const char *) NULL);
24 if (ldfile_try_open_bfd (name, entry))
26 entry->filename = name;
27 + entry->flags.sysrooted = TRUE;
28 return TRUE;
30 free (name);
32 - else if (ldfile_try_open_bfd (entry->filename, entry))
34 + if (ldfile_try_open_bfd (entry->filename, entry))
35 return TRUE;
37 if (IS_ABSOLUTE_PATH (entry->filename))