2
1
Эх сурвалжийг харах

Introduce BR2_TOOLCHAIN_USES_{UCLIBC, GLIBC}

Currently, when we need to do a conditional on the type of C library
used, we need to take into account the three toolchain backends. As we
are going to add eglibc support to the Buildroot toolchain backend, it
would become even uglier, so this patch introduces two new hidden
options: BR2_TOOLCHAIN_USES_UCLIBC and BR2_TOOLCHAIN_USES_GLIBC, that
exist regardless of the toolchain backend. The entire Buildroot code
base is converted to use those options.

Note that we have intentionally created only one option
(BR2_TOOLCHAIN_USES_GLIBC) for both glibc and eglibc, since they are
essentially the same, as far as Buildroot is concerned.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Thomas Petazzoni 12 жил өмнө
parent
commit
381616e77a

+ 1 - 1
Makefile

@@ -346,7 +346,7 @@ ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
 TARGETS+=target-purgelocales
 TARGETS+=target-purgelocales
 endif
 endif
 
 
-ifneq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC)$(BR2_TOOLCHAIN_CTNG_eglibc)$(BR2_TOOLCHAIN_CTNG_glibc),)
+ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
 ifneq ($(GENERATE_LOCALE),)
 ifneq ($(GENERATE_LOCALE),)
 TARGETS+=target-generatelocales
 TARGETS+=target-generatelocales
 endif
 endif

+ 1 - 1
package/Makefile.in

@@ -23,7 +23,7 @@ MAKE:=$(HOSTMAKE) -j$(PARALLEL_JOBS)
 # Compute GNU_TARGET_NAME
 # Compute GNU_TARGET_NAME
 GNU_TARGET_NAME=$(ARCH)-buildroot-linux-$(LIBC)$(ABI)
 GNU_TARGET_NAME=$(ARCH)-buildroot-linux-$(LIBC)$(ABI)
 
 
-ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_CTNG_uClibc)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC),y)
+ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
 LIBC=uclibc
 LIBC=uclibc
 else
 else
 LIBC=gnu
 LIBC=gnu

+ 1 - 1
package/boost/boost.mk

@@ -59,7 +59,7 @@ BOOST_OPT += toolset=gcc \
 	     runtime-link=$(if $(BR2_PREFER_STATIC_LIB),static,shared)
 	     runtime-link=$(if $(BR2_PREFER_STATIC_LIB),static,shared)
 
 
 ifeq ($(BR2_PACKAGE_BOOST_LOCALE),y)
 ifeq ($(BR2_PACKAGE_BOOST_LOCALE),y)
-ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)$(BR2_TOOLCHAIN_CTNG_uClibc),y)
+ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
 # posix backend needs monetary.h which isn't available on uClibc
 # posix backend needs monetary.h which isn't available on uClibc
 BOOST_OPT += boost.locale.posix=off
 BOOST_OPT += boost.locale.posix=off
 endif
 endif

+ 2 - 7
package/elfutils/Config.in

@@ -3,10 +3,7 @@ comment "elfutils requires a toolchain with LARGEFILE and WCHAR support"
 
 
 config BR2_PACKAGE_ELFUTILS
 config BR2_PACKAGE_ELFUTILS
 	bool "elfutils"
 	bool "elfutils"
-	select BR2_PACKAGE_ARGP_STANDALONE if \
-	       BR2_TOOLCHAIN_BUILDROOT   || \
-	       BR2_TOOLCHAIN_CTNG_uClibc || \
-	       BR2_TOOLCHAIN_EXTERNAL_UCLIBC
+	select BR2_PACKAGE_ARGP_STANDALONE if BR2_TOOLCHAIN_USES_UCLIBC
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	depends on BR2_LARGEFILE
 	depends on BR2_LARGEFILE
 	depends on BR2_USE_WCHAR
 	depends on BR2_USE_WCHAR
