diff mbox

toolchain/toolchain-common.in: update definition of BR2_TOOLCHAIN_HAS_GCC_BUG_64735 for GCC 7

Message ID 20170606140850.5823-1-joerg.krause@embedded.rocks
State Changes Requested
Headers show

Commit Message

Jörg Krause June 6, 2017, 2:08 p.m. UTC
As GCC7 is now available in Buildroot, update the definition for
BR2_TOOLCHAIN_HAS_GCC_BUG_64735 as the bug #64735 is fixed in GCC 7.

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
---
 toolchain/toolchain-common.in | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Thomas Petazzoni June 6, 2017, 3:32 p.m. UTC | #1
Hello,

On Tue,  6 Jun 2017 16:08:50 +0200, Jörg Krause wrote:

> diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
> index d670f44747..06986abdd2 100644
> --- a/toolchain/toolchain-common.in
> +++ b/toolchain/toolchain-common.in
> @@ -13,10 +13,9 @@ comment "Toolchain Generic Options"
>  # ints before GCC 7
>  config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
>  	bool
> -	default y if BR2_nios2
> -	default y if BR2_ARM_CPU_ARMV4
> -	default y if BR2_ARM_CPU_ARMV5
> -	default y if BR2_sparc_v8
> +	default y if (BR2_nios2 || BR2_ARM_CPU_ARMV4 || \
> +		BR2_ARM_CPU_ARMV5 || BR2_sparc_v8) && \
> +		!BR2_TOOLCHAIN_GCC_AT_LEAST_7

This feels very complicated. What about just:

	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7

Best regards,

Thomas
Jörg Krause June 6, 2017, 6:44 p.m. UTC | #2
Hi Thomas,

On Tue, 2017-06-06 at 17:32 +0200, Thomas Petazzoni wrote:
> Hello,
> 
> On Tue,  6 Jun 2017 16:08:50 +0200, Jörg Krause wrote:
> 
> > diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
> > index d670f44747..06986abdd2 100644
> > --- a/toolchain/toolchain-common.in
> > +++ b/toolchain/toolchain-common.in
> > @@ -13,10 +13,9 @@ comment "Toolchain Generic Options"
> >  # ints before GCC 7
> >  config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
> >  	bool
> > -	default y if BR2_nios2
> > -	default y if BR2_ARM_CPU_ARMV4
> > -	default y if BR2_ARM_CPU_ARMV5
> > -	default y if BR2_sparc_v8
> > +	default y if (BR2_nios2 || BR2_ARM_CPU_ARMV4 || \
> > +		BR2_ARM_CPU_ARMV5 || BR2_sparc_v8) && \
> > +		!BR2_TOOLCHAIN_GCC_AT_LEAST_7
> 
> This feels very complicated. What about just:
> 
> 	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7

Wouldn't that be rather:

"""
config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
	default y if !BR2_TOOLCHAIN_GCC_AT_LEAST_7
"""

The package mpd chooses between version 0.19 and 0.20 depending on that
bug. For now, if mpd is build with GCC6 (and below) and an architecture
not affected by this bug, version 0.20 is selected. By not depending on
the architecture anymore, mpd version 0.19 would be selected instead.

Jörg
Thomas Petazzoni June 6, 2017, 7:23 p.m. UTC | #3
Hello,

On Tue, 06 Jun 2017 20:44:05 +0200, Jörg Krause wrote:

> > >  config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
> > >  	bool
> > > -	default y if BR2_nios2
> > > -	default y if BR2_ARM_CPU_ARMV4
> > > -	default y if BR2_ARM_CPU_ARMV5
> > > -	default y if BR2_sparc_v8
> > > +	default y if (BR2_nios2 || BR2_ARM_CPU_ARMV4 || \
> > > +		BR2_ARM_CPU_ARMV5 || BR2_sparc_v8) && \
> > > +		!BR2_TOOLCHAIN_GCC_AT_LEAST_7  
> > 
> > This feels very complicated. What about just:
> > 
> > 	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7  
> 
> Wouldn't that be rather:
> 
> """
> config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
> 	default y if !BR2_TOOLCHAIN_GCC_AT_LEAST_7
> """

No because that would make the option "y" as soon as you have gcc < 7.
But we want the option to be "y" only if you have gcc < 7 *and* you're
using one of nios2, ARMv4/v5 or sparc v8.

Best regards,

Thomas
Jörg Krause June 6, 2017, 7:35 p.m. UTC | #4
On Tue, 2017-06-06 at 21:23 +0200, Thomas Petazzoni wrote:
> Hello,
> 
> On Tue, 06 Jun 2017 20:44:05 +0200, Jörg Krause wrote:
> 
> > > >  config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
> > > >  	bool
> > > > -	default y if BR2_nios2
> > > > -	default y if BR2_ARM_CPU_ARMV4
> > > > -	default y if BR2_ARM_CPU_ARMV5
> > > > -	default y if BR2_sparc_v8
> > > > +	default y if (BR2_nios2 || BR2_ARM_CPU_ARMV4 || \
> > > > +		BR2_ARM_CPU_ARMV5 || BR2_sparc_v8) && \
> > > > +		!BR2_TOOLCHAIN_GCC_AT_LEAST_7  
> > > 
> > > This feels very complicated. What about just:
> > > 
> > > 	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7  
> > 
> > Wouldn't that be rather:
> > 
> > """
> > config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
> > 	default y if !BR2_TOOLCHAIN_GCC_AT_LEAST_7
> > """
> 
> No because that would make the option "y" as soon as you have gcc < 7.
> But we want the option to be "y" only if you have gcc < 7 *and* you're
> using one of nios2, ARMv4/v5 or sparc v8.

Sorry, I totally got you wrong. So, what you mean is:


"""
config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
	bool
	default y if BR2_nios2
	default y if BR2_ARM_CPU_ARMV4
	default y if BR2_ARM_CPU_ARMV5
	default y if BR2_sparc_v8
	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
"""

Right?

Jörg
Thomas Petazzoni June 6, 2017, 7:42 p.m. UTC | #5
Hello,

On Tue, 06 Jun 2017 21:35:04 +0200, Jörg Krause wrote:

> Sorry, I totally got you wrong. So, what you mean is:
> 
> 
> """
> config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
> 	bool
> 	default y if BR2_nios2
> 	default y if BR2_ARM_CPU_ARMV4
> 	default y if BR2_ARM_CPU_ARMV5
> 	default y if BR2_sparc_v8
> 	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
> """
> 
> Right?

Yes, exactly!

Best regards,

Thomas
diff mbox

Patch

diff --git a/toolchain/toolchain-common.in b/toolchain/toolchain-common.in
index d670f44747..06986abdd2 100644
--- a/toolchain/toolchain-common.in
+++ b/toolchain/toolchain-common.in
@@ -13,10 +13,9 @@  comment "Toolchain Generic Options"
 # ints before GCC 7
 config BR2_TOOLCHAIN_HAS_GCC_BUG_64735
 	bool
-	default y if BR2_nios2
-	default y if BR2_ARM_CPU_ARMV4
-	default y if BR2_ARM_CPU_ARMV5
-	default y if BR2_sparc_v8
+	default y if (BR2_nios2 || BR2_ARM_CPU_ARMV4 || \
+		BR2_ARM_CPU_ARMV5 || BR2_sparc_v8) && \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_7
 
 config BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	bool