diff --git a/package/protobuf/protobuf.mk b/package/protobuf/protobuf.mk index 9caf87ed93..919aae5b7d 100644 --- a/package/protobuf/protobuf.mk +++ b/package/protobuf/protobuf.mk @@ -17,6 +17,14 @@ PROTOBUF_LICENSE_FILES = LICENSE PROTOBUF_DEPENDENCIES = host-protobuf PROTOBUF_CONF_OPTS = --with-protoc=$(HOST_DIR)/bin/protoc +PROTOBUF_CXXFLAGS = $(TARGET_CXXFLAGS) + +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y) +PROTOBUF_CXXFLAGS += -O0 +endif + +PROTOBUF_CONF_ENV = CXXFLAGS="$(PROTOBUF_CXXFLAGS)" + ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y) PROTOBUF_CONF_ENV += LIBS=-latomic endif