@@ -23,9 +20,7 @@ if BR2_PACKAGE_ELFUTILS
 
 
 config BR2_PACKAGE_ELFUTILS_PROGS
 config BR2_PACKAGE_ELFUTILS_PROGS
 	bool "Install programs"
 	bool "Install programs"
-	depends on BR2_TOOLCHAIN_EXTERNAL_GLIBC || \
-		   BR2_TOOLCHAIN_CTNG_glibc     || \
-		   BR2_TOOLCHAIN_CTNG_eglibc
+	depends on BR2_TOOLCHAIN_USES_GLIBC
 	help
 	help
 	  This option tells elfutils to not only install the libelf
 	  This option tells elfutils to not only install the libelf
 	  libraries, but also the elfutils programs.
 	  libraries, but also the elfutils programs.

+ 1 - 1
package/elfutils/elfutils.mk

@@ -37,7 +37,7 @@ endif
 ELFUTILS_CONF_ENV += \
 ELFUTILS_CONF_ENV += \
 	LDFLAGS="$(ELFUTILS_LDFLAGS)"
 	LDFLAGS="$(ELFUTILS_LDFLAGS)"
 
 
-ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)$(BR2_TOOLCHAIN_CTNG_uClibc),y)
+ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
  ELFUTILS_DEPENDENCIES += argp-standalone
  ELFUTILS_DEPENDENCIES += argp-standalone
 endif
 endif
 
 

+ 2 - 6
package/freescale-imx/gpu-viv-bin-mx6q/Config.in

@@ -1,7 +1,5 @@
 comment "gpu-viv-bin-mx6q requires a glibc toolchain"
 comment "gpu-viv-bin-mx6q requires a glibc toolchain"
-	depends on !(BR2_TOOLCHAIN_CTNG_glibc || \
-		BR2_TOOLCHAIN_CTNG_eglibc || \
-		BR2_TOOLCHAIN_EXTERNAL_GLIBC)
+	depends on !BR2_TOOLCHAIN_USES_GLIBC
 
 
 config BR2_PACKAGE_GPU_VIV_BIN_MX6Q
 config BR2_PACKAGE_GPU_VIV_BIN_MX6Q
 	bool "gpu-viv-bin-mx6q"
 	bool "gpu-viv-bin-mx6q"
@@ -9,9 +7,7 @@ config BR2_PACKAGE_GPU_VIV_BIN_MX6Q
 	select BR2_PACKAGE_HAS_OPENGL_ES
 	select BR2_PACKAGE_HAS_OPENGL_ES
 	depends on BR2_arm # Only relevant for i.MX6
 	depends on BR2_arm # Only relevant for i.MX6
 	 # Library binaries are linked against libc.so.6
 	 # Library binaries are linked against libc.so.6
-	depends on BR2_TOOLCHAIN_CTNG_glibc || \
-		BR2_TOOLCHAIN_CTNG_eglibc || \
-		BR2_TOOLCHAIN_EXTERNAL_GLIBC
+	depends on BR2_TOOLCHAIN_USES_GLIBC
 	help
 	help
 	  Userspace libraries for Vivante GPU on i.MX6 platforms
 	  Userspace libraries for Vivante GPU on i.MX6 platforms
 
 

+ 2 - 2
package/gpsd/Config.in

@@ -32,10 +32,10 @@ config BR2_PACKAGE_GPSD_OLDSTYLE
 
 
 config BR2_PACKAGE_GPSD_PROFILING
 config BR2_PACKAGE_GPSD_PROFILING
 	bool "profiling support"
 	bool "profiling support"
-	depends on !BR2_TOOLCHAIN_BUILDROOT && !BR2_TOOLCHAIN_CTNG_uClibc && !BR2_TOOLCHAIN_EXTERNAL_UCLIBC
+	depends on BR2_TOOLCHAIN_USES_GLIBC
 
 
 comment "profiling support not available with uClibc-based toolchain"
 comment "profiling support not available with uClibc-based toolchain"
