All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] gcc-target: Ensure buildtools-extended-tarball doesn't use arch=native
@ 2020-05-01 16:46 Richard Purdie
  2020-05-01 16:46 ` [PATCH 2/2] abi_version/staging: Bump versions to force rebuild after sstate corruption Richard Purdie
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Richard Purdie @ 2020-05-01 16:46 UTC (permalink / raw)
  To: openembedded-core

A nativesdk BBCLASSEXTEND was added to gcc-target without realising this
would pass arch=native through to it for x86-64. This heavily optimises
gcc output for the host its running on meaning it can't be reused via
sstate on other machines.

Add class-target overrides here to get the desired behaviour. All
targets have been covered for completeness.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-devtools/gcc/gcc-target.inc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
index 8cb432780f5..6263e814971 100644
--- a/meta/recipes-devtools/gcc/gcc-target.inc
+++ b/meta/recipes-devtools/gcc/gcc-target.inc
@@ -15,11 +15,11 @@ EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
 
 ARMFPARCHEXT ?= ""
 
-EXTRA_OECONF_append_armv6 = " --with-arch=armv6${ARMFPARCHEXT}"
-EXTRA_OECONF_append_armv7a = " --with-arch=armv7-a${ARMFPARCHEXT}"
-EXTRA_OECONF_append_armv7ve = " --with-arch=armv7ve${ARMFPARCHEXT}"
-EXTRA_OECONF_append_arc = " --with-cpu=${TUNE_PKGARCH}"
-EXTRA_OECONF_append_x86-64 = " --with-arch=native"
+EXTRA_OECONF_append_armv6_class-target = " --with-arch=armv6${ARMFPARCHEXT}"
+EXTRA_OECONF_append_armv7a_class-target = " --with-arch=armv7-a${ARMFPARCHEXT}"
+EXTRA_OECONF_append_armv7ve_class-target = " --with-arch=armv7ve${ARMFPARCHEXT}"
+EXTRA_OECONF_append_arc_class-target = " --with-cpu=${TUNE_PKGARCH}"
+EXTRA_OECONF_append_x86-64_class-target = " --with-arch=native"
 
 # libcc1 requres gcc_cv_objdump when cross build, but gcc_cv_objdump is
 # set in subdir gcc, so subdir libcc1 can't use it, export it here to
-- 
2.25.1


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

* [PATCH 2/2] abi_version/staging: Bump versions to force rebuild after sstate corruption
  2020-05-01 16:46 [PATCH 1/2] gcc-target: Ensure buildtools-extended-tarball doesn't use arch=native Richard Purdie
@ 2020-05-01 16:46 ` Richard Purdie
  2020-05-01 16:54 ` [OE-core] [PATCH 1/2] gcc-target: Ensure buildtools-extended-tarball doesn't use arch=native Khem Raj
  2020-05-05 10:14 ` Adrian Bunk
  2 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2020-05-01 16:46 UTC (permalink / raw)
  To: openembedded-core

A "broken" buildtools-extended-tarball has been released into the wild
where it is optimising binaries for the host processsor. This is fine in
local usage but in a non-homogeneous cluster like our autobuilder, this
results in SIGILL on other machines when the sstate is shared amongst them
and is painful to debug.

