Patchwork gcc-configure-cross: factor out --enable-threads argument into ${GCCTHREADS}

login
register
mail settings
Submitter Phil Blundell
Date Sept. 26, 2012, 9:45 a.m.
Message ID <1348652719.31293.90.camel@phil-desktop>
Download mbox | patch
Permalink /patch/37253/
State New
Headers show

Comments

Phil Blundell - Sept. 26, 2012, 9:45 a.m.
This allows BSPs for architectures with no thread support to set (for
example) "GCCTHREADS=no" without having to override all the other configure
parameters.

Signed-off-by: Phil Blundell <pb@pbcl.net>
---
 meta/recipes-devtools/gcc/gcc-configure-common.inc |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Martin Jansa - Sept. 26, 2012, 9:54 a.m.
On Wed, Sep 26, 2012 at 10:45:18AM +0100, Phil Blundell wrote:
> This allows BSPs for architectures with no thread support to set (for
> example) "GCCTHREADS=no" without having to override all the other configure
> parameters.
> 
> Signed-off-by: Phil Blundell <pb@pbcl.net>
> ---
>  meta/recipes-devtools/gcc/gcc-configure-common.inc |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> index 908ad3e..504bfaa 100644
> --- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
> +++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> @@ -26,12 +26,13 @@ EXTRA_OECONF_INITIAL ?= ""
>  EXTRA_OECONF_INTERMEDIATE ?= ""
>  
>  GCCMULTILIB = "--disable-multilib"
> +GCCTHREADS = "posix"
>  
>  EXTRA_OECONF = "${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', True) != 'no']} \
>                  --with-gnu-ld \
>                  --enable-shared \
>                  --enable-languages=${LANGUAGES} \
> -                --enable-threads=posix \
> +                --enable-threads=${GCCTHREADS} \
>                  ${GCCMULTILIB} \
>                  --enable-c99 \
>                  --enable-long-long \
> -- 
> 1.7.10.4

Missing PR bump

Cheers,
Phil Blundell - Sept. 26, 2012, 9:57 a.m.
On Wed, 2012-09-26 at 11:54 +0200, Martin Jansa wrote:
> On Wed, Sep 26, 2012 at 10:45:18AM +0100, Phil Blundell wrote:
> > diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> > index 908ad3e..504bfaa 100644
> > --- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
> > +++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> > @@ -26,12 +26,13 @@ EXTRA_OECONF_INITIAL ?= ""
> >  EXTRA_OECONF_INTERMEDIATE ?= ""
> >  
> >  GCCMULTILIB = "--disable-multilib"
> > +GCCTHREADS = "posix"
> >  
> >  EXTRA_OECONF = "${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', True) != 'no']} \
> >                  --with-gnu-ld \
> >                  --enable-shared \
> >                  --enable-languages=${LANGUAGES} \
> > -                --enable-threads=posix \
> > +                --enable-threads=${GCCTHREADS} \
> >                  ${GCCMULTILIB} \
> >                  --enable-c99 \
> >                  --enable-long-long \
> > -- 
> > 1.7.10.4
> 
> Missing PR bump

Does it really need one?  It doesn't have any impact on the value that
EXTRA_OECONF ends up with, and bumping the PRs on all the various .bb
files would make the patch about ten times the size.  I can do that if
you insist but it seems like a bit of a waste of time.

p.
Martin Jansa - Sept. 26, 2012, 10:01 a.m.
On Wed, Sep 26, 2012 at 10:57:41AM +0100, Phil Blundell wrote:
> On Wed, 2012-09-26 at 11:54 +0200, Martin Jansa wrote:
> > On Wed, Sep 26, 2012 at 10:45:18AM +0100, Phil Blundell wrote:
> > > diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> > > index 908ad3e..504bfaa 100644
> > > --- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
> > > +++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> > > @@ -26,12 +26,13 @@ EXTRA_OECONF_INITIAL ?= ""
> > >  EXTRA_OECONF_INTERMEDIATE ?= ""
> > >  
> > >  GCCMULTILIB = "--disable-multilib"
> > > +GCCTHREADS = "posix"
> > >  
> > >  EXTRA_OECONF = "${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', True) != 'no']} \
> > >                  --with-gnu-ld \
> > >                  --enable-shared \
> > >                  --enable-languages=${LANGUAGES} \
> > > -                --enable-threads=posix \
> > > +                --enable-threads=${GCCTHREADS} \
> > >                  ${GCCMULTILIB} \
> > >                  --enable-c99 \
> > >                  --enable-long-long \
> > > -- 
> > > 1.7.10.4
> > 
> > Missing PR bump
> 
> Does it really need one?  It doesn't have any impact on the value that
> EXTRA_OECONF ends up with, and bumping the PRs on all the various .bb
> files would make the patch about ten times the size.  I can do that if
> you insist but it seems like a bit of a waste of time.

