aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denys@ti.com>2019-02-05 01:48:11 -0500
committerKoen Kooi <koen.kooi@linaro.org>2019-02-05 11:40:33 +0100
commita8ce3dc47f3be9f98abc6ac98a849f918386cf9f (patch)
tree5480fde336c592f7b66080d78ceaf9ff0fd15f67
parentdc62a45214711a57ad535f5cf3a8576cbca9ff54 (diff)
downloadmeta-linaro-a8ce3dc47f3be9f98abc6ac98a849f918386cf9f.tar.gz
external-arm-toolchain: also support 32-bit arm toolchains
Remove hardcoding of "lib64" and "aarch64" and allow usage with 32-bit arm toolchains, like arm-linux-gnueabihf. Change-Id: I5da088b813e2f3c7f568a040ac48866d33a48966 Signed-off-by: Denys Dmytriyenko <denys@ti.com> Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
-rw-r--r--meta-linaro-toolchain/conf/distro/include/external-arm-toolchain-versions.inc8
-rw-r--r--meta-linaro-toolchain/conf/distro/include/tcmode-external-arm.inc3
-rw-r--r--meta-linaro-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb31
3 files changed, 22 insertions, 20 deletions
diff --git a/meta-linaro-toolchain/conf/distro/include/external-arm-toolchain-versions.inc b/meta-linaro-toolchain/conf/distro/include/external-arm-toolchain-versions.inc
index 7064d6b3..6c3acec5 100644
--- a/meta-linaro-toolchain/conf/distro/include/external-arm-toolchain-versions.inc
+++ b/meta-linaro-toolchain/conf/distro/include/external-arm-toolchain-versions.inc
@@ -49,28 +49,28 @@ def eat_get_libc_version(d):
if not syspath:
return 'UNKNOWN'
- libpath = syspath + '/libc/lib64/' + bb.data.expand('${EAT_TARGET_SYS}/', d)
+ libpath = syspath + '/libc/' + bb.data.expand('${EAT_LIBDIR}/${EAT_TARGET_SYS}/', d)
if os.path.exists(libpath):
for file in os.listdir(libpath):
if file.find('libc-') == 0:
return file[5:-3]
- libpath = syspath + '/libc/lib64/'
+ libpath = syspath + '/libc/' + bb.data.expand('${EAT_LIBDIR}/', d)
if os.path.exists(libpath):
for file in os.listdir(libpath):
if file.find('libc-') == 0:
return file[5:-3]
- libpath = syspath + '/libc/usr/lib64/' + bb.data.expand('${EAT_TARGET_SYS}/', d)
+ libpath = syspath + '/libc/usr/' + bb.data.expand('${EAT_LIBDIR}/${EAT_TARGET_SYS}/', d)
if os.path.exists(libpath):
for file in os.listdir(libpath):
if file.find('libc-') == 0:
return file[5:-3]
- libpath = syspath + '/libc/usr/lib64/'
+ libpath = syspath + '/libc/usr/' + bb.data.expand('${EAT_LIBDIR}/', d)
if os.path.exists(libpath):
for file in os.listdir(libpath):
diff --git a/meta-linaro-toolchain/conf/distro/include/tcmode-external-arm.inc b/meta-linaro-toolchain/conf/distro/include/tcmode-external-arm.inc
index 0f4e1d87..fc92d96b 100644
--- a/meta-linaro-toolchain/conf/distro/include/tcmode-external-arm.inc
+++ b/meta-linaro-toolchain/conf/distro/include/tcmode-external-arm.inc
@@ -12,6 +12,9 @@ EAT_TARGET_SYS_aarch64 ?= "aarch64-linux-gnu"
EAT_TARGET_SYS = "${TARGET_SYS}"
TARGET_PREFIX = "${EAT_TARGET_SYS}-"
+EAT_LIBDIR_arm = "lib"
+EAT_LIBDIR_aarch64 = "lib64"
+
GCCMULTILIB_forcevariable = "--disable-multilib"
IMAGE_LINGUAS_forcevariable = ""
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 a105cfcf..cdb7329a 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
@@ -17,7 +17,6 @@ PROVIDES += "\
virtual/${TARGET_PREFIX}g++ \
virtual/${TARGET_PREFIX}gcc-initial \
virtual/${TARGET_PREFIX}binutils \
- binutils-cross-aarch64 \
virtual/${TARGET_PREFIX}libc-for-gcc \
virtual/${TARGET_PREFIX}compilerlibs \
virtual/libc \
@@ -73,21 +72,21 @@ do_install() {
install -d ${D}${datadir}
install -d ${D}${includedir}
- cp -a -H ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/lib64/* ${D}${base_libdir}
- if [ -d ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/lib64/${EAT_TARGET_SYS} ]; then
- cp -a -H ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/lib64/${EAT_TARGET_SYS}/* ${D}${base_libdir}
+ cp -a -H ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/${EAT_LIBDIR}/* ${D}${base_libdir}
+ if [ -d ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/${EAT_TARGET_SYS} ]; then
+ cp -a -H ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/${EAT_TARGET_SYS}/* ${D}${base_libdir}
else
- if [ -f ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/lib64/ld-${EAT_VER_LIBC}.so ]; then
- cp -a -H ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/lib64/* ${D}${base_libdir}
+ if [ -f ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/ld-${EAT_VER_LIBC}.so ]; then
+ cp -a -H ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/* ${D}${base_libdir}
else
- cp -a -H ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/lib64/*.so* ${D}${base_libdir}
+ cp -a -H ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/${EAT_LIBDIR}/*.so* ${D}${base_libdir}
fi
fi
- if [ -d ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/lib64/${EAT_TARGET_SYS} ]; then
- cp -a -H ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/lib64/${EAT_TARGET_SYS}/* ${D}${libdir}
+ if [ -d ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/${EAT_LIBDIR}/${EAT_TARGET_SYS} ]; then
+ cp -a -H ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/${EAT_LIBDIR}/${EAT_TARGET_SYS}/* ${D}${libdir}
else
- cp -a -H ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/lib64/* ${D}${libdir}
- if [ ! -f ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/lib64/ld-${EAT_VER_LIBC}.so ]; then
+ cp -a -H ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/usr/${EAT_LIBDIR}/* ${D}${libdir}
+ if [ ! -f ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/${EAT_LIBDIR}/ld-${EAT_VER_LIBC}.so ]; then
rm -rf ${D}${libdir}/*.so*
fi
fi
@@ -191,19 +190,19 @@ do_install() {
fi
if [ -f ${D}${libdir}/libc.so ];then
- sed -i -e "s# /lib64/${EAT_TARGET_SYS}# ../../lib64#g" -e "s# /usr/lib64/# /usr/lib/#g" -e "s# /usr/lib64/${EAT_TARGET_SYS}# .#g" -e "s# /lib64/ld-linux# ../../lib64/ld-linux#g" ${D}${libdir}/libc.so
- sed -i -e "s# /lib64/libc.so.6# /lib/libc.so.6#g" ${D}${libdir}/libc.so
+ 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
# cat kjasdkjasd
fi
if [ -f ${D}${base_libdir}/libc.so ];then
- sed -i -e "s# /lib64/${EAT_TARGET_SYS}# ../../lib#g" -e "s# /usr/lib64/${EAT_TARGET_SYS}# .#g" "s# /lib64/# /lib/#g" ${D}${base_libdir}/libc.so
+ sed -i -e "s# /${EAT_LIBDIR}/${EAT_TARGET_SYS}# ../../lib#g" -e "s# /usr/${EAT_LIBDIR}/${EAT_TARGET_SYS}# .#g" "s# /${EAT_LIBDIR}/# /lib/#g" ${D}${base_libdir}/libc.so
if [ -f ${D}${base_libdir}/libc.so.6 ]; then
- sed -i -e "s# /usr/lib64/libc.so.6# /lib/libc.so.6#g" "s# /lib64/libc.so.6# /lib/libc.so.6#g" ${D}${base_libdir}/libc.so.6
+ sed -i -e "s# /usr/${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" "s# /${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" ${D}${base_libdir}/libc.so.6
fi
fi
if [ -f ${D}${base_libdir}/libpthread.so.0 ]; then
- sed -i -e "s# /usr/lib64/libpthread.so.0# /lib/libpthread.so.0#g" ${D}${base_libdir}/libpthread.so.0
+ sed -i -e "s# /usr/${EAT_LIBDIR}/libpthread.so.0# /lib/libpthread.so.0#g" ${D}${base_libdir}/libpthread.so.0
fi
# Remove if empty