mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 17:19:20 +00:00
libgcc.inc: Fix an issue w/ a recursive symlink
If the OS is not Linux, the code could end up generating a recursive symlink. This can happen because the same symlink can be created twice in a row. If this happenes, the second symlink becomes a link to itself within the directory pointed to by the original link. In order to prevent this, verify that the destination does not already exist. (From OE-Core rev: ef28e5a74d939acc98d6e8e9a0efbeb143b8025f) Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
843e4935b9
commit
1c28cf571a
@@ -9,14 +9,18 @@ do_install_append_class-target () {
|
||||
"linux-musleabi") extra_target_os="linux-gnueabi";;
|
||||
*) extra_target_os="linux";;
|
||||
esac
|
||||
ln -s ${TARGET_SYS} ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
|
||||
if [ ! -e ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os ]; then
|
||||
ln -s ${TARGET_SYS} ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
|
||||
fi
|
||||
fi
|
||||
if [ -n "${@ bb.utils.contains('TUNE_CCARGS_MFLOAT', 'hard', 'hf', '', d)}" ]; then
|
||||
case "${TARGET_OS}" in
|
||||
"linux-musleabi") extra_target_os="linux-musleabihf";;
|
||||
"linux-gnueabi") extra_target_os="linux-gnueabihf";;
|
||||
esac
|
||||
ln -s ${TARGET_SYS} ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
|
||||
if [ ! -e ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os ]; then
|
||||
ln -s ${TARGET_SYS} ${D}${libdir}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user