All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] native.bbclass: Override TARGET_ flags too
@ 2014-04-16  9:31 Mike Crowe
  2014-04-16  9:49 ` Paul Eggleton
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Crowe @ 2014-04-16  9:31 UTC (permalink / raw)
  To: openembedded-core; +Cc: Mike Crowe

TARGET_LDFLAGS is currently defined in bitbake.conf to contain
${TARGET_LINK_HASH_STYLE} which differs between MIPS and other
targets. Since TARGET_LDFLAGS is an exported variable it affects the hash
of every shell task even if it is not used.

We don't want native recipe tasks to have different hashes purely because
they happen to have been built in order to satisfy dependencies for
different MACHINEs since this causes lots of churn in the native sysroot
when switching between MACHINEs.

Making native.bbclass override TARGET_LDFLAGS to use BUILD_LDFLAGS ensures
consistent hashes and is a sensible thing to be doing anyway.

Although they don't appear to have the same detrimental affect on task
hashes TARGET_CPPFLAGS, TARGET_CFLAGS and TARGET_CXXFLAGS should be
overridden too.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
---
 meta/classes/native.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/native.bbclass b/meta/classes/native.bbclass
index 5a318d2..2d182f0 100644
--- a/meta/classes/native.bbclass
+++ b/meta/classes/native.bbclass
@@ -26,6 +26,10 @@ TARGET_PREFIX = "${BUILD_PREFIX}"
 TARGET_CC_ARCH = "${BUILD_CC_ARCH}"
 TARGET_LD_ARCH = "${BUILD_LD_ARCH}"
 TARGET_AS_ARCH = "${BUILD_AS_ARCH}"
+TARGET_CPPFLAGS = "${BUILD_CPPFLAGS}"
+TARGET_CFLAGS = "${BUILD_CFLAGS}"
+TARGET_CXXFLAGS = "${BUILD_CXXFLAGS}"
+TARGET_LDFLAGS = "${BUILD_LDFLAGS}"
 TARGET_FPU = ""
 
 HOST_ARCH = "${BUILD_ARCH}"
-- 
1.9.1



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

end of thread, other threads:[~2014-04-16 23:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-16  9:31 [PATCH] native.bbclass: Override TARGET_ flags too Mike Crowe
2014-04-16  9:49 ` Paul Eggleton
2014-04-16  9:53   ` Mike Crowe
2014-04-16  9:59     ` Paul Eggleton
2014-04-16 10:07       ` Mike Crowe
2014-04-16 23:00       ` Khem Raj

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.