aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denys@ti.com>2019-03-29 13:10:48 -0400
committerVishal Bhoj <vishal.bhoj@linaro.org>2019-04-03 03:28:48 +0100
commitfab422679db088c37646ee978abbc9f0ee22b58b (patch)
treefc525863c7a8988bec07441f932ca312592a3f1c
parente8a70d738dbeacde76fdde2b7d7a6c3f4d63cc18 (diff)
external-arm-toolchain: libc.so linker script should use relative path
libc.so linker script should use relative paths to not clash with host libs. Using absolute paths in libc.so is fine with standalone toolchain or when used inside a rootfs. But when used inside OE SDK for cross-compilation, the absolute path confuses compiler with libs from host environment. In the past, Linaro prebuilt toolchains always had relative paths inside libc.so linker script. Adjust it the same for the Arm prebuilt toolchain. Signed-off-by: Denys Dmytriyenko <denys@ti.com> Change-Id: I8faaddcc11da7cfb9fb29217084cbc0d34dcc270
-rw-r--r--meta-linaro-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta-linaro-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb b/meta-linaro-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb
index 6fb5a4da..a4067d8b 100644
--- a/meta-linaro-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb
+++ b/meta-linaro-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb
@@ -233,6 +233,7 @@ do_install() {
if [ -f ${D}${libdir}/libc.so ];then
sed -i -e "s# /${EAT_LIBDIR}/${EAT_TARGET_SYS}# ../../${EAT_LIBDIR}#g" -e "s# /usr/${EAT_LIBDIR}/# /usr/lib/#g" -e "s# /usr/${EAT_LIBDIR}/${EAT_TARGET_SYS}# .#g" -e "s# /${EAT_LIBDIR}/ld-linux# ../../${EAT_LIBDIR}/ld-linux#g" ${D}${libdir}/libc.so
sed -i -e "s# /${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" ${D}${libdir}/libc.so
+ sed -i -e "s# /lib# ../../lib#g" -e "s# /usr/lib# .#g" ${D}${libdir}/libc.so
fi
if [ -f ${D}${base_libdir}/libc.so ];then