All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Fix some incorrect TARGET_-* flags
@ 2017-04-06 12:09 liu.ming50
  2017-04-06 12:09 ` [PATCH 1/4] cross.bbclass: override TARGET_* flags liu.ming50
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: liu.ming50 @ 2017-04-06 12:09 UTC (permalink / raw)
  To: openembedded-core; +Cc: Ming Liu

From: Ming Liu <liu.ming50@gmail.com>

I had found a lot of churn in sysroots when multiple MACHINEs are
sharing a same build folder, which is the case in my company, after
digging into it, I found it's caused by the TARGET_-* flags, they
are exported but not in use at all, they should be replaced by
particular flags for cross,crosssdk,nativesdk,cross-canadian, native
class does not need that because it's already done in:

commit 05a70ac30b37cab0952f1b9df501993a9dec70da:
[ native.bbclass: Override TARGET_ flags too ]

Ming Liu (4):
  cross.bbclass: override TARGET_* flags
  crosssdk.bbclass: override TARGET_* flags
  nativesdk.bbclass: override TARGET_* flags
  cross-canadian.bbclass: override TARGET_* flags

 meta/classes/cross-canadian.bbclass | 5 +++++
 meta/classes/cross.bbclass          | 5 +++++
 meta/classes/crosssdk.bbclass       | 5 +++++
 meta/classes/nativesdk.bbclass      | 4 ++++
 4 files changed, 19 insertions(+)

-- 
2.7.4



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

* [PATCH 1/4] cross.bbclass: override TARGET_* flags
  2017-04-06 12:09 [PATCH 0/4] Fix some incorrect TARGET_-* flags liu.ming50
@ 2017-04-06 12:09 ` liu.ming50
  2017-04-06 12:09 ` [PATCH 2/4] crosssdk.bbclass: " liu.ming50
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: liu.ming50 @ 2017-04-06 12:09 UTC (permalink / raw)
  To: openembedded-core; +Cc: Ming Liu

From: Ming Liu <peter.x.liu@external.atlascopco.com>

Some TARGET_* flags are being exported in bitbake.conf currently, so
they are impacting all the tasks of a cross recipe even they are not
in use at all.

This can lead a lot of churn when the cross sysroot are shared by
machines while they have defined different TARGET_* flags.

And sometimes it even causes "Taskhash mismatch" errors.

Fix it by overriding with BUILD_* flags.

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
---
 meta/classes/cross.bbclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass
index 2602153..8757303 100644
--- a/meta/classes/cross.bbclass
+++ b/meta/classes/cross.bbclass
@@ -28,6 +28,11 @@ MULTIMACH_TARGET_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}"
 export PKG_CONFIG_DIR = "${exec_prefix}/lib/pkgconfig"
 export PKG_CONFIG_SYSROOT_DIR = ""
 
+TARGET_CPPFLAGS = "${BUILD_CPPFLAGS}"
+TARGET_CFLAGS = "${BUILD_CFLAGS}"
+TARGET_CXXFLAGS = "${BUILD_CXXFLAGS}"
+TARGET_LDFLAGS = "${BUILD_LDFLAGS}"
+
 CPPFLAGS = "${BUILD_CPPFLAGS}"
 CFLAGS = "${BUILD_CFLAGS}"
 CXXFLAGS = "${BUILD_CFLAGS}"
-- 
2.7.4



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

* [PATCH 2/4] crosssdk.bbclass: override TARGET_* flags
  2017-04-06 12:09 [PATCH 0/4] Fix some incorrect TARGET_-* flags liu.ming50
  2017-04-06 12:09 ` [PATCH 1/4] cross.bbclass: override TARGET_* flags liu.ming50
@ 2017-04-06 12:09 ` liu.ming50
  2017-04-06 12:09 ` [PATCH 3/4] nativesdk.bbclass: " liu.ming50
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: liu.ming50 @ 2017-04-06 12:09 UTC (permalink / raw)
  To: openembedded-core; +Cc: Ming Liu

From: Ming Liu <peter.x.liu@external.atlascopco.com>

Some TARGET_* flags are being exported in bitbake.conf currently, so
they are impacting all the tasks of a crosssdk recipe even they are
not in use at all.

