]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/blob
9abd85538fb6ff590aad0fabca812b869fb0cc84
[thirdparty/openembedded/openembedded-core.git] /
1 From fecc7af84b2735fad82da304fce37f373d2c0f53 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 f6f3ac11a76..77442fdc964 100644
18 --- a/ld/ldelf.c
19 +++ b/ld/ldelf.c
20 @@ -1134,6 +1134,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 @@ -1811,6 +1814,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)