All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] toolchain: remove gcc bug 90620
@ 2024-04-13  7:49 Giulio Benetti
  2024-04-28 17:18 ` Arnout Vandecappelle via buildroot
  0 siblings, 1 reply; 5+ messages in thread
From: Giulio Benetti @ 2024-04-13  7:49 UTC (permalink / raw)
  To: buildroot
  Cc: Giulio Benetti, Romain Naour, Julien Corjon, Thomas Petazzoni,
	Fabrice Fontaine

While building packages affected by gcc bug 90620 with Microblaze
and gcc versions 11, 12, 13 built with Buildroot and external Bootlin
toolchains without -O0 work-around it turns out that the bug has been
fixed. So let's remove gcc bug 90620.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 package/haproxy/haproxy.mk                   | 8 +-------
 package/qt5/qt5base/qt5base.mk               | 5 -----
 package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk | 4 ----
 toolchain/Config.in                          | 9 ---------
 4 files changed, 1 insertion(+), 25 deletions(-)

diff --git a/package/haproxy/haproxy.mk b/package/haproxy/haproxy.mk
index 61a9ebebe4..697dbdf4bf 100644
--- a/package/haproxy/haproxy.mk
+++ b/package/haproxy/haproxy.mk
@@ -74,15 +74,9 @@ endif
 
 HAPROXY_MAKE_OPTS += ADDLIB="$(HAPROXY_LIBS)"
 
-HAPROXY_CFLAGS = $(TARGET_CFLAGS)
-
-ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_90620),y)
-HAPROXY_CFLAGS += -O0
-endif
-
 define HAPROXY_BUILD_CMDS
 	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
-		$(HAPROXY_MAKE_OPTS) DEFINE="$(HAPROXY_CFLAGS)" -C $(@D)
+		$(HAPROXY_MAKE_OPTS) DEFINE="$(TARGET_CFLAGS)" -C $(@D)
 endef
 
 define HAPROXY_INSTALL_TARGET_CMDS
diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
index e173639cca..d6445be9b2 100644
--- a/package/qt5/qt5base/qt5base.mk
+++ b/package/qt5/qt5base/qt5base.mk
@@ -50,11 +50,6 @@ QT5BASE_CONFIGURE_OPTS += -no-optimize-debug
 QT5BASE_CFLAGS = $(TARGET_CFLAGS)
 QT5BASE_CXXFLAGS = $(TARGET_CXXFLAGS)
 
-ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_90620),y)
-QT5BASE_CFLAGS += -O0
-QT5BASE_CXXFLAGS += -O0
-endif
-
 ifeq ($(BR2_X86_CPU_HAS_SSE2),)
 QT5BASE_CONFIGURE_OPTS += -no-sse2
 else ifeq ($(BR2_X86_CPU_HAS_SSE3),)
diff --git a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk
index 2126d3c915..f99baa1be7 100644
--- a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk
+++ b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk
@@ -20,8 +20,4 @@ ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
 QT5XMLPATTERNS_LICENSE += , BSD-3-Clause (examples)
 endif
 
-ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_90620),y)
-QT5XMLPATTERNS_CONF_OPTS += "QMAKE_CXXFLAGS+=-O0"
-endif
-
 $(eval $(qmake-package))
diff --git a/toolchain/Config.in b/toolchain/Config.in
index 944e573f82..de5ef7a08f 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -170,15 +170,6 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_85862
 	default y if BR2_microblaze
 	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
 
-# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620
-# ICE: in do_output_reload, at reload1.c:7978 on microblaze.
-# This bug no longer exists in gcc 10.x but reappeared in gcc 11.x
-config BR2_TOOLCHAIN_HAS_GCC_BUG_90620
-	bool
-	default y if BR2_microblaze
-	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_10 \
-		|| BR2_TOOLCHAIN_GCC_AT_LEAST_11
-
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93847
 # ICE: compiler error: Segmentation fault on Nios II. This bug
 # no longer exists in gcc 9.x.
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] toolchain: remove gcc bug 90620
  2024-04-13  7:49 [Buildroot] [PATCH] toolchain: remove gcc bug 90620 Giulio Benetti
@ 2024-04-28 17:18 ` Arnout Vandecappelle via buildroot
  2024-04-28 18:35   ` Giulio Benetti
  0 siblings, 1 reply; 5+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2024-04-28 17:18 UTC (permalink / raw)
  To: Giulio Benetti, buildroot
  Cc: Romain Naour, Julien Corjon, Thomas Petazzoni, Fabrice Fontaine



On 13/04/2024 09:49, Giulio Benetti wrote:
> While building packages affected by gcc bug 90620 with Microblaze
> and gcc versions 11, 12, 13 built with Buildroot and external Bootlin
> toolchains without -O0 work-around it turns out that the bug has been
> fixed. So let's remove gcc bug 90620.

  But a custom external toolchain that uses GCC <10 would still be affected, no? 
So you can't actually remove it? You can just remove the
|| BR2_TOOLCHAIN_GCC_AT_LEAST_11 part.

  Regards,
  Arnout

> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
>   package/haproxy/haproxy.mk                   | 8 +-------
>   package/qt5/qt5base/qt5base.mk               | 5 -----
>   package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk | 4 ----
>   toolchain/Config.in                          | 9 ---------
>   4 files changed, 1 insertion(+), 25 deletions(-)
> 
> diff --git a/package/haproxy/haproxy.mk b/package/haproxy/haproxy.mk
> index 61a9ebebe4..697dbdf4bf 100644
> --- a/package/haproxy/haproxy.mk
> +++ b/package/haproxy/haproxy.mk
> @@ -74,15 +74,9 @@ endif
>   
>   HAPROXY_MAKE_OPTS += ADDLIB="$(HAPROXY_LIBS)"
>   
> -HAPROXY_CFLAGS = $(TARGET_CFLAGS)
> -
> -ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_90620),y)
> -HAPROXY_CFLAGS += -O0
> -endif
> -
>   define HAPROXY_BUILD_CMDS
>   	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
> -		$(HAPROXY_MAKE_OPTS) DEFINE="$(HAPROXY_CFLAGS)" -C $(@D)
> +		$(HAPROXY_MAKE_OPTS) DEFINE="$(TARGET_CFLAGS)" -C $(@D)
>   endef
>   
>   define HAPROXY_INSTALL_TARGET_CMDS
> diff --git a/package/qt5/qt5base/qt5base.mk b/package/qt5/qt5base/qt5base.mk
> index e173639cca..d6445be9b2 100644
> --- a/package/qt5/qt5base/qt5base.mk
> +++ b/package/qt5/qt5base/qt5base.mk
> @@ -50,11 +50,6 @@ QT5BASE_CONFIGURE_OPTS += -no-optimize-debug
>   QT5BASE_CFLAGS = $(TARGET_CFLAGS)
>   QT5BASE_CXXFLAGS = $(TARGET_CXXFLAGS)
>   
> -ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_90620),y)
> -QT5BASE_CFLAGS += -O0
> -QT5BASE_CXXFLAGS += -O0
> -endif
> -
>   ifeq ($(BR2_X86_CPU_HAS_SSE2),)
>   QT5BASE_CONFIGURE_OPTS += -no-sse2
>   else ifeq ($(BR2_X86_CPU_HAS_SSE3),)
> diff --git a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk
> index 2126d3c915..f99baa1be7 100644
> --- a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk
> +++ b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk
> @@ -20,8 +20,4 @@ ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
>   QT5XMLPATTERNS_LICENSE += , BSD-3-Clause (examples)
>   endif
>   
> -ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_90620),y)
> -QT5XMLPATTERNS_CONF_OPTS += "QMAKE_CXXFLAGS+=-O0"
> -endif
> -
>   $(eval $(qmake-package))
> diff --git a/toolchain/Config.in b/toolchain/Config.in
> index 944e573f82..de5ef7a08f 100644
> --- a/toolchain/Config.in
> +++ b/toolchain/Config.in
> @@ -170,15 +170,6 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_85862
>   	default y if BR2_microblaze
>   	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
>   
> -# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620
> -# ICE: in do_output_reload, at reload1.c:7978 on microblaze.
> -# This bug no longer exists in gcc 10.x but reappeared in gcc 11.x
> -config BR2_TOOLCHAIN_HAS_GCC_BUG_90620
> -	bool
> -	default y if BR2_microblaze
> -	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_10 \
> -		|| BR2_TOOLCHAIN_GCC_AT_LEAST_11
> -
>   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93847
>   # ICE: compiler error: Segmentation fault on Nios II. This bug
>   # no longer exists in gcc 9.x.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] toolchain: remove gcc bug 90620
  2024-04-28 17:18 ` Arnout Vandecappelle via buildroot
@ 2024-04-28 18:35   ` Giulio Benetti
  2024-05-09 15:48     ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 5+ messages in thread
From: Giulio Benetti @ 2024-04-28 18:35 UTC (permalink / raw)
  To: Arnout Vandecappelle, buildroot
  Cc: Romain Naour, Julien Corjon, Thomas Petazzoni, Fabrice Fontaine

Hi Arnout,

On 28/04/24 19:18, Arnout Vandecappelle via buildroot wrote:
> 
> 
> On 13/04/2024 09:49, Giulio Benetti wrote:
>> While building packages affected by gcc bug 90620 with Microblaze
>> and gcc versions 11, 12, 13 built with Buildroot and external Bootlin
>> toolchains without -O0 work-around it turns out that the bug has been
>> fixed. So let's remove gcc bug 90620.
> 
>   But a custom external toolchain that uses GCC <10 would still be 
> affected, no? 

But this bug is Microblaze specific and the only 2 Microblaze external
toolchains are the Bootlin's ones, where the oldest GCC version is
12.3.0, so as we've already done in the past with this commit:
https://gitlab.com/buildroot.org/buildroot/-/commit/55fcba2a7c41d29f3f93bb37eec1264af4b45fb0

considering Buildroot free of bug 90620. If anyone will send a patch
for new microblaze external-toolchains it's very unlikely they will
contain gcc < 10.

Best regards
-- 
Giulio Benetti
CEO&CTO@Benetti Engineering

> So you can't actually remove it? You can just remove the
> || BR2_TOOLCHAIN_GCC_AT_LEAST_11 part.
>   Regards,
>   Arnout
> 
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>> ---
>>   package/haproxy/haproxy.mk                   | 8 +-------
>>   package/qt5/qt5base/qt5base.mk               | 5 -----
>>   package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk | 4 ----
>>   toolchain/Config.in                          | 9 ---------
>>   4 files changed, 1 insertion(+), 25 deletions(-)
>>
>> diff --git a/package/haproxy/haproxy.mk b/package/haproxy/haproxy.mk
>> index 61a9ebebe4..697dbdf4bf 100644
>> --- a/package/haproxy/haproxy.mk
>> +++ b/package/haproxy/haproxy.mk
>> @@ -74,15 +74,9 @@ endif
>>   HAPROXY_MAKE_OPTS += ADDLIB="$(HAPROXY_LIBS)"
>> -HAPROXY_CFLAGS = $(TARGET_CFLAGS)
>> -
>> -ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_90620),y)
>> -HAPROXY_CFLAGS += -O0
>> -endif
>> -
>>   define HAPROXY_BUILD_CMDS
>>       $(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
>> -        $(HAPROXY_MAKE_OPTS) DEFINE="$(HAPROXY_CFLAGS)" -C $(@D)
>> +        $(HAPROXY_MAKE_OPTS) DEFINE="$(TARGET_CFLAGS)" -C $(@D)
>>   endef
>>   define HAPROXY_INSTALL_TARGET_CMDS
>> diff --git a/package/qt5/qt5base/qt5base.mk 
>> b/package/qt5/qt5base/qt5base.mk
>> index e173639cca..d6445be9b2 100644
>> --- a/package/qt5/qt5base/qt5base.mk
>> +++ b/package/qt5/qt5base/qt5base.mk
>> @@ -50,11 +50,6 @@ QT5BASE_CONFIGURE_OPTS += -no-optimize-debug
>>   QT5BASE_CFLAGS = $(TARGET_CFLAGS)
>>   QT5BASE_CXXFLAGS = $(TARGET_CXXFLAGS)
>> -ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_90620),y)
>> -QT5BASE_CFLAGS += -O0
>> -QT5BASE_CXXFLAGS += -O0
>> -endif
>> -
>>   ifeq ($(BR2_X86_CPU_HAS_SSE2),)
>>   QT5BASE_CONFIGURE_OPTS += -no-sse2
>>   else ifeq ($(BR2_X86_CPU_HAS_SSE3),)
>> diff --git a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk 
>> b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk
>> index 2126d3c915..f99baa1be7 100644
>> --- a/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk
>> +++ b/package/qt5/qt5xmlpatterns/qt5xmlpatterns.mk
>> @@ -20,8 +20,4 @@ ifeq ($(BR2_PACKAGE_QT5BASE_EXAMPLES),y)
>>   QT5XMLPATTERNS_LICENSE += , BSD-3-Clause (examples)
>>   endif
>> -ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_90620),y)
>> -QT5XMLPATTERNS_CONF_OPTS += "QMAKE_CXXFLAGS+=-O0"
>> -endif
>> -
>>   $(eval $(qmake-package))
>> diff --git a/toolchain/Config.in b/toolchain/Config.in
>> index 944e573f82..de5ef7a08f 100644
>> --- a/toolchain/Config.in
>> +++ b/toolchain/Config.in
>> @@ -170,15 +170,6 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_85862
>>       default y if BR2_microblaze
>>       depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
>> -# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620
>> -# ICE: in do_output_reload, at reload1.c:7978 on microblaze.
>> -# This bug no longer exists in gcc 10.x but reappeared in gcc 11.x
>> -config BR2_TOOLCHAIN_HAS_GCC_BUG_90620
>> -    bool
>> -    default y if BR2_microblaze
>> -    depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_10 \
>> -        || BR2_TOOLCHAIN_GCC_AT_LEAST_11
>> -
>>   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93847
>>   # ICE: compiler error: Segmentation fault on Nios II. This bug
>>   # no longer exists in gcc 9.x.
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] toolchain: remove gcc bug 90620
  2024-04-28 18:35   ` Giulio Benetti
@ 2024-05-09 15:48     ` Thomas Petazzoni via buildroot
  2024-05-09 20:19       ` Arnout Vandecappelle via buildroot
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-05-09 15:48 UTC (permalink / raw)
  To: Giulio Benetti; +Cc: Fabrice Fontaine, Romain Naour, Julien Corjon, buildroot

On Sun, 28 Apr 2024 20:35:30 +0200
Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:

> But this bug is Microblaze specific and the only 2 Microblaze external
> toolchains are the Bootlin's ones, where the oldest GCC version is
> 12.3.0, so as we've already done in the past with this commit:
> https://gitlab.com/buildroot.org/buildroot/-/commit/55fcba2a7c41d29f3f93bb37eec1264af4b45fb0
> 
> considering Buildroot free of bug 90620. If anyone will send a patch
> for new microblaze external-toolchains it's very unlikely they will
> contain gcc < 10.

Arnout's point is not about new toolchains (which will indeed be based
on a recent gcc), but rather on older custom external toolchains that
people might still be using.

I don't have a hard feeling on this one. Yes, supporting old external
toolchains is nice. On the other hand, at some point, we need to get
rid of those workarounds, but I'm not sure when is the good time.

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] toolchain: remove gcc bug 90620
  2024-05-09 15:48     ` Thomas Petazzoni via buildroot
@ 2024-05-09 20:19       ` Arnout Vandecappelle via buildroot
  0 siblings, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2024-05-09 20:19 UTC (permalink / raw)
  To: Thomas Petazzoni, Giulio Benetti
  Cc: Romain Naour, Fabrice Fontaine, Julien Corjon, buildroot



On 09/05/2024 17:48, Thomas Petazzoni wrote:
> On Sun, 28 Apr 2024 20:35:30 +0200
> Giulio Benetti <giulio.benetti@benettiengineering.com> wrote:
> 
>> But this bug is Microblaze specific and the only 2 Microblaze external
>> toolchains are the Bootlin's ones, where the oldest GCC version is
>> 12.3.0, so as we've already done in the past with this commit:
>> https://gitlab.com/buildroot.org/buildroot/-/commit/55fcba2a7c41d29f3f93bb37eec1264af4b45fb0
>>
>> considering Buildroot free of bug 90620. If anyone will send a patch
>> for new microblaze external-toolchains it's very unlikely they will
>> contain gcc < 10.

  Note that the first few releases of GCC 10 still had the bug, it was only 
fixed in GCC 10.2 or 10.3.


> Arnout's point is not about new toolchains (which will indeed be based
> on a recent gcc), but rather on older custom external toolchains that
> people might still be using.

  GCC 11 (which is definitely fixed) is only 3 years old. So for me it feels a 
bit early to remove this workaround.

  On the other hand, microblaze is such a niche platform that it shouldn't 
matter too much...

  Regards,
  Arnout

> 
> I don't have a hard feeling on this one. Yes, supporting old external
> toolchains is nice. On the other hand, at some point, we need to get
> rid of those workarounds, but I'm not sure when is the good time.
> 
> Thomas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2024-05-09 20:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-13  7:49 [Buildroot] [PATCH] toolchain: remove gcc bug 90620 Giulio Benetti
2024-04-28 17:18 ` Arnout Vandecappelle via buildroot
2024-04-28 18:35   ` Giulio Benetti
2024-05-09 15:48     ` Thomas Petazzoni via buildroot
2024-05-09 20:19       ` Arnout Vandecappelle via buildroot

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.