1 --- a/ld/emultempl/elf32.em
2 +++ b/ld/emultempl/elf32.em
3 @@ -1273,6 +1273,8 @@ fragment <<EOF
4 && command_line.rpath == NULL)
6 lib_path = (const char *) getenv ("LD_RUN_PATH");
7 + if ((lib_path) && (strlen (lib_path) == 0))
9 if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
12 @@ -1500,6 +1502,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)