• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/binutils/2.28.1/0500-add-sysroot-fix-from-bug-3049.patch
Thomas PetazzoniThomas Petazzoni committed 172d471488d29 Jul 2017
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
From 30628870e583375f8927c04398c7219c6e9f703c Mon Sep 17 00:00:00 2001
2
From: Romain Naour <romain.naour@gmail.com>
3
Date: Fri, 25 Dec 2015 11:42:48 +0100
4
Subject: [PATCH] add sysroot fix from bug #3049
5
​
6
Always try to prepend the sysroot prefix to absolute filenames first.
7
​
8
http://bugs.gentoo.org/275666
9
http://sourceware.org/bugzilla/show_bug.cgi?id=10340
10
​
11
Signed-off-by: Sven Rebhan <odinshorse@googlemail.com>
12
[Romain: rebase on top of 2.26]
13
Signed-off-by: Romain Naour <romain.naour@gmail.com>
14
---
15
 ld/ldfile.c | 11 +++++++++--
16
 1 file changed, 9 insertions(+), 2 deletions(-)
17
​
18
diff --git a/ld/ldfile.c diff --git b/ld/ldfile.c
19
--- a/ld/ldfile.c   2017-03-02 03:23:54.000000000 -0500
20
+++ b/ld/ldfile.c   2017-03-20 09:52:27.687415942 -0400
21
@@ -336,18 +336,24 @@
22
      directory first.  */
23
   if (!entry->flags.maybe_archive)
24
     {
25
-      if (entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename))
26
+     /* For absolute pathnames, try to always open the file in the
27
+    sysroot first. If this fails, try to open the file at the
28
+    given location.  */
29
+     entry->flags.sysrooted = is_sysrooted_pathname (entry->filename);
30
+     if (!entry->flags.sysrooted && IS_ABSOLUTE_PATH (entry->filename)
31
+     && ld_sysroot)
32
    {
33
      char *name = concat (ld_sysroot, entry->filename,
34
                   (const char *) NULL);
35
      if (ldfile_try_open_bfd (name, entry))
36
        {
37
          entry->filename = name;
38
+         entry->flags.sysrooted = TRUE;
39
          return TRUE;
40
        }
41
      free (name);
42
    }
43
-      else if (ldfile_try_open_bfd (entry->filename, entry))
44
+      if (ldfile_try_open_bfd (entry->filename, entry))
45
    return TRUE;
46
 
47
       if (IS_ABSOLUTE_PATH (entry->filename))
48
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.