package/sg3_utils: fix build failure due to gcc bug 104028

The sg3_utils package exhibits gcc bug 104028 when built for the M68K
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_GCC_BUG_104028=y like we
already do for BR2_TOOLCHAIN_HAS_GCC_BUG_85180=y.

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

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-01-14 11:55:11 +01:00 committed by Thomas Petazzoni
parent 7b6bdf6bcb
commit 283573f9b3

View File

@ -24,6 +24,14 @@ ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
SG3_UTILS_CONF_ENV += LIBS="-latomic"
endif
SG3_UTILS_CFLAGS = $(TARGET_CFLAGS)
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_104028),y)
SG3_UTILS_CFLAGS += -O0
endif
SG3_UTILS_CONF_ENV += CFLAGS="$(SG3_UTILS_CFLAGS)"
ifeq ($(BR2_PACKAGE_SG3_UTILS_PROGS),)
define SG3_UTILS_REMOVE_PROGS
for prog in \