From: Thomas Petazzoni Date: Tue, 4 Jul 2017 14:47:51 +0000 (+0200) Subject: package/Makefile.in: fix musl handling X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=88cc3125730be66a2fbc732a1777981195620c06;p=buildroot.git package/Makefile.in: fix musl handling Until now, we had no support for full NLS with the musl C library: BR2_NEEDS_GETTEXT was only true for uClibc. But the musl C library provides a stub gettext implementation, which some packages were failing to recognize as being usable, and therefore we are passing autoconf cache variables to hint those packages that yes, the C library has a usable gettext implementation. However, we are going to enable full NLS support for musl, by giving the possibility to build gettext libintl with musl. In such a case, we do not want packages to use the gettext implementation of the C library, but really the one provided by gettext libintl. Therefore, we should only pre-seed the gt_cv_func_gnugettext1_libc*=yes variables if we're on musl but without gettext libintl. Otherwise packages will fail building because: - libintl.h is the one from the full-blown gettext implementation, so it assumes the package will link against -lintl - the package thinks gettext is provided by the C library, so it doesn't link with -lintl Signed-off-by: Thomas Petazzoni Reviewed-by: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Thomas Petazzoni --- diff --git a/package/Makefile.in b/package/Makefile.in index d30da3f1a7..b98333f796 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -338,7 +338,12 @@ endif # AM_GNU_GETTEXT misdetects musl gettext support. # musl currently implements api level 1 and 2 (basic + ngettext) # http://www.openwall.com/lists/musl/2015/04/16/3 -ifeq ($(BR2_TOOLCHAIN_USES_MUSL),y) +# +# These autoconf variables should only be pre-seeded when the minimal +# gettext implementation of musl is used. When the full blown +# implementation provided by gettext libintl is used, auto-detection +# works fine, and pre-seeding those values is actually wrong. +ifeq ($(BR2_TOOLCHAIN_USES_MUSL):$(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y:) BR2_GT_CV_FUNC_GNUGETTEXT_LIBC = \ gt_cv_func_gnugettext1_libc=yes \ gt_cv_func_gnugettext2_libc=yes