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.

64 lines
2.4 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 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. ## 012_check_ldrunpath_length.dpatch by Chris Chimelis <chris@debian.org>
  19. ##
  20. ## All lines beginning with `## DP:' are a description of the patch.
  21. ## DP: Only generate an RPATH entry if LD_RUN_PATH is not empty, for
  22. ## DP: cases where -rpath isn't specified. (#151024)
  23. if [ $# -ne 1 ]; then
  24. echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
  25. exit 1
  26. fi
  27. [ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
  28. patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
  29. case "$1" in
  30. -patch) patch $patch_opts -p1 < $0;;
  31. -unpatch) patch $patch_opts -p1 -R < $0;;
  32. *)
  33. echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
  34. exit 1;;
  35. esac
  36. exit 0
  37. @DPATCH@
  38. diff -urNad /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em binutils-2.15/ld/emultempl/elf32.em
  39. --- /home/james/debian/packages/binutils/new/binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:58.000000000 +0100
  40. +++ binutils-2.15/ld/emultempl/elf32.em 2004-05-21 23:12:59.000000000 +0100
  41. @@ -692,6 +692,8 @@
  42. && command_line.rpath == NULL)
  43. {
  44. lib_path = (const char *) getenv ("LD_RUN_PATH");
  45. + if ((lib_path) && (strlen (lib_path) == 0))
  46. + lib_path = NULL;
  47. if (gld${EMULATION_NAME}_search_needed (lib_path, &n,
  48. force))
  49. break;
  50. @@ -871,6 +873,8 @@
  51. rpath = command_line.rpath;
  52. if (rpath == NULL)
  53. rpath = (const char *) getenv ("LD_RUN_PATH");
  54. + if ((rpath) && (strlen (rpath) == 0))
  55. + rpath = NULL;
  56. if (! (bfd_elf_size_dynamic_sections
  57. (output_bfd, command_line.soname, rpath,
  58. command_line.filter_shlib,