summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/binutils/binutils-cross.inc5
-rw-r--r--meta/recipes-devtools/binutils/binutils/no-tooldirpaths.patch47
2 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-cross.inc b/meta/recipes-devtools/binutils/binutils-cross.inc
index fd3d801491..7ebd7e3093 100644
--- a/meta/recipes-devtools/binutils/binutils-cross.inc
+++ b/meta/recipes-devtools/binutils/binutils-cross.inc
@@ -7,9 +7,14 @@ BPN = "binutils"
7INHIBIT_DEFAULT_DEPS = "1" 7INHIBIT_DEFAULT_DEPS = "1"
8INHIBIT_AUTOTOOLS_DEPS = "1" 8INHIBIT_AUTOTOOLS_DEPS = "1"
9 9
10SRC_URI += "file://no-tooldirpaths.patch"
11
12# Specify lib-path else we use a load of search dirs which we don't use
13# and mean the linker scripts have to be relocated.
10EXTRA_OECONF += "--with-sysroot=${STAGING_DIR_TARGET} \ 14EXTRA_OECONF += "--with-sysroot=${STAGING_DIR_TARGET} \
11 --disable-install-libbfd \ 15 --disable-install-libbfd \
12 --enable-poison-system-directories \ 16 --enable-poison-system-directories \
17 --with-lib-path==${target_base_libdir}:=${target_libdir} \
13 " 18 "
14do_install () { 19do_install () {
15 oe_runmake 'DESTDIR=${D}' install 20 oe_runmake 'DESTDIR=${D}' install
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