]> code.ossystems Code Review - openembedded-core.git/blob
214ae06344b3c8da7424fed2366aed6459c6c486
[openembedded-core.git] /
1 From 65fb7a33aba30dec8690e0a237efaa3b9649154c 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/emultempl/elf32.em | 4 ++++
14  1 file changed, 4 insertions(+)
15
16 --- a/ld/emultempl/elf32.em
17 +++ b/ld/emultempl/elf32.em
18 @@ -1470,6 +1470,8 @@ fragment <<EOF
19               && command_line.rpath == NULL)
20             {
21               path = (const char *) getenv ("LD_RUN_PATH");
22 +             if ((path) && (strlen (path) == 0))
23 +               path = NULL;
24               if (path
25                   && gld${EMULATION_NAME}_search_needed (path, &n, force))
26                 break;
27 @@ -1745,6 +1747,8 @@ gld${EMULATION_NAME}_before_allocation (
28    rpath = command_line.rpath;
29    if (rpath == NULL)
30      rpath = (const char *) getenv ("LD_RUN_PATH");
31 +  if ((rpath) && (strlen (rpath) == 0))
32 +    rpath = NULL;
33  
34    for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
35      if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)