Sorry I haven't noticed that it's the same value as before. 

But if it causes different sstate checksum than PR bump would be nice to get new
builddir (well maybe not needed after f15f61af77cc4e52a037f509f8e49e1ea530cf35).

Cheers,
Phil Blundell - Sept. 26, 2012, 10:28 a.m.
On Wed, 2012-09-26 at 12:01 +0200, Martin Jansa wrote:
> Sorry I haven't noticed that it's the same value as before. 
> 
> But if it causes different sstate checksum than PR bump would be nice to get new
> builddir (well maybe not needed after f15f61af77cc4e52a037f509f8e49e1ea530cf35).

OK.  In that case I'll leave the patch alone for now and see if Richard
will swallow it as it stands.

p.
Henning Heinold - Sept. 26, 2012, 10:46 a.m.
On Wed, Sep 26, 2012 at 10:45:18AM +0100, Phil Blundell wrote:
> This allows BSPs for architectures with no thread support to set (for
> example) "GCCTHREADS=no" without having to override all the other configure
> parameters.
> 
> Signed-off-by: Phil Blundell <pb@pbcl.net>
> ---
>  meta/recipes-devtools/gcc/gcc-configure-common.inc |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> index 908ad3e..504bfaa 100644
> --- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
> +++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> @@ -26,12 +26,13 @@ EXTRA_OECONF_INITIAL ?= ""
>  EXTRA_OECONF_INTERMEDIATE ?= ""
>  
>  GCCMULTILIB = "--disable-multilib"
> +GCCTHREADS = "posix"

Hi Phil,

should that not be GCCTHREADS ?=

otherwise I do not see how it could be overwritten from outside.

Bye Henning
Phil Blundell - Sept. 26, 2012, 10:50 a.m.
On Wed, 2012-09-26 at 12:46 +0200, Henning Heinold wrote:
> should that not be GCCTHREADS ?=
> 
> otherwise I do not see how it could be overwritten from outside.

Well, a .bbappend can do it (since EXTRA_OECONF isn't assigned :=) or
you can use an override GCCTHREADS_pn-gcc-cross = "no" for example.  But
yes, making it be ?= would be fine with me as well.

p.
Richard Purdie - Sept. 26, 2012, 1:46 p.m.
On Wed, 2012-09-26 at 11:28 +0100, Phil Blundell wrote:
> On Wed, 2012-09-26 at 12:01 +0200, Martin Jansa wrote:
> > Sorry I haven't noticed that it's the same value as before. 
> > 
> > But if it causes different sstate checksum than PR bump would be nice to get new
> > builddir (well maybe not needed after f15f61af77cc4e52a037f509f8e49e1ea530cf35).
> 
> OK.  In that case I'll leave the patch alone for now and see if Richard
> will swallow it as it stands.

I've merged it, lets see how that previous commit stands up to this
test. I did change it to ?=, not that it matters a great deal.

Cheers,

Richard

Patch

diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc
index 908ad3e..504bfaa 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
@@ -26,12 +26,13 @@  EXTRA_OECONF_INITIAL ?= ""
 EXTRA_OECONF_INTERMEDIATE ?= ""
 
 GCCMULTILIB = "--disable-multilib"
+GCCTHREADS = "posix"
 
 EXTRA_OECONF = "${@['--enable-clocale=generic', ''][d.getVar('USE_NLS', True) != 'no']} \
                 --with-gnu-ld \
                 --enable-shared \
                 --enable-languages=${LANGUAGES} \
-                --enable-threads=posix \
+                --enable-threads=${GCCTHREADS} \
                 ${GCCMULTILIB} \
                 --enable-c99 \
                 --enable-long-long \