diff options
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch')
-rw-r--r-- | meta/recipes-devtools/binutils/binutils/0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch b/meta/recipes-devtools/binutils/binutils/0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch new file mode 100644 index 0000000000..985911aab1 --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 47e53916e3112391d8bff2b2257dcec0a2426d66 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 10 Mar 2022 21:21:33 -0800 | ||
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 | 5 +++++ | ||
14 | 1 file changed, 5 insertions(+) | ||
15 | |||
16 | diff --git a/ld/ldelf.c b/ld/ldelf.c | ||
17 | index 187b359af86..ad792f02d63 100644 | ||
18 | --- a/ld/ldelf.c | ||
19 | +++ b/ld/ldelf.c | ||
20 | @@ -1130,6 +1130,9 @@ ldelf_handle_dt_needed (struct elf_link_hash_table *htab, | ||
21 | && command_line.rpath == NULL) | ||
22 | { | ||
23 | path = (const char *) getenv ("LD_RUN_PATH"); | ||
24 | + if ((path) && (strlen (path) == 0)) | ||
25 | + path = NULL; | ||
26 | + | ||
27 | if (path | ||
28 | && ldelf_search_needed (path, &n, force, | ||
29 | is_linux, elfsize)) | ||
30 | @@ -1805,6 +1808,8 @@ ldelf_before_allocation (char *audit, char *depaudit, | ||
31 | rpath = command_line.rpath; | ||
32 | if (rpath == NULL) | ||
33 | rpath = (const char *) getenv ("LD_RUN_PATH"); | ||
34 | + if ((rpath) && (strlen (rpath) == 0)) | ||
35 | + rpath = NULL; | ||
36 | |||
37 | for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next) | ||
38 | if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) | ||