Skip to contentSkip to conversation

allarch: Force TARGET_*FLAGS variable values

PATCH New Mike Crowe 1 participant 1 message Oct 29, 2015

lore
Share & tools
lore

Mike Crowe

author
#0 lore raw

PATCH 1/1 allarch: Force TARGET_*FLAGS variable values

TARGET_CPPFLAGS, TARGET_CFLAGS, TARGET_CPPFLAGS and TARGET_LDFLAGS may differ between MACHINEs. Since they are exported they affect task hashes even if unused which leads to multiple variants of allarch packages existing in sstate and bouncing in the sysroot when switching between MACHINEs.

allarch packages shouldn't be using these variables anyway, so let's ensure they have a fixed value in order to avoid this problem.

(Compare with 05a70ac30b37cab0952f1b9df501993a9dec70da and 14f4d016fef9d660da1e7e91aec4a0e807de59ab.)

---
 meta/classes/allarch.bbclass | 4 ++++
 1 file changed, 4 insertions(+)
meta/classes/allarch.bbclass +4 -0
index 2fea7c0..4af38d7 100644
@@ -27,6 +27,10 @@ python () {
         d.setVar("PACKAGE_EXTRA_ARCHS", "")
         d.setVar("SDK_ARCH", "none")
         d.setVar("SDK_CC_ARCH", "none")
+        d.setVar("TARGET_CPPFLAGS", "none")
+        d.setVar("TARGET_CFLAGS", "none")
+        d.setVar("TARGET_CXXFLAGS", "none")
+        d.setVar("TARGET_LDFLAGS", "none")
 
         # Avoid this being unnecessarily different due to nuances of
         # the target machine that aren't important for "all" arch
Signature · 1 line
2.1.4