-	depends on BR2_TOOLCHAIN_BUILDROOT || BR2_TOOLCHAIN_CTNG_uClibc || BR2_TOOLCHAIN_EXTERNAL_UCLIBC
+	depends on !BR2_TOOLCHAIN_USES_GLIBC
 
 
 config BR2_PACKAGE_GPSD_NTP_SHM
 config BR2_PACKAGE_GPSD_NTP_SHM
 	bool "NTP time hinting support"
 	bool "NTP time hinting support"

+ 1 - 1
package/gsl/gsl.mk

@@ -17,7 +17,7 @@ GSL_CONFIG_SCRIPTS = gsl-config
 # at: http://lists.busybox.net/pipermail/uclibc/2012-October/047067.html.
 # at: http://lists.busybox.net/pipermail/uclibc/2012-October/047067.html.
 # So we tell gsl that fenv related functions are not available in this
 # So we tell gsl that fenv related functions are not available in this
 # case.
 # case.
-ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)$(BR2_TOOLCHAIN_CTNG_uClibc),y)
+ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
 ifneq ($(BR2_i386),y)
 ifneq ($(BR2_i386),y)
 GSL_CONF_ENV = \
 GSL_CONF_ENV = \
        ac_cv_have_decl_feenableexcept=no \
        ac_cv_have_decl_feenableexcept=no \

+ 1 - 1
package/iozone/iozone.mk

@@ -15,7 +15,7 @@ IOZONE_LICENSE = IOzone license (NO DERIVED WORKS ALLOWED)
 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
 ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),)
 IOZONE_TARGET = linux-noth
 IOZONE_TARGET = linux-noth
 # AIO support not available on uClibc, use the linux (non-aio) target.
 # AIO support not available on uClibc, use the linux (non-aio) target.
-else ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)$(BR2_TOOLCHAIN_CTNG_uClibc),y)
+else ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
 IOZONE_TARGET = linux-noaio
 IOZONE_TARGET = linux-noaio
 else
 else
 IOZONE_TARGET = linux
 IOZONE_TARGET = linux

+ 4 - 4
package/libv4l/Config.in

@@ -13,21 +13,21 @@ if BR2_PACKAGE_LIBV4L
 
 
 config BR2_PACKAGE_LIBV4L_DECODE_TM6000
 config BR2_PACKAGE_LIBV4L_DECODE_TM6000
 	bool "decode_tm6000"
 	bool "decode_tm6000"
-	depends on BR2_TOOLCHAIN_EXTERNAL_GLIBC || BR2_TOOLCHAIN_CTNG_glibc || BR2_TOOLCHAIN_CTNG_eglibc
+	depends on BR2_TOOLCHAIN_USES_GLIBC
 	help
 	help
 	  Tool to decode tm6000 proprietary format streams
 	  Tool to decode tm6000 proprietary format streams
 
 
 comment "decode_tm6000 requires a GLIBC based toolchain"
 comment "decode_tm6000 requires a GLIBC based toolchain"
-	depends on !(BR2_TOOLCHAIN_EXTERNAL_GLIBC || BR2_TOOLCHAIN_CTNG_glibc || BR2_TOOLCHAIN_CTNG_eglibc)
+	depends on !BR2_TOOLCHAIN_USES_GLIBC
 
 
 config BR2_PACKAGE_LIBV4L_IR_KEYTABLE
 config BR2_PACKAGE_LIBV4L_IR_KEYTABLE
 	bool "ir-keytable"
 	bool "ir-keytable"
-	depends on BR2_TOOLCHAIN_EXTERNAL_GLIBC || BR2_TOOLCHAIN_CTNG_glibc || BR2_TOOLCHAIN_CTNG_eglibc
+	depends on BR2_TOOLCHAIN_USES_GLIBC
 	help
 	help
 	  Tool to alter keymaps of Remote Controller devices
 	  Tool to alter keymaps of Remote Controller devices
 
 
 comment "ir-keytable requires a GLIBC based toolchain"
 comment "ir-keytable requires a GLIBC based toolchain"
