[Buildroot] [git commit branch/2022.08.x] package/collectd: work around gcc bug 68485

Peter Korsgaard peter at korsgaard.com
Wed Oct 12 15:43:43 UTC 2022


commit: https://git.buildroot.net/buildroot/commit/?id=c52157f6aabd1cc92026610efa48aae4fe1053dc
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2022.08.x

collectd is impacted by the microblaze-specific gcc bug #68485 [0].

As for all other impacted packages, force no optimisation when using a
toolchain riddled with that bug.

Fixes:
   http://autobuild.buildroot.net/results/6a8/6a87bbe17e6f606a97097800dc484a7b17bffa7d/

[0] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485

Signed-off-by: Giulio Benetti <giulio.benetti at benettiengineering.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
(cherry picked from commit 15f48d57f73da375ed28e582ab68740704b499fd)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 package/collectd/collectd.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/collectd/collectd.mk b/package/collectd/collectd.mk
index 5751757040..5510c265e8 100644
--- a/package/collectd/collectd.mk
+++ b/package/collectd/collectd.mk
@@ -27,6 +27,14 @@ COLLECTD_PLUGINS_DISABLE = \
 
 COLLECTD_CONF_ENV += LIBS="-lm"
 
+COLLECTD_CFLAGS = $(TARGET_CFLAGS)
+
+ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y)
+COLLECTD_CFLAGS += -O0
+endif
+
+COLLECTD_CONF_ENV += CFLAGS="$(COLLECTD_CFLAGS)"
+
 #
 # NOTE: There's also a third availible setting "intswap", which might
 # be needed on some old ARM hardware (see [2]), but is not being



More information about the buildroot mailing list