diff --git a/package/belle-sip/belle-sip.mk b/package/belle-sip/belle-sip.mk index b5169be488..23b60e51f5 100644 --- a/package/belle-sip/belle-sip.mk +++ b/package/belle-sip/belle-sip.mk @@ -32,4 +32,12 @@ else ifeq ($(BR2_SHARED_LIBS),y) BELLE_SIP_CONF_OPTS += -DENABLE_SHARED=ON -DENABLE_STATIC=OFF endif +BELLE_SIP_CFLAGS = $(TARGET_CFLAGS) + +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_99140),y) +BELLE_SIP_CFLAGS += -O0 +endif + +BELLE_SIP_CONF_OPTS += -DCMAKE_C_FLAGS="$(BELLE_SIP_CFLAGS)" + $(eval $(cmake-package))