package/syslog-ng: work around gcc bug 101915

With Microblaze Gcc version 12.1.0 the build fails due to gcc bug
101915: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101915. The bug
show up when building syslog-ng with optimization but not when building
with -O0. To work around this, if BR2_TOOLCHAIN_HAS_GCC_BUG_101915=y,
we force using -O0.

Fixes:
http://autobuild.buildroot.net/results/b57/b57d51ed320a8e1bbfcf8d44875c113d868f82ee/

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Giulio Benetti 2022-08-07 00:22:02 +02:00 committed by Thomas Petazzoni
parent 563f0de8c2
commit 2dc8b0dd74

View File

@ -17,6 +17,13 @@ SYSLOG_NG_DEPENDENCIES = host-bison host-flex host-pkgconf \
SYSLOG_NG_AUTORECONF = YES
SYSLOG_NG_CONF_OPTS = --disable-manpages --localstatedir=/var/run \
--disable-java --disable-java-modules --disable-mongodb
SYSLOG_NG_CFLAGS = $(TARGET_CFLAGS)
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_101915),y)
SYSLOG_NG_CFLAGS += -O0
endif
SYSLOG_NG_CONF_ENV = CFLAGS="$(SYSLOG_NG_CFLAGS)"
ifeq ($(BR2_PACKAGE_GEOIP),y)
SYSLOG_NG_DEPENDENCIES += geoip