0002-binutils-cross-Do-not-generate-linker-script-directo.patch 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. From fd7065bfd20364679e3c3f329b19059bbc51ab02 Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Mon, 6 Mar 2017 23:37:05 -0800
  4. Subject: [PATCH] binutils-cross: Do not generate linker script directories
  5. We don't place target libraries within ${exec_prefix}, we'd always place these
  6. within the target sysroot within the standard library directories. Worse, the
  7. append_to_lib_path code prefixes these paths with the sysroot which makes even
  8. less sense.
  9. These directories therefore don't make sense in our case and mean we have to
  10. relocate all the linker scripts if they're present. Dropping them
  11. gives a reasonable performance improvement/simplification.
  12. Upstream-Status: Inappropriate
  13. RP 2017/01/30
  14. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  15. ---
  16. ld/genscripts.sh | 25 -------------------------
  17. 1 file changed, 25 deletions(-)
  18. diff --git a/ld/genscripts.sh b/ld/genscripts.sh
  19. index 0c52ebee4d0..1acbe66bd2e 100755
  20. --- a/ld/genscripts.sh
  21. +++ b/ld/genscripts.sh
  22. @@ -235,31 +235,6 @@ append_to_lib_path()
  23. fi
  24. }
  25. -# Always search $(tooldir)/lib, aka /usr/local/TARGET/lib when native
  26. -# except when LIBPATH=":".
  27. -if [ "${LIB_PATH}" != ":" ] ; then
  28. - libs=
  29. - if [ "x${TOOL_LIB}" = "x" ] ; then
  30. - if [ "x${NATIVE}" = "xyes" ] ; then
  31. - libs="${exec_prefix}/${target_alias}/lib"
  32. - fi
  33. - else
  34. - # For multilib'ed targets, ensure both ${target_alias}/lib${LIBPATH_SUFFIX}
  35. - # and ${TOOL_LIB}/lib${LIBPATH_SUFFIX} are in the default search path,
  36. - # because 64bit libraries may be in both places, depending on
  37. - # cross-development setup method (e.g.: /usr/s390x-linux/lib64
  38. - # vs. /usr/s390-linux/lib64)
  39. - for libpath_suffix in ${LIBPATH_SUFFIX}; do
  40. - case "${NATIVE}:${libpath_suffix}:${TOOL_LIB}" in
  41. - :* | *::* | *:*:*${libpath_suffix}) ;;
  42. - *) libs="${exec_prefix}/${target_alias}/lib${libpath_suffix}" ;;
  43. - esac
  44. - done
  45. - libs="${exec_prefix}/${TOOL_LIB}/lib ${libs}"
  46. - fi
  47. - append_to_lib_path ${libs}
  48. -fi
  49. -
  50. if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes ] ; then
  51. libs=${NATIVE_LIB_DIRS}
  52. if [ "x${NATIVE}" = "xyes" ] ; then