The buildtools tarball has been fixed but we need to invalidate the hash
equivalence and sstate data. This change does that. Adding to OE-Core
rather than autobuilder local changes as its good to illustrate how to
do this and the issue is potentially wider than just Yocto Project
infrastructure.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/staging.bbclass | 1 +
 meta/conf/abi_version.conf   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index 5b04f88b2d8..de3a19815a3 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -93,6 +93,7 @@ SYSROOT_PREPROCESS_FUNCS ?= ""
 SYSROOT_DESTDIR = "${WORKDIR}/sysroot-destdir"
 
 python do_populate_sysroot () {
+    # SYSROOT 'version' 2
     bb.build.exec_func("sysroot_stage_all", d)
     bb.build.exec_func("sysroot_strip", d)
     for f in (d.getVar('SYSROOT_PREPROCESS_FUNCS') or '').split():
diff --git a/meta/conf/abi_version.conf b/meta/conf/abi_version.conf
index 2bdc55695bd..e04343b47c1 100644
--- a/meta/conf/abi_version.conf
+++ b/meta/conf/abi_version.conf
@@ -12,4 +12,4 @@ OELAYOUT_ABI = "12"
 # a reset of the equivalence, for example when reproducibility issues break the
 # existing match data. Distros can also append to this value for the same effect.
 #
-HASHEQUIV_HASH_VERSION  = "1"
+HASHEQUIV_HASH_VERSION  = "3"
-- 
2.25.1


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

* Re: [OE-core] [PATCH 1/2] gcc-target: Ensure buildtools-extended-tarball doesn't use arch=native
  2020-05-01 16:46 [PATCH 1/2] gcc-target: Ensure buildtools-extended-tarball doesn't use arch=native Richard Purdie
  2020-05-01 16:46 ` [PATCH 2/2] abi_version/staging: Bump versions to force rebuild after sstate corruption Richard Purdie
@ 2020-05-01 16:54 ` Khem Raj
  2020-05-05 10:14 ` Adrian Bunk
  2 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2020-05-01 16:54 UTC (permalink / raw)
  To: openembedded-core



On 5/1/20 9:46 AM, Richard Purdie wrote:
> A nativesdk BBCLASSEXTEND was added to gcc-target without realising this
> would pass arch=native through to it for x86-64. This heavily optimises
> gcc output for the host its running on meaning it can't be reused via
> sstate on other machines.
> 
> Add class-target overrides here to get the desired behaviour. All
> targets have been covered for completeness.
> 

yeah perhaps it should have been --with-arch=generic for non target option,

this looks ok

> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>   meta/recipes-devtools/gcc/gcc-target.inc | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/meta/recipes-devtools/gcc/gcc-target.inc b/meta/recipes-devtools/gcc/gcc-target.inc
> index 8cb432780f5..6263e814971 100644
> --- a/meta/recipes-devtools/gcc/gcc-target.inc
> +++ b/meta/recipes-devtools/gcc/gcc-target.inc
> @@ -15,11 +15,11 @@ EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
>   
>   ARMFPARCHEXT ?= ""
>   
> -EXTRA_OECONF_append_armv6 = " --with-arch=armv6${ARMFPARCHEXT}"
> -EXTRA_OECONF_append_armv7a = " --with-arch=armv7-a${ARMFPARCHEXT}"
> -EXTRA_OECONF_append_armv7ve = " --with-arch=armv7ve${ARMFPARCHEXT}"
> -EXTRA_OECONF_append_arc = " --with-cpu=${TUNE_PKGARCH}"
> -EXTRA_OECONF_append_x86-64 = " --with-arch=native"
> +EXTRA_OECONF_append_armv6_class-target = " --with-arch=armv6${ARMFPARCHEXT}"
> +EXTRA_OECONF_append_armv7a_class-target = " --with-arch=armv7-a${ARMFPARCHEXT}"
> +EXTRA_OECONF_append_armv7ve_class-target = " --with-arch=armv7ve${ARMFPARCHEXT}"
> +EXTRA_OECONF_append_arc_class-target = " --with-cpu=${TUNE_PKGARCH}"
> +EXTRA_OECONF_append_x86-64_class-target = " --with-arch=native"
>   
>   # libcc1 requres gcc_cv_objdump when cross build, but gcc_cv_objdump is
>   # set in subdir gcc, so subdir libcc1 can't use it, export it here to
> 
> 
> 
> 

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

* Re: [OE-core] [PATCH 1/2] gcc-target: Ensure buildtools-extended-tarball doesn't use arch=native
  2020-05-01 16:46 [PATCH 1/2] gcc-target: Ensure buildtools-extended-tarball doesn't use arch=native Richard Purdie
  2020-05-01 16:46 ` [PATCH 2/2] abi_version/staging: Bump versions to force rebuild after sstate corruption Richard Purdie
  2020-05-01 16:54 ` [OE-core] [PATCH 1/2] gcc-target: Ensure buildtools-extended-tarball doesn't use arch=native Khem Raj
@ 2020-05-05 10:14 ` Adrian Bunk
  2020-05-05 12:42   ` Richard Purdie
  2 siblings, 1 reply; 5+ messages in thread
From: Adrian Bunk @ 2020-05-05 10:14 UTC (permalink / raw)
  To: openembedded-core

On Fri, May 01, 2020 at 05:46:01PM +0100, Richard Purdie wrote:
> A nativesdk BBCLASSEXTEND was added to gcc-target without realising this
> would pass arch=native through to it for x86-64. This heavily optimises
> gcc output for the host its running on meaning it can't be reused via
> sstate on other machines.
> 
> Add class-target overrides here to get the desired behaviour. All
> targets have been covered for completeness.
>...
> +EXTRA_OECONF_append_x86-64_class-target = " --with-arch=native"
>...

What do you expect --with-arch=native to do for the target
of a cross compiler?

cu
Adrian

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

* Re: [OE-core] [PATCH 1/2] gcc-target: Ensure buildtools-extended-tarball doesn't use arch=native
  2020-05-05 10:14 ` Adrian Bunk
@ 2020-05-05 12:42   ` Richard Purdie
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Purdie @ 2020-05-05 12:42 UTC (permalink / raw)
  To: openembedded-core, bunk

On Tue, 2020-05-05 at 13:14 +0300, Adrian Bunk wrote:
> On Fri, May 01, 2020 at 05:46:01PM +0100, Richard Purdie wrote:
> > A nativesdk BBCLASSEXTEND was added to gcc-target without realising
> > this
> > would pass arch=native through to it for x86-64. This heavily
> > optimises
> > gcc output for the host its running on meaning it can't be reused
> > via
> > sstate on other machines.
> > 
> > Add class-target overrides here to get the desired behaviour. All
> > targets have been covered for completeness.
> > ...
> > +EXTRA_OECONF_append_x86-64_class-target = " --with-arch=native"
> > ...
> 
> What do you expect --with-arch=native to do for the target
> of a cross compiler?

gcc-target isn't a cross compiler.

Cheers,

Richard


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

end of thread, other threads:[~2020-05-05 12:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-01 16:46 [PATCH 1/2] gcc-target: Ensure buildtools-extended-tarball doesn't use arch=native Richard Purdie
2020-05-01 16:46 ` [PATCH 2/2] abi_version/staging: Bump versions to force rebuild after sstate corruption Richard Purdie
2020-05-01 16:54 ` [OE-core] [PATCH 1/2] gcc-target: Ensure buildtools-extended-tarball doesn't use arch=native Khem Raj
2020-05-05 10:14 ` Adrian Bunk
2020-05-05 12:42   ` 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.