-	depends on !(BR2_TOOLCHAIN_EXTERNAL_GLIBC || BR2_TOOLCHAIN_CTNG_glibc || BR2_TOOLCHAIN_CTNG_eglibc)
+	depends on !BR2_TOOLCHAIN_USES_GLIBC
 
 
 config BR2_PACKAGE_LIBV4L_V4L2_COMPLIANCE
 config BR2_PACKAGE_LIBV4L_V4L2_COMPLIANCE
 	bool "v4l2-compliance"
 	bool "v4l2-compliance"

+ 1 - 1
package/ltp-testsuite/Config.in

@@ -1,6 +1,6 @@
 comment "ltp-testsuite needs specific uClibc options, see help"
 comment "ltp-testsuite needs specific uClibc options, see help"
 	depends on BR2_PACKAGE_LTP_TESTSUITE
 	depends on BR2_PACKAGE_LTP_TESTSUITE
-	depends on BR2_TOOLCHAIN_BUILDROOT || BR2_TOOLCHAIN_EXTERNAL_UCLIBC || BR2_TOOLCHAIN_CTNG_uClibc
+	depends on BR2_TOOLCHAIN_USES_UCLIBC
 
 
 config BR2_PACKAGE_LTP_TESTSUITE
 config BR2_PACKAGE_LTP_TESTSUITE
 	bool "ltp-testsuite"
 	bool "ltp-testsuite"

+ 1 - 3
package/mongrel2/Config.in

@@ -9,9 +9,7 @@ config BR2_PACKAGE_MONGREL2
 	# {get,make,swap}context functions present in
 	# {get,make,swap}context functions present in
 	# {e,}glibc and in uClibc's master branch. Source has arm workaround
 	# {e,}glibc and in uClibc's master branch. Source has arm workaround
 	depends on BR2_UCLIBC_VERSION_SNAPSHOT || \
 	depends on BR2_UCLIBC_VERSION_SNAPSHOT || \
-		BR2_TOOLCHAIN_EXTERNAL_GLIBC || \
-		BR2_TOOLCHAIN_CTNG_eglibc || \
-		BR2_TOOLCHAIN_CTNG_glibc || \
+		BR2_TOOLCHAIN_USES_GLIBC || \
 		BR2_arm
 		BR2_arm
 	help
 	help
 	  Mongrel2 is an application, language, and network architecture
 	  Mongrel2 is an application, language, and network architecture

+ 1 - 3
package/multimedia/gst-plugin-x170/Config.in

@@ -2,9 +2,7 @@ config BR2_PACKAGE_GST_PLUGIN_X170
 	bool "gst-plugin-x170"
 	bool "gst-plugin-x170"
 	depends on BR2_PACKAGE_GSTREAMER
 	depends on BR2_PACKAGE_GSTREAMER
 	depends on BR2_arm926t
 	depends on BR2_arm926t
-	depends on (BR2_TOOLCHAIN_EXTERNAL_GLIBC || \
-		BR2_TOOLCHAIN_CTNG_eglibc || \
-		BR2_TOOLCHAIN_CTNG_glibc) # on2-8170-libs
+	depends on BR2_TOOLCHAIN_USES_GLIBC # on2-8170-libs
 	select BR2_PACKAGE_ON2_8170_LIBS
 	select BR2_PACKAGE_ON2_8170_LIBS
 	help
 	help
 	  GStreamer plug-in to use the Hantro X170 video decoder present on
 	  GStreamer plug-in to use the Hantro X170 video decoder present on

+ 1 - 3
package/multimedia/on2-8170-libs/Config.in

@@ -1,9 +1,7 @@
 config BR2_PACKAGE_ON2_8170_LIBS
 config BR2_PACKAGE_ON2_8170_LIBS
 	#This is a binary only package which has been compiled for glibc
 	#This is a binary only package which has been compiled for glibc
 	depends on BR2_arm926t
 	depends on BR2_arm926t
-	depends on (BR2_TOOLCHAIN_EXTERNAL_GLIBC || \
-		BR2_TOOLCHAIN_CTNG_eglibc || \
-		BR2_TOOLCHAIN_CTNG_glibc)
+	depends on BR2_TOOLCHAIN_USES_GLIBC
 	depends on BR2_LINUX_KERNEL # on2-8170-modules
 	depends on BR2_LINUX_KERNEL # on2-8170-modules
 	select BR2_PACKAGE_ON2_8170_MODULES # runtime
 	select BR2_PACKAGE_ON2_8170_MODULES # runtime
 	bool "on2-8170-libs"
 	bool "on2-8170-libs"

+ 1 - 1
package/nbd/nbd.mk

@@ -11,7 +11,7 @@ NBD_CONF_OPT = $(if $(BR2_LARGEFILE),--enable-lfs,--disable-lfs)
 NBD_DEPENDENCIES = libglib2
 NBD_DEPENDENCIES = libglib2
 NBD_LICENSE = GPLv2
 NBD_LICENSE = GPLv2
 
 
-ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)$(BR2_TOOLCHAIN_CTNG_uClibc),y)
+ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
 # We have linux/falloc.h
 # We have linux/falloc.h
 # but uClibc lacks fallocate(2) which is a glibc-ism
 # but uClibc lacks fallocate(2) which is a glibc-ism
 NBD_CONF_ENV = ac_cv_header_linux_falloc_h=no
 NBD_CONF_ENV = ac_cv_header_linux_falloc_h=no

+ 1 - 1
package/network-manager/network-manager.mk

@@ -35,7 +35,7 @@ NETWORK_MANAGER_CONF_OPT = \
 		--disable-ifnet
 		--disable-ifnet
 
 
 # uClibc by default doesn't have backtrace support, so don't use it
 # uClibc by default doesn't have backtrace support, so don't use it
-ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)$(BR2_TOOLCHAIN_CTNG_uClibc),y)
+ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
 NETWORK_MANAGER_CONF_OPT += --disable-crashtrace
 NETWORK_MANAGER_CONF_OPT += --disable-crashtrace
 endif
 endif
 
 

+ 1 - 1
package/nss-mdns/Config.in

@@ -2,7 +2,7 @@ config BR2_PACKAGE_NSS_MDNS
 	bool "nss-mdns"
 	bool "nss-mdns"
 	# libdaemon->avahi uses fork()
 	# libdaemon->avahi uses fork()
 	depends on BR2_USE_MMU
 	depends on BR2_USE_MMU
-	depends on BR2_TOOLCHAIN_EXTERNAL_GLIBC || BR2_TOOLCHAIN_CTNG_eglibc || BR2_TOOLCHAIN_CTNG_glibc
+	depends on BR2_TOOLCHAIN_USES_GLIBC
 	depends on BR2_PACKAGE_AVAHI_DAEMON
 	depends on BR2_PACKAGE_AVAHI_DAEMON
 	help
 	help
 	  nss-mdns is a plugin for the GNU Name Service Switch (NSS)
 	  nss-mdns is a plugin for the GNU Name Service Switch (NSS)

+ 1 - 1
package/php/php.mk

@@ -24,7 +24,7 @@ PHP_CONFIG_SCRIPTS = php-config
 PHP_CFLAGS = $(TARGET_CFLAGS)
 PHP_CFLAGS = $(TARGET_CFLAGS)
 
 
 # Workaround for non-IPv6 uClibc toolchain
 # Workaround for non-IPv6 uClibc toolchain
