Browse Source

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>
Christopher Larson 3 years ago
parent
commit
e52ff6135d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      recipes-external/gcc/gcc-runtime-external.bb

+ 2 - 2
recipes-external/gcc/gcc-runtime-external.bb

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