summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-30 23:18:09 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-31 23:47:33 +0000
commit9852db9d22b496221930ce10b9fa325083778200 (patch)
tree00150ea693d55c0ffe7c07849bd026000742f9e2 /meta/recipes-devtools/binutils/binutils
parent3e2a47fdfceccd5f8832235b7a2df83076e84a98 (diff)
downloadpoky-9852db9d22b496221930ce10b9fa325083778200.tar.gz
binutils-cross: Remove exec_prefix from the linker search path
We don't put target libs into a native/cross ${exec_prefix} but having this in the default search path means all linker scripts have to be relocated. This is a considerable chunk of files to create multiple copies of for no good reason. Instead, patch out the paths we don't need. (From OE-Core rev: 20816eb5398512652c971a37589a2ca28ffd3d68) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils')
-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