-ifeq ($(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)$(BR2_TOOLCHAIN_CTNG_uClibc),y)
+ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
 ifneq ($(BR2_INET_IPV6),y)
 ifneq ($(BR2_INET_IPV6),y)
 	PHP_CFLAGS += -DHAVE_DEPRECATED_DNS_FUNCS
 	PHP_CFLAGS += -DHAVE_DEPRECATED_DNS_FUNCS
 endif
 endif

+ 1 - 1
package/squid/squid.mk

@@ -26,7 +26,7 @@ SQUID_CONF_OPT =	--enable-async-io=8 --enable-linux-netfilter \
 			--enable-external-acl-helpers="ip_user"
 			--enable-external-acl-helpers="ip_user"
 
 
 # On uClibc librt needs libpthread
 # On uClibc librt needs libpthread
-ifeq ($(BR2_TOOLCHAIN_HAS_THREADS)$(BR2_TOOLCHAIN_BUILDROOT)$(BR2_TOOLCHAIN_EXTERNAL_UCLIBC)$(BR2_TOOLCHAIN_CTNG_uClibc),yy)
+ifeq ($(BR2_TOOLCHAIN_HAS_THREADS)$(BR2_TOOLCHAIN_USES_UCLIBC),yy)
 	SQUID_CONF_ENV += ac_cv_search_shm_open="-lrt -lpthread"
 	SQUID_CONF_ENV += ac_cv_search_shm_open="-lrt -lpthread"
 endif
 endif
 
 

+ 1 - 1
package/tzdata/Config.in

@@ -1,6 +1,6 @@
 config BR2_PACKAGE_TZDATA
 config BR2_PACKAGE_TZDATA
 	bool "tzdata"
 	bool "tzdata"
-	depends on BR2_TOOLCHAIN_EXTERNAL_GLIBC || BR2_TOOLCHAIN_CTNG_eglibc || BR2_TOOLCHAIN_CTNG_glibc
+	depends on BR2_TOOLCHAIN_USES_GLIBC
 	help
 	help
 	  Time zone database
 	  Time zone database
 
 

+ 16 - 0
toolchain/Config.in

@@ -1,4 +1,19 @@
 menu "Toolchain"
 menu "Toolchain"
+
+# Should be selected for glibc or eglibc
+config BR2_TOOLCHAIN_USES_GLIBC
+	bool
+	select BR2_LARGEFILE
+	select BR2_INET_IPV6
+	select BR2_USE_WCHAR
+	select BR2_ENABLE_LOCALE
+	select BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
+	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
+
+config BR2_TOOLCHAIN_USES_UCLIBC
+	bool
+
 choice
 choice
 	prompt "Toolchain type"
 	prompt "Toolchain type"
 	help
 	help
@@ -12,6 +27,7 @@ config BR2_TOOLCHAIN_BUILDROOT
 	bool "Buildroot toolchain"
 	bool "Buildroot toolchain"
 	depends on !BR2_microblaze && !BR2_aarch64
 	depends on !BR2_microblaze && !BR2_aarch64
 	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
 	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
+	select BR2_TOOLCHAIN_USES_UCLIBC
 
 
 config BR2_TOOLCHAIN_EXTERNAL
 config BR2_TOOLCHAIN_EXTERNAL
 	bool "External toolchain"
 	bool "External toolchain"

+ 2 - 6
toolchain/toolchain-common.in

@@ -62,9 +62,7 @@ config BR2_GENERATE_LOCALE
 	# build time.
 	# build time.
 	depends on \
 	depends on \
 		BR2_TOOLCHAIN_BUILDROOT      || \
 		BR2_TOOLCHAIN_BUILDROOT      || \
-		BR2_TOOLCHAIN_EXTERNAL_GLIBC || \
-		BR2_TOOLCHAIN_CTNG_eglibc    || \
-		BR2_TOOLCHAIN_CTNG_glibc
+		BR2_TOOLCHAIN_USES_GLIBC
 	help
 	help
 	  Generate support for a list of locales. Locales can be
 	  Generate support for a list of locales. Locales can be
 	  specified with or without encoding, when no encoding is
 	  specified with or without encoding, when no encoding is
