The icecc setup for the SDK was broken in multilib configurations now
that each multilib environment runs the post-relocate scripts
separately. Including $TARGET_PREFIX in the icecc shim path and in the
toolchain environment name prevents the various multilib setups from
conflicting.

[YOCTO #13128]

Signed-off-by: Joshua Watt <[email protected]>
---
 .../icecc-toolchain/icecc-toolchain/icecc-env.sh            | 4 ++--
 .../icecc-toolchain/icecc-toolchain/icecc-setup.sh          | 6 +++---
 .../icecc-toolchain/nativesdk-icecc-toolchain_0.1.bb        | 6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh 
b/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh
index 94760076bfa..81b3018bb6d 100644
--- a/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh
+++ b/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-env.sh
@@ -38,11 +38,11 @@ if [ -n "$ICECC_PATH" ]; then
         CXXFLAGS="$CXXFLAGS -fno-diagnostics-show-caret"
     fi
     export ICECC_PATH ICECC_CARET_WORKAROUND
-    export 
ICECC_VERSION="$OECORE_NATIVE_SYSROOT/usr/share/icecream/@TOOLCHAIN_ENV@"
+    export ICECC_VERSION="$(echo 
"$OECORE_NATIVE_SYSROOT/usr/share/${TARGET_PREFIX}icecream/@TOOLCHAIN_ENV@" | 
sed "s,@TARGET_PREFIX@,$TARGET_PREFIX,g")"
     export ICECC="$(which ${CROSS_COMPILE}gcc)"
     export ICECXX="$(which ${CROSS_COMPILE}g++)"
     export ICEAS="$(which ${CROSS_COMPILE}as)"
-    export PATH="$OECORE_NATIVE_SYSROOT/usr/share/icecream/bin:$PATH"
+    export 
PATH="$OECORE_NATIVE_SYSROOT/usr/share/${TARGET_PREFIX}icecream/bin:$PATH"
 else
     echo "Icecc not found. Disabling distributed compiling"
 fi
diff --git 
a/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-setup.sh 
b/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-setup.sh
index 25250b7c0e2..fbd9f038b88 100644
--- a/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-setup.sh
+++ b/meta/recipes-devtools/icecc-toolchain/icecc-toolchain/icecc-setup.sh
@@ -32,7 +32,7 @@ mkdir -p "`dirname $ICECC_VERSION`"
 icecc-create-env $ICECC $ICECXX $ICEAS $ICECC_VERSION || exit $?
 
 # Create symbolic links
-d="$OECORE_NATIVE_SYSROOT/usr/share/icecream/bin"
+d="$OECORE_NATIVE_SYSROOT/usr/share/${TARGET_PREFIX}icecream/bin"
 mkdir -p "$d"
-ln -s "$ICECC_PATH" "$d/${CROSS_COMPILE}gcc"
-ln -s "$ICECC_PATH" "$d/${CROSS_COMPILE}g++"
+ln -sf "$ICECC_PATH" "$d/${CROSS_COMPILE}gcc"
+ln -sf "$ICECC_PATH" "$d/${CROSS_COMPILE}g++"
diff --git 
a/meta/recipes-devtools/icecc-toolchain/nativesdk-icecc-toolchain_0.1.bb 
b/meta/recipes-devtools/icecc-toolchain/nativesdk-icecc-toolchain_0.1.bb
index 9d2750e4798..304ad7fec0e 100644
--- a/meta/recipes-devtools/icecc-toolchain/nativesdk-icecc-toolchain_0.1.bb
+++ b/meta/recipes-devtools/icecc-toolchain/nativesdk-icecc-toolchain_0.1.bb
@@ -13,7 +13,7 @@ SRC_URI = "\
 
 inherit nativesdk
 
-ENV_NAME="${DISTRO}-${TCLIBC}-${SDK_ARCH}-${TUNE_PKGARCH}-${DISTRO_VERSION}.tar.gz"
+ENV_NAME="${DISTRO}-${TCLIBC}-${SDK_ARCH}-@TARGET_PREFIX@${DISTRO_VERSION}.tar.gz"
 
 do_compile() {
 }
@@ -24,12 +24,12 @@ do_install() {
     install -d ${D}${SDKPATHNATIVE}/environment-setup.d/
     install -m 0644 ${WORKDIR}/icecc-env.sh 
${D}${SDKPATHNATIVE}/environment-setup.d/
     sed -i ${D}${SDKPATHNATIVE}/environment-setup.d/icecc-env.sh \
-        -e "s,@TOOLCHAIN_ENV@,${ENV_NAME},g"
+        -e 's,@TOOLCHAIN_ENV@,${ENV_NAME},g'
 
     install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d/
     install -m 0755 ${WORKDIR}/icecc-setup.sh 
${D}${SDKPATHNATIVE}/post-relocate-setup.d/
     sed -i ${D}${SDKPATHNATIVE}/post-relocate-setup.d/icecc-setup.sh \
-        -e "s,@TOOLCHAIN_ENV@,${ENV_NAME},g"
+        -e 's,@TOOLCHAIN_ENV@,${ENV_NAME},g'
 }
 
 PACKAGES = "${PN}"
-- 
2.20.1

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to