Commit 381616e7 authored by Thomas Petazzoni's avatar Thomas Petazzoni Committed by Peter Korsgaard
Browse files

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: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
parent 12d1aa4b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -346,7 +346,7 @@ ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
TARGETS+=target-purgelocales
endif

ifneq ($(BR2_TOOLCHAIN_EXTERNAL_GLIBC)$(BR2_TOOLCHAIN_CTNG_eglibc)$(BR2_TOOLCHAIN_CTNG_glibc),)
ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y)
ifneq ($(GENERATE_LOCALE),)
TARGETS+=target-generatelocales
endif
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ MAKE:=$(HOSTMAKE) -j$(PARALLEL_JOBS)
# Compute GNU_TARGET_NAME
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
else
LIBC=gnu
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ BOOST_OPT += toolset=gcc \
	     runtime-link=$(if $(BR2_PREFER_STATIC_LIB),static,shared)

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
BOOST_OPT += boost.locale.posix=off
endif
+2 −7
Original line number Diff line number Diff line
@@ -3,10 +3,7 @@ comment "elfutils requires a toolchain with LARGEFILE and WCHAR support"

config BR2_PACKAGE_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
	depends on BR2_LARGEFILE
	depends on BR2_USE_WCHAR
@@ -23,9 +20,7 @@ if BR2_PACKAGE_ELFUTILS

config BR2_PACKAGE_ELFUTILS_PROGS
	bool "Install programs"
	depends on BR2_TOOLCHAIN_EXTERNAL_GLIBC || \
		   BR2_TOOLCHAIN_CTNG_glibc     || \
		   BR2_TOOLCHAIN_CTNG_eglibc
	depends on BR2_TOOLCHAIN_USES_GLIBC
	help
	  This option tells elfutils to not only install the libelf
	  libraries, but also the elfutils programs.
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ endif
ELFUTILS_CONF_ENV += \
	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
endif

Loading