Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Joshua Watt <jpewhacker@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 3/3] nativesdk-icecc-toolchain: Use TARGET_PREFIX in post-relocate
Date: Wed,  9 Jan 2019 09:28:20 -0600	[thread overview]
Message-ID: <20190109152820.16845-4-JPEWhacker@gmail.com> (raw)
In-Reply-To: <20190109152820.16845-1-JPEWhacker@gmail.com>

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 <JPEWhacker@gmail.com>
---
 .../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



      parent reply	other threads:[~2019-01-09 15:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-09 15:28 [PATCH 0/3] Icecream fixes for multilib Joshua Watt
2019-01-09 15:28 ` [PATCH 1/3] classes/icecc: Check blacklist for BPN Joshua Watt
2019-01-09 15:28 ` [PATCH 2/3] classes/icecc: Remove trailing whitespace Joshua Watt
2019-01-09 15:28 ` Joshua Watt [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190109152820.16845-4-JPEWhacker@gmail.com \
    --to=jpewhacker@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox