All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 0/3] Deal with binutils bug 21464
@ 2021-03-05 16:12 Giulio Benetti
  2021-03-05 16:12 ` [Buildroot] [PATCH v2 1/3] toolchain: introduce BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464 Giulio Benetti
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Giulio Benetti @ 2021-03-05 16:12 UTC (permalink / raw)
  To: buildroot

Introduce binutils bug which protobuf and zeromq package are affected and
disable them while suffering that bug.

Giulio Benetti (3):
  toolchain: introduce BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464
  package/protobuf: disable package if binutils is affected from bug
    21464
  package/zeromq: disable package if binutils is affected from bug 21464

 package/protobuf/Config.in | 1 +
 package/zeromq/Config.in   | 2 ++
 toolchain/Config.in        | 6 ++++++
 3 files changed, 9 insertions(+)

-- 
2.25.1

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

* [Buildroot] [PATCH v2 1/3] toolchain: introduce BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464
  2021-03-05 16:12 [Buildroot] [PATCH v2 0/3] Deal with binutils bug 21464 Giulio Benetti
@ 2021-03-05 16:12 ` Giulio Benetti
  2021-03-14 21:35   ` Thomas Petazzoni
  2021-03-20 22:41   ` Peter Korsgaard
  2021-03-05 16:12 ` [Buildroot] [PATCH v2 2/3] package/protobuf: disable package if binutils is affected from bug 21464 Giulio Benetti
  2021-03-05 16:12 ` [Buildroot] [PATCH v2 3/3] package/zeromq: " Giulio Benetti
  2 siblings, 2 replies; 17+ messages in thread
From: Giulio Benetti @ 2021-03-05 16:12 UTC (permalink / raw)
  To: buildroot

On OpenRisc binutils it still present ld bug 21464 leading to a package
protobuf to fail building:
http://autobuild.buildroot.net/results/908/9084cd777aefe0fa8235514c33767d8640ad7a5b/

The bug was already reported and it's been updated:
https://sourceware.org/bugzilla/show_bug.cgi?id=21464

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 toolchain/Config.in | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/toolchain/Config.in b/toolchain/Config.in
index 553612c4aa..d181644f98 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -81,6 +81,12 @@ config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_19615
 config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_20006
 	bool
 
+# https://sourceware.org/bugzilla/show_bug.cgi?id=21464
+# Affect toolchains built with binutils 2.31.1, still not fixed.
+config BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464
+	bool
+	default y if BR2_or1k
+
 # Atomic types can be:
 #  - never lock-free
 #  - sometimes lock-free
-- 
2.25.1

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

* [Buildroot] [PATCH v2 2/3] package/protobuf: disable package if binutils is affected from bug 21464
  2021-03-05 16:12 [Buildroot] [PATCH v2 0/3] Deal with binutils bug 21464 Giulio Benetti
  2021-03-05 16:12 ` [Buildroot] [PATCH v2 1/3] toolchain: introduce BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464 Giulio Benetti
@ 2021-03-05 16:12 ` Giulio Benetti
  2021-03-14 21:35   ` Thomas Petazzoni
  2021-03-20 22:42   ` Peter Korsgaard
  2021-03-05 16:12 ` [Buildroot] [PATCH v2 3/3] package/zeromq: " Giulio Benetti
  2 siblings, 2 replies; 17+ messages in thread
From: Giulio Benetti @ 2021-03-05 16:12 UTC (permalink / raw)
  To: buildroot

This package is affected from binutils bug 21464, since there is no
workaround, let's disable it.

Fixes:
http://autobuild.buildroot.net/results/908/9084cd777aefe0fa8235514c33767d8640ad7a5b/

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 package/protobuf/Config.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/protobuf/Config.in b/package/protobuf/Config.in
index 46c820b9cf..30050950aa 100644
--- a/package/protobuf/Config.in
+++ b/package/protobuf/Config.in
@@ -24,6 +24,7 @@ config BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS
 	default y if BR2_TOOLCHAIN_HAS_ATOMIC
 	depends on BR2_HOSTARCH = "x86_64" || BR2_HOSTARCH = "x86"
 	depends on BR2_USE_MMU # fork()
+	depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464
 
 config BR2_PACKAGE_PROTOBUF
 	bool "protobuf"
-- 
2.25.1

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

* [Buildroot] [PATCH v2 3/3] package/zeromq: disable package if binutils is affected from bug 21464
  2021-03-05 16:12 [Buildroot] [PATCH v2 0/3] Deal with binutils bug 21464 Giulio Benetti
  2021-03-05 16:12 ` [Buildroot] [PATCH v2 1/3] toolchain: introduce BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464 Giulio Benetti
  2021-03-05 16:12 ` [Buildroot] [PATCH v2 2/3] package/protobuf: disable package if binutils is affected from bug 21464 Giulio Benetti
@ 2021-03-05 16:12 ` Giulio Benetti
  2021-03-14 21:36   ` Thomas Petazzoni
  2 siblings, 1 reply; 17+ messages in thread
From: Giulio Benetti @ 2021-03-05 16:12 UTC (permalink / raw)
  To: buildroot

This package is affected from binutils bug 21464, since there is no
workaround, let's disable it.

Fixes:
http://autobuild.buildroot.net/results/ce351e0e97c2cacc17d4718d39941548c7558559

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 package/zeromq/Config.in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/zeromq/Config.in b/package/zeromq/Config.in
index cf5c644c39..f99adf7acc 100644
--- a/package/zeromq/Config.in
+++ b/package/zeromq/Config.in
@@ -1,10 +1,12 @@
 comment "zeromq needs a toolchain w/ C++, threads"
 	depends on !(BR2_INSTALL_LIBSTDCPP && BR2_TOOLCHAIN_HAS_THREADS)
+	depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464
 
 config BR2_PACKAGE_ZEROMQ
 	bool "zeromq"
 	depends on BR2_INSTALL_LIBSTDCPP
 	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBUUID
 	help
-- 
2.25.1

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

* [Buildroot] [PATCH v2 1/3] toolchain: introduce BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464
  2021-03-05 16:12 ` [Buildroot] [PATCH v2 1/3] toolchain: introduce BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464 Giulio Benetti
@ 2021-03-14 21:35   ` Thomas Petazzoni
  2021-03-20 22:41   ` Peter Korsgaard
  1 sibling, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2021-03-14 21:35 UTC (permalink / raw)
  To: buildroot

On Fri,  5 Mar 2021 17:12:09 +0100
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:

> On OpenRisc binutils it still present ld bug 21464 leading to a package
> protobuf to fail building:
> http://autobuild.buildroot.net/results/908/9084cd777aefe0fa8235514c33767d8640ad7a5b/
> 
> The bug was already reported and it's been updated:
> https://sourceware.org/bugzilla/show_bug.cgi?id=21464
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
>  toolchain/Config.in | 6 ++++++
>  1 file changed, 6 insertions(+)

Applied to master with a reworked commit log.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v2 2/3] package/protobuf: disable package if binutils is affected from bug 21464
  2021-03-05 16:12 ` [Buildroot] [PATCH v2 2/3] package/protobuf: disable package if binutils is affected from bug 21464 Giulio Benetti
@ 2021-03-14 21:35   ` Thomas Petazzoni
  2021-03-20 22:42   ` Peter Korsgaard
  1 sibling, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2021-03-14 21:35 UTC (permalink / raw)
  To: buildroot

On Fri,  5 Mar 2021 17:12:10 +0100
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:

> This package is affected from binutils bug 21464, since there is no
> workaround, let's disable it.
> 
> Fixes:
> http://autobuild.buildroot.net/results/908/9084cd777aefe0fa8235514c33767d8640ad7a5b/
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
>  package/protobuf/Config.in | 1 +
>  1 file changed, 1 insertion(+)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v2 3/3] package/zeromq: disable package if binutils is affected from bug 21464
  2021-03-05 16:12 ` [Buildroot] [PATCH v2 3/3] package/zeromq: " Giulio Benetti
@ 2021-03-14 21:36   ` Thomas Petazzoni
  2021-03-14 21:45     ` Giulio Benetti
  2021-03-17 15:45     ` [Buildroot] [PATCH] package/zeromq: fix build failure due to binutils " Giulio Benetti
  0 siblings, 2 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2021-03-14 21:36 UTC (permalink / raw)
  To: buildroot

On Fri,  5 Mar 2021 17:12:11 +0100
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:

>  config BR2_PACKAGE_ZEROMQ
>  	bool "zeromq"
>  	depends on BR2_INSTALL_LIBSTDCPP
>  	depends on BR2_TOOLCHAIN_HAS_THREADS
> +	depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464

This is not sufficient: there are numerous packages that "select
BR2_PACKAGE_ZEROMQ", so this "depends on" would have to be propagated.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH v2 3/3] package/zeromq: disable package if binutils is affected from bug 21464
  2021-03-14 21:36   ` Thomas Petazzoni
@ 2021-03-14 21:45     ` Giulio Benetti
  2021-03-14 22:26       ` Thomas Petazzoni
  2021-03-17 15:45     ` [Buildroot] [PATCH] package/zeromq: fix build failure due to binutils " Giulio Benetti
  1 sibling, 1 reply; 17+ messages in thread
From: Giulio Benetti @ 2021-03-14 21:45 UTC (permalink / raw)
  To: buildroot

On 3/14/21 10:36 PM, Thomas Petazzoni wrote:
> On Fri,  5 Mar 2021 17:12:11 +0100
> Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:
> 
>>   config BR2_PACKAGE_ZEROMQ
>>   	bool "zeromq"
>>   	depends on BR2_INSTALL_LIBSTDCPP
>>   	depends on BR2_TOOLCHAIN_HAS_THREADS
>> +	depends on !BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464
> 
> This is not sufficient: there are numerous packages that "select
> BR2_PACKAGE_ZEROMQ", so this "depends on" would have to be propagated.

Oh, again forgotten about Kconfig dependencies, I'm going to fix this
and the other patches too.

Thanks for reviewing.

Best regards
-- 
Giulio Benetti
Benetti Engineering sas

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

* [Buildroot] [PATCH v2 3/3] package/zeromq: disable package if binutils is affected from bug 21464
  2021-03-14 21:45     ` Giulio Benetti
@ 2021-03-14 22:26       ` Thomas Petazzoni
  0 siblings, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2021-03-14 22:26 UTC (permalink / raw)
  To: buildroot

On Sun, 14 Mar 2021 22:45:07 +0100
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:

> > This is not sufficient: there are numerous packages that "select
> > BR2_PACKAGE_ZEROMQ", so this "depends on" would have to be propagated.  
> 
> Oh, again forgotten about Kconfig dependencies, I'm going to fix this
> and the other patches too.

But it's annoying to propagate all those depends on... It would be so
much nicer to have a workaround for those bugs.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH] package/zeromq: fix build failure due to binutils bug 21464
  2021-03-14 21:36   ` Thomas Petazzoni
  2021-03-14 21:45     ` Giulio Benetti
@ 2021-03-17 15:45     ` Giulio Benetti
  2021-03-17 15:49       ` Giulio Benetti
  1 sibling, 1 reply; 17+ messages in thread
From: Giulio Benetti @ 2021-03-17 15:45 UTC (permalink / raw)
  To: buildroot

The zeromq package exhibits binutils bug 21464 when built for the Nios2
architecture with optimization enabled, which causes a build failure.

As done for other packages in Buildroot work around this gcc bug by
setting optimization to -O0 if BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464=y.

Fixes:
http://autobuild.buildroot.net/results/ce351e0e97c2cacc17d4718d39941548c7558559

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 package/zeromq/zeromq.mk | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/package/zeromq/zeromq.mk b/package/zeromq/zeromq.mk
index 182699403c..135b07b6c6 100644
--- a/package/zeromq/zeromq.mk
+++ b/package/zeromq/zeromq.mk
@@ -23,12 +23,20 @@ ZEROMQ_CONF_ENV = libzmq_cv_sock_cloexec=yes \
 	libzmq_cv_tcp_keepidle=yes \
 	libzmq_cv_tcp_keepintvl=yes
 
+ZEROMQ_CXXFLAGS = $(TARGET_CXXFLAGS)
+
 # Internal error, aborting at dwarf2cfi.c:2752 in connect_traces
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58864
 ifeq ($(BR2_m68k_cf),y)
-ZEROMQ_CONF_OPTS += CXXFLAGS="$(TARGET_CXXFLAGS) -fno-defer-pop"
+ZEROMQ_CXXFLAGS += -fno-defer-pop
+endif
+
+ifeq ($(BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464),y)
+ZEROMQ_CXXFLAGS += -O0
 endif
 
+ZEROMQ_CONF_OPTS += CXXFLAGS="$(ZEROMQ_CXXFLAGS)"
+
 # Only tools/curve_keygen.c needs this, but it doesn't hurt to pass it
 # for the rest of the build as well (which automatically includes stdc++).
 ifeq ($(BR2_STATIC_LIBS),y)
-- 
2.25.1

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

* [Buildroot] [PATCH] package/zeromq: fix build failure due to binutils bug 21464
  2021-03-17 15:45     ` [Buildroot] [PATCH] package/zeromq: fix build failure due to binutils " Giulio Benetti
@ 2021-03-17 15:49       ` Giulio Benetti
  2021-03-22 13:15         ` Giulio Benetti
  0 siblings, 1 reply; 17+ messages in thread
From: Giulio Benetti @ 2021-03-17 15:49 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On 3/17/21 4:45 PM, Giulio Benetti wrote:
> The zeromq package exhibits binutils bug 21464 when built for the Nios2
> architecture with optimization enabled, which causes a build failure.
> 
> As done for other packages in Buildroot work around this gcc bug by
> setting optimization to -O0 if BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464=y.
> 
> Fixes:
> http://autobuild.buildroot.net/results/ce351e0e97c2cacc17d4718d39941548c7558559
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
>   package/zeromq/zeromq.mk | 10 +++++++++-
>   1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/package/zeromq/zeromq.mk b/package/zeromq/zeromq.mk
> index 182699403c..135b07b6c6 100644
> --- a/package/zeromq/zeromq.mk
> +++ b/package/zeromq/zeromq.mk
> @@ -23,12 +23,20 @@ ZEROMQ_CONF_ENV = libzmq_cv_sock_cloexec=yes \
>   	libzmq_cv_tcp_keepidle=yes \
>   	libzmq_cv_tcp_keepintvl=yes
>   
> +ZEROMQ_CXXFLAGS = $(TARGET_CXXFLAGS)
> +
>   # Internal error, aborting at dwarf2cfi.c:2752 in connect_traces
>   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58864
>   ifeq ($(BR2_m68k_cf),y)
> -ZEROMQ_CONF_OPTS += CXXFLAGS="$(TARGET_CXXFLAGS) -fno-defer-pop"
> +ZEROMQ_CXXFLAGS += -fno-defer-pop
> +endif
> +
> +ifeq ($(BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464),y)
> +ZEROMQ_CXXFLAGS += -O0
>   endif
>   
> +ZEROMQ_CONF_OPTS += CXXFLAGS="$(ZEROMQ_CXXFLAGS)"
> +
>   # Only tools/curve_keygen.c needs this, but it doesn't hurt to pass it
>   # for the rest of the build as well (which automatically includes stdc++).
>   ifeq ($(BR2_STATIC_LIBS),y)
> 

this patch works around binutils bug 21464 for this package.
The other packages affected by binutils bug 21464 seem affected by 
another bug instead and at the moment can't be worked around, I'll try 
to find a possible work around.

-- 
Giulio Benetti
Benetti Engineering sas

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

* [Buildroot] [PATCH v2 1/3] toolchain: introduce BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464
  2021-03-05 16:12 ` [Buildroot] [PATCH v2 1/3] toolchain: introduce BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464 Giulio Benetti
  2021-03-14 21:35   ` Thomas Petazzoni
@ 2021-03-20 22:41   ` Peter Korsgaard
  1 sibling, 0 replies; 17+ messages in thread
From: Peter Korsgaard @ 2021-03-20 22:41 UTC (permalink / raw)
  To: buildroot

>>>>> "Giulio" == Giulio Benetti <giulio.benetti@benettiengineering.com> writes:

 > On OpenRisc binutils it still present ld bug 21464 leading to a package
 > protobuf to fail building:
 > http://autobuild.buildroot.net/results/908/9084cd777aefe0fa8235514c33767d8640ad7a5b/

 > The bug was already reported and it's been updated:
 > https://sourceware.org/bugzilla/show_bug.cgi?id=21464

 > Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

Committed to 2020.02.x, 2020.11.x and 2021.02.x, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH v2 2/3] package/protobuf: disable package if binutils is affected from bug 21464
  2021-03-05 16:12 ` [Buildroot] [PATCH v2 2/3] package/protobuf: disable package if binutils is affected from bug 21464 Giulio Benetti
  2021-03-14 21:35   ` Thomas Petazzoni
@ 2021-03-20 22:42   ` Peter Korsgaard
  1 sibling, 0 replies; 17+ messages in thread
From: Peter Korsgaard @ 2021-03-20 22:42 UTC (permalink / raw)
  To: buildroot

>>>>> "Giulio" == Giulio Benetti <giulio.benetti@benettiengineering.com> writes:

 > This package is affected from binutils bug 21464, since there is no
 > workaround, let's disable it.

 > Fixes:
 > http://autobuild.buildroot.net/results/908/9084cd777aefe0fa8235514c33767d8640ad7a5b/

 > Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

Committed to 2020.02.x, 2020.11.x and 2021.02.x, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH] package/zeromq: fix build failure due to binutils bug 21464
  2021-03-17 15:49       ` Giulio Benetti
@ 2021-03-22 13:15         ` Giulio Benetti
  2021-03-22 13:42           ` Thomas Petazzoni
  0 siblings, 1 reply; 17+ messages in thread
From: Giulio Benetti @ 2021-03-22 13:15 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On 3/17/21 4:49 PM, Giulio Benetti wrote:
> Hi Thomas,
> 
> On 3/17/21 4:45 PM, Giulio Benetti wrote:
>> The zeromq package exhibits binutils bug 21464 when built for the Nios2
>> architecture with optimization enabled, which causes a build failure.
>>
>> As done for other packages in Buildroot work around this gcc bug by
>> setting optimization to -O0 if BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464=y.
>>
>> Fixes:
>> http://autobuild.buildroot.net/results/ce351e0e97c2cacc17d4718d39941548c7558559
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>> ---
>>    package/zeromq/zeromq.mk | 10 +++++++++-
>>    1 file changed, 9 insertions(+), 1 deletion(-)
>>
>> diff --git a/package/zeromq/zeromq.mk b/package/zeromq/zeromq.mk
>> index 182699403c..135b07b6c6 100644
>> --- a/package/zeromq/zeromq.mk
>> +++ b/package/zeromq/zeromq.mk
>> @@ -23,12 +23,20 @@ ZEROMQ_CONF_ENV = libzmq_cv_sock_cloexec=yes \
>>    	libzmq_cv_tcp_keepidle=yes \
>>    	libzmq_cv_tcp_keepintvl=yes
>>    
>> +ZEROMQ_CXXFLAGS = $(TARGET_CXXFLAGS)
>> +
>>    # Internal error, aborting at dwarf2cfi.c:2752 in connect_traces
>>    # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58864
>>    ifeq ($(BR2_m68k_cf),y)
>> -ZEROMQ_CONF_OPTS += CXXFLAGS="$(TARGET_CXXFLAGS) -fno-defer-pop"
>> +ZEROMQ_CXXFLAGS += -fno-defer-pop
>> +endif
>> +
>> +ifeq ($(BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464),y)
>> +ZEROMQ_CXXFLAGS += -O0
>>    endif
>>    
>> +ZEROMQ_CONF_OPTS += CXXFLAGS="$(ZEROMQ_CXXFLAGS)"
>> +
>>    # Only tools/curve_keygen.c needs this, but it doesn't hurt to pass it
>>    # for the rest of the build as well (which automatically includes stdc++).
>>    ifeq ($(BR2_STATIC_LIBS),y)
>>
> 
> this patch works around binutils bug 21464 for this package.
> The other packages affected by binutils bug 21464 seem affected by
> another bug instead and at the moment can't be worked around, I'll try
> to find a possible work around.
> 

OpenRisc binutils 21464 bug has a fix:
https://sourceware.org/bugzilla/show_bug.cgi?id=21464

I've tested it with binutils:
- 2.32
- 2.34
- 2.35.2
- 2.36.1

and works good while building:
- protobuf
- libtheora
- zeromq

zeromq is the only package that could be worked around with -O0.

I would add patches that add patches to all binutils versions, so this 
way buildroot toolchain built by buildroot are safe, but I should tag
as buggy all the external openrisc toolchains, basically the one 
provided by Bootlin. This implies adding patches to disable building 
libtheora with all its dependencies and I can do it, or otherwise we can 
wait for Bootlin to release a new fixed openrisc toolchain, what about that?

Also, zeromq is worked around using -O0 by this:
https://patchwork.ozlabs.org/project/buildroot/patch/20210317154520.1613272-1-giulio.benetti at benettiengineering.com/

protobuf has already been disabled by this:
https://git.buildroot.net/buildroot/commit/?id=9e71b6e2cb28a66e116019bf8808fb48cef1d7b9

libtheora needs a new patch taking care of dependencies.

In the meanwhile I've provided patch with the fix for binutils:
https://patchwork.ozlabs.org/project/buildroot/patch/20210322131437.392225-1-giulio.benetti at benettiengineering.com/

Best regards
-- 
Giulio Benetti
Benetti Engineering sas

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

* [Buildroot] [PATCH] package/zeromq: fix build failure due to binutils bug 21464
  2021-03-22 13:15         ` Giulio Benetti
@ 2021-03-22 13:42           ` Thomas Petazzoni
  2021-03-22 15:57             ` Giulio Benetti
  0 siblings, 1 reply; 17+ messages in thread
From: Thomas Petazzoni @ 2021-03-22 13:42 UTC (permalink / raw)
  To: buildroot

On Mon, 22 Mar 2021 14:15:08 +0100
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:

> OpenRisc binutils 21464 bug has a fix:
> https://sourceware.org/bugzilla/show_bug.cgi?id=21464
> 
> I've tested it with binutils:
> - 2.32
> - 2.34
> - 2.35.2
> - 2.36.1
> 
> and works good while building:
> - protobuf
> - libtheora
> - zeromq

Excellent! Thanks for all this work!

Has this fix been suggested by upstream? How do you know it's the
"right" fix ?

> zeromq is the only package that could be worked around with -O0.
> 
> I would add patches that add patches to all binutils versions, so this 
> way buildroot toolchain built by buildroot are safe, but I should tag
> as buggy all the external openrisc toolchains, basically the one 
> provided by Bootlin. This implies adding patches to disable building 
> libtheora with all its dependencies and I can do it, or otherwise we can 
> wait for Bootlin to release a new fixed openrisc toolchain, what about that?

Don't bother with the external Bootlin toolchains, I was working on a
new release of the toolchains based on 2021.02, so I'll include the
binutils fix.

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [PATCH] package/zeromq: fix build failure due to binutils bug 21464
  2021-03-22 13:42           ` Thomas Petazzoni
@ 2021-03-22 15:57             ` Giulio Benetti
  2021-03-22 16:03               ` Thomas Petazzoni
  0 siblings, 1 reply; 17+ messages in thread
From: Giulio Benetti @ 2021-03-22 15:57 UTC (permalink / raw)
  To: buildroot

On 3/22/21 2:42 PM, Thomas Petazzoni wrote:
> On Mon, 22 Mar 2021 14:15:08 +0100
> Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:
> 
>> OpenRisc binutils 21464 bug has a fix:
>> https://sourceware.org/bugzilla/show_bug.cgi?id=21464
>>
>> I've tested it with binutils:
>> - 2.32
>> - 2.34
>> - 2.35.2
>> - 2.36.1
>>
>> and works good while building:
>> - protobuf
>> - libtheora
>> - zeromq
> Excellent! Thanks for all this work!
> 
> Has this fix been suggested by upstream? How do you know it's the
> "right" fix ?

Yes it's been suggested by Stafford here:
https://sourceware.org/bugzilla/show_bug.cgi?id=21464

>> zeromq is the only package that could be worked around with -O0.
>>
>> I would add patches that add patches to all binutils versions, so this
>> way buildroot toolchain built by buildroot are safe, but I should tag
>> as buggy all the external openrisc toolchains, basically the one
>> provided by Bootlin. This implies adding patches to disable building
>> libtheora with all its dependencies and I can do it, or otherwise we can
>> wait for Bootlin to release a new fixed openrisc toolchain, what about that?
> 
> Don't bother with the external Bootlin toolchains, I was working on a
> new release of the toolchains based on 2021.02, so I'll include the
> binutils fix.

Ok, so it fixes this bug for Buildroot toolchain and you'll provide 
Bootlin toolchain and we can consider this bug as not affecting
Buildroot anymore. The chance one would use an external OpenRisc 
toolchain would be very rare. Right?

Then we could revert commit:
"package/protobuf: disable package if binutils is affected from bug 21464"
https://git.buildroot.net/buildroot/commit/?id=9e71b6e2cb

While doing all these tests I've gound that libgeos still has this bug 
and most of all, the diff proposed doesn't fix bug 21464, they are 2 
different bugs, so I've updated that here:
https://sourceware.org/bugzilla/show_bug.cgi?id=21464

And submitted the other bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=27624

So bug 21464 is still there and my binutils patches need do be re-worded.

And please drop my pending patch:
https://patchwork.ozlabs.org/project/buildroot/patch/20210322131437.392225-1-giulio.benetti at benettiengineering.com/

I've submitted a reworded one:
https://patchwork.ozlabs.org/project/buildroot/patch/20210322155655.547476-1-giulio.benetti at benettiengineering.com/

Best regards
-- 
Giulio Benetti
Benetti Engineering sas

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

* [Buildroot] [PATCH] package/zeromq: fix build failure due to binutils bug 21464
  2021-03-22 15:57             ` Giulio Benetti
@ 2021-03-22 16:03               ` Thomas Petazzoni
  0 siblings, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2021-03-22 16:03 UTC (permalink / raw)
  To: buildroot

On Mon, 22 Mar 2021 16:57:23 +0100
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:

> > Has this fix been suggested by upstream? How do you know it's the
> > "right" fix ?  
> 
> Yes it's been suggested by Stafford here:
> https://sourceware.org/bugzilla/show_bug.cgi?id=21464

Ah, OK!

> > Don't bother with the external Bootlin toolchains, I was working on a
> > new release of the toolchains based on 2021.02, so I'll include the
> > binutils fix.  
> 
> Ok, so it fixes this bug for Buildroot toolchain and you'll provide 
> Bootlin toolchain and we can consider this bug as not affecting
> Buildroot anymore. The chance one would use an external OpenRisc 
> toolchain would be very rare. Right?

Yes, that's the idea.

> So bug 21464 is still there and my binutils patches need do be re-worded.
> 
> And please drop my pending patch:
> https://patchwork.ozlabs.org/project/buildroot/patch/20210322131437.392225-1-giulio.benetti at benettiengineering.com/
> 
> I've submitted a reworded one:
> https://patchwork.ozlabs.org/project/buildroot/patch/20210322155655.547476-1-giulio.benetti at benettiengineering.com/

OK, thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

end of thread, other threads:[~2021-03-22 16:03 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-05 16:12 [Buildroot] [PATCH v2 0/3] Deal with binutils bug 21464 Giulio Benetti
2021-03-05 16:12 ` [Buildroot] [PATCH v2 1/3] toolchain: introduce BR2_TOOLCHAIN_HAS_BINUTILS_BUG_21464 Giulio Benetti
2021-03-14 21:35   ` Thomas Petazzoni
2021-03-20 22:41   ` Peter Korsgaard
2021-03-05 16:12 ` [Buildroot] [PATCH v2 2/3] package/protobuf: disable package if binutils is affected from bug 21464 Giulio Benetti
2021-03-14 21:35   ` Thomas Petazzoni
2021-03-20 22:42   ` Peter Korsgaard
2021-03-05 16:12 ` [Buildroot] [PATCH v2 3/3] package/zeromq: " Giulio Benetti
2021-03-14 21:36   ` Thomas Petazzoni
2021-03-14 21:45     ` Giulio Benetti
2021-03-14 22:26       ` Thomas Petazzoni
2021-03-17 15:45     ` [Buildroot] [PATCH] package/zeromq: fix build failure due to binutils " Giulio Benetti
2021-03-17 15:49       ` Giulio Benetti
2021-03-22 13:15         ` Giulio Benetti
2021-03-22 13:42           ` Thomas Petazzoni
2021-03-22 15:57             ` Giulio Benetti
2021-03-22 16:03               ` Thomas Petazzoni

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.