diff --git a/package/binutils/Config.in b/package/binutils/Config.in index e17a8ec65a..5e1a769998 100644 --- a/package/binutils/Config.in +++ b/package/binutils/Config.in @@ -2,6 +2,7 @@ config BR2_PACKAGE_BINUTILS bool "binutils" depends on !BR2_nios2 depends on BR2_USE_WCHAR + select BR2_PACKAGE_ZLIB help Install binutils on the target diff --git a/package/binutils/binutils.mk b/package/binutils/binutils.mk index bfad25422d..13f61be035 100644 --- a/package/binutils/binutils.mk +++ b/package/binutils/binutils.mk @@ -25,7 +25,7 @@ BINUTILS_SITE ?= $(BR2_GNU_MIRROR)/binutils BINUTILS_SOURCE ?= binutils-$(BINUTILS_VERSION).tar.xz BINUTILS_EXTRA_CONFIG_OPTIONS = $(call qstrip,$(BR2_BINUTILS_EXTRA_CONFIG_OPTIONS)) BINUTILS_INSTALL_STAGING = YES -BINUTILS_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES) +BINUTILS_DEPENDENCIES = zlib $(TARGET_NLS_DEPENDENCIES) BINUTILS_MAKE_OPTS = LIBS=$(TARGET_NLS_LIBS) BINUTILS_LICENSE = GPL-3.0+, libiberty LGPL-2.1+ BINUTILS_LICENSE_FILES = COPYING3 COPYING.LIB @@ -51,6 +51,7 @@ BINUTILS_CONF_OPTS = \ --target=$(GNU_TARGET_NAME) \ --enable-install-libiberty \ --enable-build-warnings=no \ + --with-system-zlib \ $(BINUTILS_DISABLE_GDB_CONF_OPTS) \ $(BINUTILS_EXTRA_CONFIG_OPTIONS) @@ -74,10 +75,6 @@ ifeq ($(BR2_ARM_CPU_ARMV7M)$(BR2_OPTIMIZE_S),yy) BINUTILS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -O2" endif -ifeq ($(BR2_PACKAGE_ZLIB),y) -BINUTILS_DEPENDENCIES += zlib -endif - # "host" binutils should actually be "cross" # We just keep the convention of "host utility" for now HOST_BINUTILS_CONF_OPTS = \