Commit 0ca23563 authored by kaltsi's avatar kaltsi

Use /usr/bin/localedef during qemu builds

Enabler for accelerating glibc build with sb2.
Signed-off-by: kaltsi's avatarJuha Kallioinen <juha.kallioinen@jollamobile.com>
Change-Id: Id037b0b356b2eb10f9a05f44d2f936d663599296
parent 0ca4c1df
diff -Naur eglibc-2.15.old/localedata/Makefile eglibc-2.15/localedata/Makefile
--- eglibc-2.15.old/localedata/Makefile 2011-11-17 21:56:08.000000000 +0000
+++ eglibc-2.15/localedata/Makefile 2013-03-18 15:25:40.078955980 +0000
@@ -159,7 +159,11 @@
# Dependency for the locale files. We actually make it depend only on
# one of the files.
$(addprefix $(objpfx),$(CTYPE_FILES)): %: \
- gen-locale.sh $(common-objpfx)locale/localedef Makefile \
+ if [ -f /usr/bin/localedef ]; then \
+ gen-locale.sh /usr/bin/localedef Makefile \
+ else \
+ gen-locale.sh $(common-objpfx)locale/localedef Makefile \
+ fi\
$(addprefix charmaps/,$(CHARMAPS)) $(addprefix locales/,$(LOCALE_SRCS))
@$(SHELL) -e gen-locale.sh $(common-objpfx) \
'$(if $(cross-localedef), \
@@ -235,8 +239,12 @@
INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES))
# Sometimes the whole collection of locale files should be installed.
-LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
-$(common-objpfx)elf/ld.so --library-path $(rpath-link) $(common-objpfx)locale/localedef
+ifeq (,$(wildcard /usr/bin/localedef))
+LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C $(common-objpfx)elf/ld.so --library-path $(rpath-link) $(common-objpfx)locale/localedef
+else
+LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C /usr/bin/localedef
+endif
+
install-locales: $(INSTALL-SUPPORTED-LOCALES)
install-locales-dir:
* Mon Mar 18 2013 Juha Kallioinen <juha.kallioinen@jollamobile.com> - 2.15
- If available, use /usr/bin/localedef in qemu builds
* Thu Mar 14 2013 Juha Kallioinen <juha.kallioinen@jollamobile.com> - 2.15
- Force -mfpu=vfpv3-d16 for armv7tnhl
......
......@@ -35,6 +35,7 @@ Patch9: eglibc-2.15-mips-async-unwind.patch
Patch10: eglibc-2.15-mips-no-n32-n64.patch
Patch11: glibc-2.14-locarchive-fedora.patch
Patch12: eglibc-2.15-disable-multilib.patch
Patch13: eglibc-2.15-use-usrbin-localedef.patch
Provides: ldconfig
# The dynamic linker supports DT_GNU_HASH
......@@ -195,6 +196,9 @@ If unsure if you need this, don't install this package.
%patch10 -p1
%patch11 -p1
%patch12 -p1
%if 0%{?qemu_user_space_build}
%patch13 -p1
%endif
# Not well formatted locales --cvm
sed -i "s|^localedata/locale-eo_EO.diff$||g" debian/patches/series
......@@ -366,12 +370,17 @@ rm locale-archive || :
# Intentionally we do not pass --alias-file=, aliases will be added
# by build-locale-archive.
# note that due to qemu-arm emulation behaviour, we need to break this up into multiple invocations.
# see BMC 10526.
find . -name '*_*' -maxdepth 1 | xargs -r -n10 -P1 --verbose \
$olddir/build-%{nptl_target_cpu}-linuxnptl/elf/ld.so \
--library-path $olddir/build-%{nptl_target_cpu}-linuxnptl/ \
$olddir/build-%{nptl_target_cpu}-linuxnptl/locale/localedef \
--prefix ${RPM_BUILD_ROOT} --add-to-archive
# see BMC 10526.
localedef_bin="$olddir/build-%{nptl_target_cpu}-linuxnptl/elf/ld.so --library-path $olddir/build-%{nptl_target_cpu}-linuxnptl/ $olddir/build-%{nptl_target_cpu}-linuxnptl/locale/localedef"
%if 0%{?qemu_user_space_build}
if [ -f /usr/bin/localedef ]; then
localedef_bin=/usr/bin/localedef
fi
%endif
find . -name '*_*' -maxdepth 1 | xargs -r -n10 -P1 --verbose $localedef_bin --prefix ${RPM_BUILD_ROOT} --add-to-archive
rm -rf *_*
mv locale-archive{,.tmpl}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment