binutils: use the new gettext logic
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 3 Jul 2017 20:40:02 +0000 (22:40 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 4 Jul 2017 23:27:24 +0000 (01:27 +0200)
This commit switches to use the new gettext logic, which involves:

 - using TARGET_NLS_DEPENDENCIES instead of hand-encoded dependencies
   on gettext/host-gettext

 - using TARGET_NLS_LIBS to force linking against libintl. This wasn't
   done so far, but is needed for the build to work, because uClibc
   now has a stub gettext implementation, which is mistaken as being
   the full gettext implementation by the configure script

 - dropping BR2_PACKAGE_GETTEXT selection

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/binutils/Config.in
package/binutils/binutils.mk

index 360dd5e3b222087416f70118967a1ea173e4e133..e17a8ec65acabad084525b96ea4d1a285aebbbea 100644 (file)
@@ -2,7 +2,6 @@ config BR2_PACKAGE_BINUTILS
        bool "binutils"
        depends on !BR2_nios2
        depends on BR2_USE_WCHAR
-       select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
        help
          Install binutils on the target
 
index 0dc20a082dc5346299d93d8ee578ad394534d748..c64ec47292ecc7fd3927a7939a8dc5b6350305fd 100644 (file)
@@ -24,7 +24,8 @@ BINUTILS_SITE ?= $(BR2_GNU_MIRROR)/binutils
 BINUTILS_SOURCE ?= binutils-$(BINUTILS_VERSION).tar.bz2
 BINUTILS_EXTRA_CONFIG_OPTIONS = $(call qstrip,$(BR2_BINUTILS_EXTRA_CONFIG_OPTIONS))
 BINUTILS_INSTALL_STAGING = YES
-BINUTILS_DEPENDENCIES = $(if $(BR2_NEEDS_GETTEXT_IF_LOCALE),gettext)
+BINUTILS_DEPENDENCIES = $(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