Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/3] Icecream fixes for multilib
@ 2019-01-09 15:28 Joshua Watt
  2019-01-09 15:28 ` [PATCH 1/3] classes/icecc: Check blacklist for BPN Joshua Watt
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Joshua Watt @ 2019-01-09 15:28 UTC (permalink / raw)
  To: openembedded-core

Using Icecream to build recipes with multilib enabled has been broken
for some time, as has using Icecream in an SDK with multilib.

Joshua Watt (3):
  classes/icecc: Check blacklist for BPN
  classes/icecc: Remove trailing whitespace
  nativesdk-icecc-toolchain: Use TARGET_PREFIX in post-relocate

 meta/classes/icecc.bbclass                          | 13 ++++++++++---
 .../icecc-toolchain/icecc-toolchain/icecc-env.sh    |  4 ++--
 .../icecc-toolchain/icecc-toolchain/icecc-setup.sh  |  6 +++---
 .../nativesdk-icecc-toolchain_0.1.bb                |  6 +++---
 4 files changed, 18 insertions(+), 11 deletions(-)

-- 
2.20.1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] classes/icecc: Check blacklist for BPN
  2019-01-09 15:28 [PATCH 0/3] Icecream fixes for multilib Joshua Watt
@ 2019-01-09 15:28 ` Joshua Watt
  2019-01-09 15:28 ` [PATCH 2/3] classes/icecc: Remove trailing whitespace Joshua Watt
  2019-01-09 15:28 ` [PATCH 3/3] nativesdk-icecc-toolchain: Use TARGET_PREFIX in post-relocate Joshua Watt
  2 siblings, 0 replies; 4+ messages in thread
From: Joshua Watt @ 2019-01-09 15:28 UTC (permalink / raw)
  To: openembedded-core

If a given PN is listed in the icecream blacklist, there is a very good
chance that the native, nativesdk, and multilib variants should also be
skipped. Check the blacklist entries against BPN to cover them.

[YOCTO #13128]

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 meta/classes/icecc.bbclass | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index 7d94525d316..ed3f0d36e14 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -130,6 +130,13 @@ def use_icecc(bb,d):
         return "no"
 
     pn = d.getVar('PN')
+    bpn = d.getVar('BPN')
+
+    # Blacklist/whitelist checks are made against BPN, because there is a good
+    # chance that if icecc should be skipped for a recipe, it should be skipped
+    # for all the variants of that recipe. PN is still checked in case a user
+    # specified a more specific recipe.
+    check_pn = set([pn, bpn])
 
     system_class_blacklist = (d.getVar('ICECC_SYSTEM_CLASS_BL') or "").split()
     user_class_blacklist = (d.getVar('ICECC_USER_CLASS_BL') or "none").split()
@@ -145,11 +152,11 @@ def use_icecc(bb,d):
     user_package_whitelist = (d.getVar('ICECC_USER_PACKAGE_WL') or "").split()
     package_blacklist = system_package_blacklist + user_package_blacklist
 
-    if pn in package_blacklist:
+    if check_pn & set(package_blacklist):
         bb.debug(1, "%s: found in blacklist, disable icecc" % pn)
         return "no"
 
-    if pn in user_package_whitelist:
+    if check_pn & set(user_package_whitelist):
         bb.debug(1, "%s: found in whitelist, enable icecc" % pn)
         return "yes"
 
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] classes/icecc: Remove trailing whitespace
  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 ` Joshua Watt
  2019-01-09 15:28 ` [PATCH 3/3] nativesdk-icecc-toolchain: Use TARGET_PREFIX in post-relocate Joshua Watt
  2 siblings, 0 replies; 4+ messages in thread
From: Joshua Watt @ 2019-01-09 15:28 UTC (permalink / raw)
  To: openembedded-core

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 meta/classes/icecc.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/icecc.bbclass b/meta/classes/icecc.bbclass
index ed3f0d36e14..0d6ee55c15c 100644
--- a/meta/classes/icecc.bbclass
+++ b/meta/classes/icecc.bbclass
@@ -386,7 +386,7 @@ set_icecc_env() {
             ${ICECC_ENV_EXEC} ${ICECC_ENV_DEBUG} "${ICECC_CC}" "${ICECC_CXX}" "${ICECC_AS}" "${ICECC_VERSION}"
         then
             touch "${ICECC_VERSION}.done"
-        elif ! wait_for_file "${ICECC_VERSION}.done" 30 
+        elif ! wait_for_file "${ICECC_VERSION}.done" 30
         then
             # locking failed so wait for ${ICECC_VERSION}.done to appear
             bbwarn "Timeout waiting for ${ICECC_VERSION}.done"
-- 
2.20.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] nativesdk-icecc-toolchain: Use TARGET_PREFIX in post-relocate
  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
  2 siblings, 0 replies; 4+ messages in thread
From: Joshua Watt @ 2019-01-09 15:28 UTC (permalink / raw)
  To: openembedded-core

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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-01-09 15:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 3/3] nativesdk-icecc-toolchain: Use TARGET_PREFIX in post-relocate Joshua Watt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox