[gnome-continuous-yocto/gnomeostree-3.28-rocko: 4437/8267] binutils-cross: Remove exec_prefix from the linker search path
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 4437/8267] binutils-cross: Remove exec_prefix from the linker search path
- Date: Sun, 17 Dec 2017 02:02:08 +0000 (UTC)
commit 9852db9d22b496221930ce10b9fa325083778200
Author: Richard Purdie <richard purdie linuxfoundation org>
Date: Mon Jan 30 23:18:09 2017 +0000
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>
meta/recipes-devtools/binutils/binutils-cross.inc | 5 ++
.../binutils/binutils/no-tooldirpaths.patch | 47 ++++++++++++++++++++
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 fd3d801..7ebd7e3 100644
--- a/meta/recipes-devtools/binutils/binutils-cross.inc
+++ b/meta/recipes-devtools/binutils/binutils-cross.inc
@@ -7,9 +7,14 @@ BPN = "binutils"
INHIBIT_DEFAULT_DEPS = "1"
INHIBIT_AUTOTOOLS_DEPS = "1"
+SRC_URI += "file://no-tooldirpaths.patch"
+
+# Specify lib-path else we use a load of search dirs which we don't use
+# and mean the linker scripts have to be relocated.
EXTRA_OECONF += "--with-sysroot=${STAGING_DIR_TARGET} \
--disable-install-libbfd \
--enable-poison-system-directories \
+ --with-lib-path==${target_base_libdir}:=${target_libdir} \
"
do_install () {
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 0000000..2bfc8d4
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/no-tooldirpaths.patch
@@ -0,0 +1,47 @@
+We don't place target libraries within ${exec_prefix}, we'd always place these
+within the target sysroot within the standard library directories. Worse, the
+append_to_lib_path code prefixes these paths with the sysroot which makes even
+less sense.
+
+These directories therefore don't make sense in our case and mean we have to
+relocate all the linker scripts if they're present. Dropping them
+gives a reasonable performance improvement/simplification.
+
+Upstream-Status: Inappropriate
+
+RP 2017/01/30
+
+Index: git/ld/genscripts.sh
+===================================================================
+--- git.orig/ld/genscripts.sh
++++ git/ld/genscripts.sh
+@@ -189,29 +189,6 @@ append_to_lib_path()
+ fi
+ }
+
+-# Always search $(tooldir)/lib, aka /usr/local/TARGET/lib when native
+-# except when LIBPATH=":".
+-if [ "${LIB_PATH}" != ":" ] ; then
+- libs=
+- if [ "x${TOOL_LIB}" = "x" ] ; then
+- if [ "x${NATIVE}" = "xyes" ] ; then
+- libs="${exec_prefix}/${target_alias}/lib"
+- fi
+- else
+- # For multilib'ed targets, ensure both ${target_alias}/lib${LIBPATH_SUFFIX}
+- # and ${TOOL_LIB}/lib${LIBPATH_SUFFIX} are in the default search path,
+- # because 64bit libraries may be in both places, depending on
+- # cross-development setup method (e.g.: /usr/s390x-linux/lib64
+- # vs. /usr/s390-linux/lib64)
+- case "${NATIVE}:${LIBPATH_SUFFIX}:${TOOL_LIB}" in
+- :* | *::* | *:*:*${LIBPATH_SUFFIX}) ;;
+- *) libs="${exec_prefix}/${target_alias}/lib${LIBPATH_SUFFIX}" ;;
+- esac
+- libs="${exec_prefix}/${TOOL_LIB}/lib ${libs}"
+- fi
+- append_to_lib_path ${libs}
+-fi
+-
+ if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes ] ; then
+ libs=${NATIVE_LIB_DIRS}
+ if [ "x${NATIVE}" = "xyes" ] ; then
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]