From 4900fc717cea67a6e2692c714377d27093a5f76a Mon Sep 17 00:00:00 2001 From: Giulio Benetti Date: Fri, 29 Jul 2022 14:10:55 +0200 Subject: [PATCH] package/mariadb: work around gcc bug 68485 With Microblaze Gcc version <= 12.x the build fails due to gcc bug 68485: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485. The bug show up when building mariadb with optimization but not when building with -O0. To work around this, if BR2_TOOLCHAIN_HAS_GCC_BUG_68458=y, we force using -O0. Fixes: http://autobuild.buildroot.net/results/9b5/9b5dce4958b602c80140440addb1f072332e53c2/ Signed-off-by: Giulio Benetti Signed-off-by: Thomas Petazzoni --- package/mariadb/mariadb.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/mariadb/mariadb.mk b/package/mariadb/mariadb.mk index 06fd1484b6..4c855985b1 100644 --- a/package/mariadb/mariadb.mk +++ b/package/mariadb/mariadb.mk @@ -82,6 +82,10 @@ ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) MARIADB_CXXFLAGS += -latomic endif +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y) +MARIADB_CXXFLAGS += -O0 +endif + MARIADB_CONF_OPTS += \ -DCMAKE_CXX_FLAGS="$(MARIADB_CXXFLAGS)" \ -DINSTALL_DOCDIR=share/doc/mariadb-$(MARIADB_VERSION) \