From bccea580f1abb762d231f785a4e60c9cd368dcdf Mon Sep 17 00:00:00 2001 From: Andy Ross Date: Thu, 23 Aug 2012 17:32:31 +0000 Subject: ld: -rpath must search under sysroot The -rpath argument would search the host filesystem for libraries, even when a sysroot was defined. For cross toolchains with targets compatible with the host architecture this can find incorrect libraries. Leave -rpath-link unmodified, as build systems in the wild are already using this to point to host directories. [YOCTO #2965] Signed-off-by: Andy Ross Signed-off-by: Richard Purdie --- .../binutils/binutils/rpath-sysroot.patch | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/rpath-sysroot.patch (limited to 'meta/recipes-devtools/binutils/binutils/rpath-sysroot.patch') diff --git a/meta/recipes-devtools/binutils/binutils/rpath-sysroot.patch b/meta/recipes-devtools/binutils/binutils/rpath-sysroot.patch new file mode 100644 index 0000000000..955699ed7b --- /dev/null +++ b/meta/recipes-devtools/binutils/binutils/rpath-sysroot.patch @@ -0,0 +1,38 @@ +ld: -rpath must search under sysroot + +The -rpath argument would search the host filesystem for libraries, +even when a sysroot was defined. For cross toolchains with targets +compatible with the host architecture this can find incorrect +libraries. Leave -rpath-link unmodified, as build systems in the wild +are already using this to point to host directories. + +Signed-off-by: Andy Ross +Upstream-Status: submitted (binutils@sourceware.org 2012-08-22) +--- + ld/emultempl/elf32.em | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em +index de51050..35e0e7e 100644 +--- a/ld/emultempl/elf32.em ++++ b/ld/emultempl/elf32.em +@@ -1263,9 +1263,13 @@ fragment <