OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.8 KiB

  1. #!/bin/sh -e
  2. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # Filename: package/.../uclibc/pkg_patch/binutils/300-012_check_ldrunpath_length.patch
  6. # Copyright (C) 2006 - 2009 The OpenSDE Project
  7. # Copyright (C) 2004 - 2006 The T2 SDE Project
  8. #
  9. # More information can be found in the files COPYING and README.
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. # --- SDE-COPYRIGHT-NOTE-END ---
  18. Description: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
  19. cases where -rpath isn't specified. (see Debian Bug #151024)
  20. Original Author: Chris Chimelis <chris@debian.org>
  21. diff -ruN binutils-2.20.51.0.3-orig/ld/emultempl/elf32.em binutils-2.20.51.0.3/ld/emultempl/elf32.em
  22. --- binutils-2.20.51.0.3-orig/ld/emultempl/elf32.em 2009-11-11 17:53:30.000000000 +0100
  23. +++ binutils-2.20.51.0.3/ld/emultempl/elf32.em 2009-12-09 11:38:11.000000000 +0100
  24. @@ -1250,6 +1250,8 @@
  25. && command_line.rpath == NULL)
  26. {
  27. lib_path = (const char *) getenv ("LD_RUN_PATH");
  28. + if ((lib_path) && (strlen (lib_path) == 0))
  29. + lib_path = NULL;
  30. if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
  31. force))
  32. break;
  33. @@ -1476,6 +1478,8 @@
  34. rpath = command_line.rpath;
  35. if (rpath == NULL)
  36. rpath = (const char *) getenv ("LD_RUN_PATH");
  37. + if ((rpath) && (strlen (rpath) == 0))
  38. + rpath = NULL;
  39. for (abfd = link_info.input_bfds; abfd; abfd = abfd->link_next)
  40. {