This can lead a lot of churn when the crosssdk sysroot are shared by
machines while they have defined different TARGET_* flags.

Fix it by overriding with BUILD_* flags.

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
---
 meta/classes/crosssdk.bbclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/classes/crosssdk.bbclass b/meta/classes/crosssdk.bbclass
index a5ffd97..ddb98d2 100644
--- a/meta/classes/crosssdk.bbclass
+++ b/meta/classes/crosssdk.bbclass
@@ -21,8 +21,13 @@ TARGET_PREFIX = "${SDK_PREFIX}"
 TARGET_CC_ARCH = "${SDK_CC_ARCH}"
 TARGET_LD_ARCH = "${SDK_LD_ARCH}"
 TARGET_AS_ARCH = "${SDK_AS_ARCH}"
+TARGET_CPPFLAGS = "${BUILD_CPPFLAGS}"
+TARGET_CFLAGS = "${BUILD_CFLAGS}"
+TARGET_CXXFLAGS = "${BUILD_CXXFLAGS}"
+TARGET_LDFLAGS = "${BUILD_LDFLAGS}"
 TARGET_FPU = ""
 
+
 target_libdir = "${SDKPATHNATIVE}${libdir_nativesdk}"
 target_includedir = "${SDKPATHNATIVE}${includedir_nativesdk}"
 target_base_libdir = "${SDKPATHNATIVE}${base_libdir_nativesdk}"
-- 
2.7.4



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

* [PATCH 3/4] nativesdk.bbclass: override TARGET_* flags
  2017-04-06 12:09 [PATCH 0/4] Fix some incorrect TARGET_-* flags liu.ming50
  2017-04-06 12:09 ` [PATCH 1/4] cross.bbclass: override TARGET_* flags liu.ming50
  2017-04-06 12:09 ` [PATCH 2/4] crosssdk.bbclass: " liu.ming50
@ 2017-04-06 12:09 ` liu.ming50
  2017-04-06 12:09 ` [PATCH 4/4] cross-canadian.bbclass: " liu.ming50
  2017-04-07  7:48 ` [PATCH 0/4] Fix some incorrect TARGET_-* flags Richard Purdie
  4 siblings, 0 replies; 6+ messages in thread
From: liu.ming50 @ 2017-04-06 12:09 UTC (permalink / raw)
  To: openembedded-core; +Cc: Ming Liu

From: Ming Liu <peter.x.liu@external.atlascopco.com>

Some TARGET_* flags are being exported in bitbake.conf currently, so
they are impacting all the tasks of a nativesdk recipe even they are
not in use at all.

This can lead a lot of churn when the nativesdk sysroot are shared by
machines while they have defined different TARGET_* flags.

Fix it by overriding with BUILDSDK_* flags.

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
---
 meta/classes/nativesdk.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass
index a97f5a7..ebcfb2d 100644
--- a/meta/classes/nativesdk.bbclass
+++ b/meta/classes/nativesdk.bbclass
@@ -43,6 +43,10 @@ TARGET_PREFIX = "${SDK_PREFIX}"
 TARGET_CC_ARCH = "${SDK_CC_ARCH}"
 TARGET_LD_ARCH = "${SDK_LD_ARCH}"
 TARGET_AS_ARCH = "${SDK_AS_ARCH}"
+TARGET_CPPFLAGS = "${BUILDSDK_CPPFLAGS}"
+TARGET_CFLAGS = "${BUILDSDK_CFLAGS}"
+TARGET_CXXFLAGS = "${BUILDSDK_CXXFLAGS}"
+TARGET_LDFLAGS = "${BUILDSDK_LDFLAGS}"
 TARGET_FPU = ""
 EXTRA_OECONF_GCC_FLOAT = ""
 
-- 
2.7.4



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

* [PATCH 4/4] cross-canadian.bbclass: override TARGET_* flags
  2017-04-06 12:09 [PATCH 0/4] Fix some incorrect TARGET_-* flags liu.ming50
                   ` (2 preceding siblings ...)
  2017-04-06 12:09 ` [PATCH 3/4] nativesdk.bbclass: " liu.ming50
@ 2017-04-06 12:09 ` liu.ming50
  2017-04-07  7:48 ` [PATCH 0/4] Fix some incorrect TARGET_-* flags Richard Purdie
  4 siblings, 0 replies; 6+ messages in thread
From: liu.ming50 @ 2017-04-06 12:09 UTC (permalink / raw)
  To: openembedded-core; +Cc: Ming Liu

From: Ming Liu <peter.x.liu@external.atlascopco.com>

Some TARGET_* flags are being exported in bitbake.conf currently, so
they are impacting all the tasks of a cross-canadian recipe even they
are not in use at all.

This can lead a lot of churn when the cross-canadian sysroot are shared
by machines while they have defined different TARGET_* flags.

Fix it by overriding with BUILDSDK_* flags.

Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
---
 meta/classes/cross-canadian.bbclass | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/classes/cross-canadian.bbclass b/meta/classes/cross-canadian.bbclass
index 3120f46..49388d4 100644
--- a/meta/classes/cross-canadian.bbclass
+++ b/meta/classes/cross-canadian.bbclass
@@ -115,6 +115,11 @@ HOST_CC_ARCH = "${SDK_CC_ARCH}"
 HOST_LD_ARCH = "${SDK_LD_ARCH}"
 HOST_AS_ARCH = "${SDK_AS_ARCH}"
 
+TARGET_CPPFLAGS = "${BUILDSDK_CPPFLAGS}"
+TARGET_CFLAGS = "${BUILDSDK_CFLAGS}"
+TARGET_CXXFLAGS = "${BUILDSDK_CXXFLAGS}"
+TARGET_LDFLAGS = "${BUILDSDK_LDFLAGS}"
+
 #assign DPKG_ARCH
 DPKG_ARCH = "${@debian_arch_map(d.getVar('SDK_ARCH'), '')}"
 
-- 
2.7.4



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

* Re: [PATCH 0/4] Fix some incorrect TARGET_-* flags
  2017-04-06 12:09 [PATCH 0/4] Fix some incorrect TARGET_-* flags liu.ming50
                   ` (3 preceding siblings ...)
  2017-04-06 12:09 ` [PATCH 4/4] cross-canadian.bbclass: " liu.ming50
@ 2017-04-07  7:48 ` Richard Purdie
  4 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2017-04-07  7:48 UTC (permalink / raw)
  To: liu.ming50, openembedded-core

