From 77e0fe98a1afb8b8785eb065ea36202057bdbf74 Mon Sep 17 00:00:00 2001 From: Drew Moseley Date: Tue, 10 Jun 2014 19:24:51 -0400 Subject: [PATCH] external-sourcery-toolchain: Error out if libc.so does not exist Depending on the external toolchain config, the libc.so file may not exist. This generally means that the machine config does not have multi-lib support when it should. Rather than letting the "sed" command error out with a cryptic message, issue a (hopefully) more meaningful message. Signed-off-by: Drew Moseley --- recipes/meta/external-sourcery-toolchain.bb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/recipes/meta/external-sourcery-toolchain.bb b/recipes/meta/external-sourcery-toolchain.bb index 001a2f2..c963f2b 100644 --- a/recipes/meta/external-sourcery-toolchain.bb +++ b/recipes/meta/external-sourcery-toolchain.bb @@ -73,6 +73,12 @@ do_install() { ln -s ../../bin/gdbserver ${D}${libdir}/bin/sysroot-gdbserver fi + if [ ! -e ${D}${libdir}/libc.so ]; then + bbfatal "Unable to locate installed libc.so file (${D}${libdir}/libc.so)." \ + "This may mean that your external toolchain uses a different" \ + "multi-lib setup than your machine configuration" + fi + sed -i -e "s# ${base_libdir}# ../..${base_libdir}#g" -e "s# ${libdir}# .#g" ${D}${libdir}/libc.so sed -i -e "s# ${base_libdir}# ../..${base_libdir}#g" -e "s# ${libdir}# .#g" ${D}${libdir}/libpthread.so