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