diff --git a/package/chocolate-doom/chocolate-doom.mk b/package/chocolate-doom/chocolate-doom.mk index 54121c43aa..8c16a7fa30 100644 --- a/package/chocolate-doom/chocolate-doom.mk +++ b/package/chocolate-doom/chocolate-doom.mk @@ -21,6 +21,14 @@ CHOCOLATE_DOOM_CONF_OPTS = \ --with-sdl-prefix=$(STAGING_DIR)/usr \ --with-sdl-exec-prefix=$(STAGING_DIR)/usr +CHOCOLATE_DOOM_CFLAGS = $(TARGET_CFLAGS) + +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y) +CHOCOLATE_DOOM_CFLAGS += -O0 +endif + +CHOCOLATE_DOOM_CONF_ENV += CFLAGS="$(CHOCOLATE_DOOM_CFLAGS)" + ifeq ($(BR2_PACKAGE_LIBPNG),y) CHOCOLATE_DOOM_DEPENDENCIES += libpng CHOCOLATE_DOOM_CONF_OPTS += --with-libpng