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 <drew_moseley@mentor.com>
This commit is contained in:
Drew Moseley
2014-06-10 19:24:51 -04:00
committed by Christopher Larson
parent e017b94622
commit 77e0fe98a1

View File

@@ -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