On Thu, 2017-04-06 at 14:09 +0200, liu.ming50@gmail.com wrote:
> From: Ming Liu <liu.ming50@gmail.com>
> 
> I had found a lot of churn in sysroots when multiple MACHINEs are
> sharing a same build folder, which is the case in my company, after
> digging into it, I found it's caused by the TARGET_-* flags, they
> are exported but not in use at all, they should be replaced by
> particular flags for cross,crosssdk,nativesdk,cross-canadian, native
> class does not need that because it's already done in:
> 
> commit 05a70ac30b37cab0952f1b9df501993a9dec70da:
> [ native.bbclass: Override TARGET_ flags too ]

Whilst I understand why you want to do this, unfortunately these change
did break our automated tests, e.g.:

https://autobuilder.yocto.io/builders/nightly-x86-lsb/builds/232/steps/BuildImages/logs/stdio
https://autobuilder.yocto.io/builders/nightly-arm/builds/281/steps/BuildImages/logs/stdio

I think roughly what happened is that binutils-native was built on a
machine which doesn't default to PIC (providing libiberty), then
prelink-native was attempted on a machine that does. The result is the
error you see.

Previously this happened to work since enough target flags leaked into
the native ones to avoid the problem. After your change it breaks.
We're going to have to look into and fix this before I can merge these
changes...

Cheers,

Richard




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

end of thread, other threads:[~2017-04-07  7:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-06 12:09 [PATCH 0/4] Fix some incorrect TARGET_-* flags liu.ming50
2017-04-06 12:09 ` [PATCH 1/4] cross.bbclass: override TARGET_* flags liu.ming50
2017-04-06 12:09 ` [PATCH 2/4] crosssdk.bbclass: " liu.ming50
2017-04-06 12:09 ` [PATCH 3/4] nativesdk.bbclass: " liu.ming50
2017-04-06 12:09 ` [PATCH 4/4] cross-canadian.bbclass: " liu.ming50
2017-04-07  7:48 ` [PATCH 0/4] Fix some incorrect TARGET_-* flags Richard Purdie

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.