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