1 --- a/ld/emultempl/elf32.em
2 +++ b/ld/emultempl/elf32.em
3 @@ -1470,6 +1470,8 @@ fragment <<EOF
4 && command_line.rpath == NULL)
6 path = (const char *) getenv ("LD_RUN_PATH");
7 + if ((path) && (strlen (path) == 0))
10 && gld${EMULATION_NAME}_search_needed (path, &n, force))
12 @@ -1750,6 +1752,8 @@ gld${EMULATION_NAME}_before_allocation (
13 rpath = command_line.rpath;
15 rpath = (const char *) getenv ("LD_RUN_PATH");
16 + if ((rpath) && (strlen (rpath) == 0))
19 for (abfd = link_info.input_bfds; abfd; abfd = abfd->link.next)
20 if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)