@@ -79,9 +77,7 @@ config BR2_GENERATE_LOCALE
 
 
 config BR2_NEEDS_GETTEXT
 config BR2_NEEDS_GETTEXT
 	bool
 	bool
-	default y if BR2_TOOLCHAIN_BUILDROOT
-	default y if BR2_TOOLCHAIN_EXTERNAL_UCLIBC
-	default y if BR2_TOOLCHAIN_CTNG_uClibc
+	default y if BR2_TOOLCHAIN_USES_UCLIBC
 
 
 config BR2_NEEDS_GETTEXT_IF_LOCALE
 config BR2_NEEDS_GETTEXT_IF_LOCALE
 	bool
 	bool

+ 3 - 8
toolchain/toolchain-crosstool-ng/Config.in

@@ -7,27 +7,22 @@ choice
 
 
 config BR2_TOOLCHAIN_CTNG_uClibc
 config BR2_TOOLCHAIN_CTNG_uClibc
 	bool "uClibc"
 	bool "uClibc"
+	select BR2_TOOLCHAIN_USES_UCLIBC
 
 
 # Although eglibc can be configured to opt-out some features,
 # Although eglibc can be configured to opt-out some features,
 # let's not deal with that for the time being, it's complex...
 # let's not deal with that for the time being, it's complex...
 config BR2_TOOLCHAIN_CTNG_eglibc
 config BR2_TOOLCHAIN_CTNG_eglibc
 	bool "eglibc"
 	bool "eglibc"
-	select BR2_LARGEFILE
-	select BR2_INET_IPV6
 	# Our default ct-ng configuration uses eglibc 2.12, which has
 	# Our default ct-ng configuration uses eglibc 2.12, which has
 	# native RPC support
 	# native RPC support
 	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	select BR2_TOOLCHAIN_HAS_NATIVE_RPC
-	select BR2_ENABLE_LOCALE
-	select BR2_USE_WCHAR
+	select BR2_TOOLCHAIN_USES_GLIBC
 
 
 config BR2_TOOLCHAIN_CTNG_glibc
 config BR2_TOOLCHAIN_CTNG_glibc
 	bool "glibc"
 	bool "glibc"
-	select BR2_LARGEFILE
-	select BR2_INET_IPV6
 	# Our default ct-ng configuration uses glibc 2.14.1, which
 	# Our default ct-ng configuration uses glibc 2.14.1, which
 	# does not have native RPC support
 	# does not have native RPC support
-	select BR2_ENABLE_LOCALE
-	select BR2_USE_WCHAR
+	select BR2_TOOLCHAIN_USES_GLIBC
 
 
 endchoice # C library
 endchoice # C library
 
 

+ 2 - 7
toolchain/toolchain-external/Config.in

@@ -815,16 +815,11 @@ config BR2_TOOLCHAIN_EXTERNAL_PREFIX
 
 
 config BR2_TOOLCHAIN_EXTERNAL_GLIBC
 config BR2_TOOLCHAIN_EXTERNAL_GLIBC
 	bool
 	bool
-	select BR2_LARGEFILE
-	select BR2_INET_IPV6
-	select BR2_USE_WCHAR
-	select BR2_ENABLE_LOCALE
-	select BR2_TOOLCHAIN_HAS_THREADS
-	select BR2_TOOLCHAIN_HAS_THREADS_DEBUG
-	select BR2_TOOLCHAIN_HAS_SHADOW_PASSWORDS
+	select BR2_TOOLCHAIN_USES_GLIBC
 
 
 config BR2_TOOLCHAIN_EXTERNAL_UCLIBC
 config BR2_TOOLCHAIN_EXTERNAL_UCLIBC
 	bool
 	bool
+	select BR2_TOOLCHAIN_USES_UCLIBC
 
 
 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM
 if BR2_TOOLCHAIN_EXTERNAL_CUSTOM