kumquat-buildroot/package/localedef/localedef.mk
Samuel Mendoza-Jonas 0ec7169e6c package/localedef: compile against glibc-2.29
In glibc 2.27 the following change occurred:
"Statically compiled applications attempting to load locales compiled
for the GNU C Library version 2.27 will fail and fall back to the
builtin C/POSIX locale."

This impacts us since upstream buildroot uses a localdef built against
an older eglibc release, as reported at [0].

This is a combination of my patch to move to glibc and Peter Seiderer's
patch to avoid building all of glibc just for localedef.

 [0] https://bugs.busybox.net/show_bug.cgi?id=11096

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
[localedef build & fixups:]
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
[Thomas: share the tarball with the glibc package]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2019-06-19 13:40:37 +02:00

52 lines
1.7 KiB
Makefile

################################################################################
#
# localedef
#
################################################################################
# Use the same VERSION and SITE as target glibc
# As in glibc.mk, generate version string using:
# git describe --match 'glibc-*' --abbrev=40 origin/release/MAJOR.MINOR/master | cut -d '-' -f 2-
LOCALEDEF_VERSION = 2.29-11-ge28ad442e73b00ae2047d89c8cc7f9b2a0de5436
LOCALEDEF_SOURCE = glibc-$(LOCALEDEF_VERSION).tar.gz
LOCALEDEF_SITE = $(call github,bminor,glibc,$(LOCALEDEF_VERSION))
LOCALEDEF_DEPENDENCIES = $(BR2_MAKE_HOST_DEPENDENCY)
HOST_LOCALEDEF_DL_SUBDIR = glibc
HOST_LOCALEDEF_CONF_ENV += ac_cv_prog_MAKE="$(BR2_MAKE)"
# Even though we use the autotools-package infrastructure, we have to override
# the default configure commands for since we have to build out-of-tree, but we
# can't use the same 'symbolic link to configure' used with the gcc packages.
define HOST_LOCALEDEF_CONFIGURE_CMDS
mkdir -p $(@D)/build
# Do the configuration
(cd $(@D)/build; \
$(HOST_LOCALEDEF_CONF_ENV) \
$(HOST_CONFIGURE_OPTS) \
$(SHELL) $(@D)/configure \
libc_cv_forced_unwind=yes \
libc_cv_ssp=no \
--target=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
--build=$(GNU_HOST_NAME) \
--prefix=/usr \
--with-pkgversion="Buildroot" \
--without-cvs \
--disable-profile \
--without-gd \
--enable-obsolete-rpc)
endef
define HOST_LOCALEDEF_BUILD_CMDS
$(HOST_MAKE_ENV) $(BR2_MAKE1) $(HOST_LOCALEDEF_MAKE_OPTS) \
-C $(@D)/build locale/others
endef
# The makefile does not implement an install target for localedef
define HOST_LOCALEDEF_INSTALL_CMDS
$(INSTALL) -D -m 0755 $(@D)/build/locale/localedef $(HOST_DIR)/bin/localedef
endef
$(eval $(host-autotools-package))