diff --git a/package/bind/bind.mk b/package/bind/bind.mk index f46d1a8a54..b934ab3190 100644 --- a/package/bind/bind.mk +++ b/package/bind/bind.mk @@ -28,7 +28,6 @@ BIND_TARGET_SERVER_SBIN += dnssec-keyfromlabel dnssec-signzone tsig-keygen BIND_TARGET_TOOLS_BIN = dig host nslookup nsupdate BIND_CONF_ENV = \ BUILD_CC="$(TARGET_CC)" \ - BUILD_CFLAGS="$(TARGET_CFLAGS)" \ LIBS=`$(PKG_CONFIG_HOST_BINARY) --libs openssl` BIND_CONF_OPTS = \ --without-cmocka \ @@ -39,6 +38,14 @@ BIND_CONF_OPTS = \ BIND_DEPENDENCIES = host-pkgconf libuv openssl +BIND_CFLAGS = $(TARGET_CFLAGS) + +ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_101737),y) +BIND_CFLAGS += -O0 +endif + +BIND_CONF_OPTS += CFLAGS="$(BIND_CFLAGS)" + ifeq ($(BR2_PACKAGE_ZLIB),y) BIND_CONF_OPTS += --with-zlib BIND_DEPENDENCIES += zlib