mirror of
https://github.com/thead-yocto-mirror/meta-external-toolchain
synced 2026-09-07 08:24:42 +02:00
external-sourcery-toolchain: only copy existing /usr/ subdirs
It seems there are versions of the toolchain which provide empty directories, which is a problem for anyone storing their toolchain in source control. So ensure we only ever copy the paths that exist. Previously, we had left it as is to make sure it *would* break if a path we require is missing, but admittedly not all of these paths are critical, and if something is that badly broken in the toolchain, other things are likely to break elsewhere anyway. Signed-off-by: Christopher Larson <kergoth@gmail.com>
This commit is contained in:
@@ -39,7 +39,9 @@ do_install() {
|
||||
install -d ${D}/usr
|
||||
for usr_element in bin libexec sbin share ${base_libdir}; do
|
||||
usr_path=$sysroot/usr/$usr_element
|
||||
cp -a $usr_path ${D}/usr/
|
||||
if [ -e "$usr_path" ]; then
|
||||
cp -a $usr_path ${D}/usr/
|
||||
fi
|
||||
done
|
||||
if [ "${base_libdir}" != "lib" ]; then
|
||||
if [ -d $sysroot/usr/lib/locale ]; then
|
||||
@@ -72,8 +74,8 @@ do_install() {
|
||||
ln -s ../../bin/gdbserver ${D}${libdir}/bin/sysroot-gdbserver
|
||||
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
|
||||
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
|
||||
sed -i -e 's/__packed/__attribute__ ((packed))/' ${D}${includedir}/mtd/ubi-user.h
|
||||
|
||||
create_multilib_link ${D}
|
||||
|
||||
Reference in New Issue
Block a user