diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-30 23:18:09 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-31 23:47:33 +0000 |
commit | 9852db9d22b496221930ce10b9fa325083778200 (patch) | |
tree | 00150ea693d55c0ffe7c07849bd026000742f9e2 /meta/recipes-devtools/binutils/binutils | |
parent | 3e2a47fdfceccd5f8832235b7a2df83076e84a98 (diff) | |
download | poky-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.patch | 47 |
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 @@ | |||
1 | We don't place target libraries within ${exec_prefix}, we'd always place these | ||
2 | within the target sysroot within the standard library directories. Worse, the | ||
3 | append_to_lib_path code prefixes these paths with the sysroot which makes even | ||
4 | less sense. | ||
5 | |||
6 | These directories therefore don't make sense in our case and mean we have to | ||
7 | relocate all the linker scripts if they're present. Dropping them | ||
8 | gives a reasonable performance improvement/simplification. | ||
9 | |||
10 | Upstream-Status: Inappropriate | ||
11 | |||
12 | RP 2017/01/30 | ||
13 | |||
14 | Index: 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 | ||