summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/no-tooldirpaths.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils/no-tooldirpaths.patch')
-rw-r--r--meta/recipes-devtools/binutils/binutils/no-tooldirpaths.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils/no-tooldirpaths.patch b/meta/recipes-devtools/binutils/binutils/no-tooldirpaths.patch
new file mode 100644
index 0000000000..2bfc8d4d26
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/no-tooldirpaths.patch
@@ -0,0 +1,47 @@
1We don't place target libraries within ${exec_prefix}, we'd always place these
2within the target sysroot within the standard library directories. Worse, the
3append_to_lib_path code prefixes these paths with the sysroot which makes even
4less sense.
5
6These directories therefore don't make sense in our case and mean we have to
7relocate all the linker scripts if they're present. Dropping them
8gives a reasonable performance improvement/simplification.
9
10Upstream-Status: Inappropriate
11
12RP 2017/01/30
13
14Index: git/ld/genscripts.sh
15===================================================================
16--- git.orig/ld/genscripts.sh
17+++ git/ld/genscripts.sh
18@@ -189,29 +189,6 @@ append_to_lib_path()
19 fi
20 }
21
22-# Always search $(tooldir)/lib, aka /usr/local/TARGET/lib when native
23-# except when LIBPATH=":".
24-if [ "${LIB_PATH}" != ":" ] ; then
25- libs=
26- if [ "x${TOOL_LIB}" = "x" ] ; then
27- if [ "x${NATIVE}" = "xyes" ] ; then
28- libs="${exec_prefix}/${target_alias}/lib"
29- fi
30- else
31- # For multilib'ed targets, ensure both ${target_alias}/lib${LIBPATH_SUFFIX}
32- # and ${TOOL_LIB}/lib${LIBPATH_SUFFIX} are in the default search path,
33- # because 64bit libraries may be in both places, depending on
34- # cross-development setup method (e.g.: /usr/s390x-linux/lib64
35- # vs. /usr/s390-linux/lib64)
36- case "${NATIVE}:${LIBPATH_SUFFIX}:${TOOL_LIB}" in
37- :* | *::* | *:*:*${LIBPATH_SUFFIX}) ;;
38- *) libs="${exec_prefix}/${target_alias}/lib${LIBPATH_SUFFIX}" ;;
39- esac
40- libs="${exec_prefix}/${TOOL_LIB}/lib ${libs}"
41- fi
42- append_to_lib_path ${libs}
43-fi
44-
45 if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes ] ; then
46 libs=${NATIVE_LIB_DIRS}
47 if [ "x${NATIVE}" = "xyes" ] ; then