diff options
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/0006-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch')
-rw-r--r-- | meta/recipes-devtools/binutils/binutils/0006-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/0006-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch b/meta/recipes-devtools/binutils/binutils/0006-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch new file mode 100644 index 0000000000..d920729204 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/0006-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From 13791636abf518f0db209dc51c29445d80421f2e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 2 Mar 2015 01:27:17 +0000 | ||
4 | Subject: [PATCH] Only generate an RPATH entry if LD_RUN_PATH is not empty | ||
5 | |||
6 | for cases where -rpath isn't specified. debian (#151024) | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Chris Chimelis <chris@debian.org> | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | ld/ldelf.c | 4 ++++ | ||
14 | 1 file changed, 4 insertions(+) | ||
15 | |||
16 | diff --git a/ld/ldelf.c b/ld/ldelf.c | ||
17 | index a095d6aac5..a2455a8793 100644 | ||
18 | --- a/ld/ldelf.c | ||
19 | +++ b/ld/ldelf.c | ||
20 | @@ -1229,6 +1229,8 @@ ldelf_after_open (int use_libpath, int native, int is_linux, int is_freebsd, | ||
21 | && command_line.rpath == NULL) | ||
22 | { | ||
23 | path = (const char *) getenv ("LD_RUN_PATH"); | ||
24 | + if ((path) && (strlen (path) == 0)) | ||
25 | + path = NULL; | ||
26 | if (path | ||
27 | && ldelf_search_needed (path, &n, force, | ||
28 | is_linux, elfsize)) | ||
29 | @@ -1573,6 +1575,8 @@ ldelf_before_allocation (char *audit, char *depaudit, | ||
30 | rpath = command_line.rpath; | ||
31 | if (rpath == NULL) | ||
32 | rpath = (const char *) getenv ("LD_RUN_PATH"); | ||
33 | + if ((rpath) && (strlen (rpath) == 0)) | ||
34 | + rpath = NULL; | ||
35 | |||
36 | for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next) | ||
37 | if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) | ||