blob: 370333d5d00714c1d1478eaae053012fa0cce97c [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From 8f929c616208351d0971d7dfd7574d48d3144603 Mon Sep 17 00:00:00 2001
Brad Bishop6e60e8b2018-02-01 10:27:11 -05002From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 6 Mar 2017 23:37:05 -0800
4Subject: [PATCH 02/15] binutils-cross: Do not generate linker script
5 directories
6
7We don't place target libraries within ${exec_prefix}, we'd always place these
8within the target sysroot within the standard library directories. Worse, the
9append_to_lib_path code prefixes these paths with the sysroot which makes even
10less sense.
11
12These directories therefore don't make sense in our case and mean we have to
13relocate all the linker scripts if they're present. Dropping them
14gives a reasonable performance improvement/simplification.
15
16Upstream-Status: Inappropriate
17
18RP 2017/01/30
19
20Signed-off-by: Khem Raj <raj.khem@gmail.com>
21---
22 ld/genscripts.sh | 23 -----------------------
23 1 file changed, 23 deletions(-)
24
25diff --git a/ld/genscripts.sh b/ld/genscripts.sh
26index a42c4d7a4b..d727b4d07e 100755
27--- a/ld/genscripts.sh
28+++ b/ld/genscripts.sh
29@@ -189,29 +189,6 @@ append_to_lib_path()
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)
47- case "${NATIVE}:${LIBPATH_SUFFIX}:${TOOL_LIB}" in
48- :* | *::* | *:*:*${LIBPATH_SUFFIX}) ;;
49- *) libs="${exec_prefix}/${target_alias}/lib${LIBPATH_SUFFIX}" ;;
50- esac
51- libs="${exec_prefix}/${TOOL_LIB}/lib ${libs}"
52- fi
53- append_to_lib_path ${libs}
54-fi
55-
56 if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes ] ; then
57 libs=${NATIVE_LIB_DIRS}
58 if [ "x${NATIVE}" = "xyes" ] ; then
59--
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500602.14.0
Brad Bishop6e60e8b2018-02-01 10:27:11 -050061