gcc-runtime-external: symlink TARGET_SYS, not move

There are two cases where TARGET_SYS might not match
EXTERNAL_TARGET_SYS. In one case, the external toolchain simply used
a different one than we did, and we need to align expectations, but in
another, they may not match due to multilib usage, and in such a case we
likely need both available.

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
This commit is contained in:
Christopher Larson
2020-07-02 00:23:49 +05:00
parent 58be27d80b
commit e52ff6135d

View File

@@ -48,10 +48,10 @@ mkdir_if_no_dest () {
}
do_install_extra () {
if [ "${TARGET_SYS}" != "${EXTERNAL_TARGET_SYS}" ]; then
if [ "${TARGET_SYS}" != "${EXTERNAL_TARGET_SYS}" ] && [ -z "${MLPREFIX}" ]; then
if [ -e "${D}${includedir}/c++/${GCC_VERSION}/${EXTERNAL_TARGET_SYS}" ]; then
if ! [ -e "${D}${includedir}/c++/${GCC_VERSION}/${TARGET_SYS}" ]; then
mv -v "${D}${includedir}/c++/${GCC_VERSION}/${EXTERNAL_TARGET_SYS}/." "${D}${includedir}/c++/${GCC_VERSION}/${TARGET_SYS}/"
ln -s ${EXTERNAL_TARGET_SYS} ${D}${includedir}/c++/${GCC_VERSION}/${TARGET_SYS}
fi
fi
fi