E2FSPROGS="e2fsprogs-1.42.9"
EASYTAG="easytag-2.2.3"
ECRYPTFS_UTILS="ecryptfs-utils_103"
-EGLIBC="eglibc-2.15-r17386"
-EGLIBC_PORTS="eglibc-ports-2.15-r17386"
+GLIBC="glibc-2.19"
UCLIBC="uClibc-0.9.30.1"
EMACS="emacs-24.2"
ESOUND="esound-0.2.37"
ipkg ${BINUTILS}
ipkg -l "${GCC}-pass1" ${GCC}
-ipkg ${EGLIBC}
+ipkg ${GLIBC}
ipkg -l "${GCC}-pass2" ${GCC}
exit $?
fpkg -e "tar.gz" ${CLOOG} "http://www.bastoul.net/cloog/pages/download"
fpkg -e "tar.bz2" -m gnu ${BINUTILS}
fpkg -m gnu -s "gcc/${GCC}" ${GCC}
-fpkg ${EGLIBC} ${CLFS_PKG_COSMO_URL}
-fpkg ${EGLIBC_PORTS} ${CLFS_PKG_COSMO_URL}
+fpkg -m gnu ${GLIBC}
exit $?
+++ /dev/null
-Submitted By: Jonathan Norman (jonathan at bluesquarelinux dot co dot uk)
-Date: 2012-02-16
-Initial Package Version: 2.15
-Origin: http://sourceware.org/ml/libc-alpha/2011-06/msg00010.html
-Upstream Status: Submitted
-Description: Fixes segfault with sound devices / output.
-
-diff -Naur eglibc-2_15.orig/elf/dl-close.c eglibc-2_15/elf/dl-close.c
---- eglibc-2_15.orig/elf/dl-close.c 2012-02-16 09:31:47.478224779 +0000
-+++ eglibc-2_15/elf/dl-close.c 2012-02-16 09:37:17.287098571 +0000
-@@ -119,17 +119,8 @@
- if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
- || dl_close_state != not_pending)
- {
-- if (map->l_direct_opencount == 0)
-- {
-- if (map->l_type == lt_loaded)
-- dl_close_state = rerun;
-- else if (map->l_type == lt_library)
-- {
-- struct link_map **oldp = map->l_initfini;
-- map->l_initfini = map->l_orig_initfini;
-- _dl_scope_free (oldp);
-- }
-- }
-+ if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
-+ dl_close_state = rerun;
-
- /* There are still references to this object. Do nothing more. */
- if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0))
-diff -Naur eglibc-2_15.orig/elf/dl-deps.c eglibc-2_15/elf/dl-deps.c
---- eglibc-2_15.orig/elf/dl-deps.c 2012-02-16 09:31:47.474224671 +0000
-+++ eglibc-2_15/elf/dl-deps.c 2012-02-16 09:39:54.791335897 +0000
-@@ -489,6 +489,8 @@
- nneeded * sizeof needed[0]);
- atomic_write_barrier ();
- l->l_initfini = l_initfini;
-+ l->l_free_initfini = 1;
-+
- }
-
- /* If we have no auxiliary objects just go on to the next map. */
-@@ -689,6 +691,7 @@
- l_initfini[nlist] = NULL;
- atomic_write_barrier ();
- map->l_initfini = l_initfini;
-+ map->l_free_initfini = 1;
- if (l_reldeps != NULL)
- {
- atomic_write_barrier ();
-@@ -697,7 +700,7 @@
- _dl_scope_free (old_l_reldeps);
- }
- if (old_l_initfini != NULL)
-- map->l_orig_initfini = old_l_initfini;
-+ _dl_scope_free (old_l_initfini);
-
- if (errno_reason)
- _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
-diff -Naur eglibc-2_15.orig/elf/dl-libc.c eglibc-2_15/elf/dl-libc.c
---- eglibc-2_15.orig/elf/dl-libc.c 2012-02-16 09:31:47.478224779 +0000
-+++ eglibc-2_15/elf/dl-libc.c 2012-02-16 09:32:43.619735410 +0000
-@@ -284,6 +284,10 @@
- if (! old->dont_free)
- free (old);
- }
-+
-+ /* Free the initfini dependency list. */
-+ if (l->l_free_initfini)
-+ free (l->l_initfini);
- }
-
- if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0
-diff -Naur eglibc-2_15.orig/elf/rtld.c eglibc-2_15/elf/rtld.c
---- eglibc-2_15.orig/elf/rtld.c 2012-02-16 09:31:47.470224563 +0000
-+++ eglibc-2_15/elf/rtld.c 2012-02-16 09:35:01.611448263 +0000
-@@ -2277,6 +2277,7 @@
- lnp->dont_free = 1;
- lnp = lnp->next;
- }
-+ l->l_free_initfini = 0;
-
- if (l != &GL(dl_rtld_map))
- _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
-diff -Naur eglibc-2_15.orig/include/link.h eglibc-2_15/include/link.h
---- eglibc-2_15.orig/include/link.h 2012-02-16 09:31:47.710231021 +0000
-+++ eglibc-2_15/include/link.h 2012-02-16 09:42:04.610828212 +0000
-@@ -192,6 +192,9 @@
- during LD_TRACE_PRELINKING=1
- contains any DT_SYMBOLIC
- libraries. */
-+ unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
-+ freed, ie. not allocated with
-+ the dummy malloc in ld.so. */
-
- /* Collected information about own RPATH directories. */
- struct r_search_path_struct l_rpath_dirs;
-@@ -240,9 +243,6 @@
-
- /* List of object in order of the init and fini calls. */
- struct link_map **l_initfini;
-- /* The init and fini list generated at startup, saved when the
-- object is also loaded dynamically. */
-- struct link_map **l_orig_initfini;
-
- /* List of the dependencies introduced through symbol binding. */
- struct link_map_reldeps
--- /dev/null
+diff -Naur glibc-2.19.orig/timezone/Makefile glibc-2.19.new/timezone/Makefile
+--- glibc-2.19.orig/timezone/Makefile 2014-02-07 04:04:38.000000000 -0500
++++ glibc-2.19.new/timezone/Makefile 2014-05-19 22:14:31.149679212 -0400
+@@ -114,7 +114,7 @@
+
+ $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
+ sed -e 's|/bin/bash|$(KSH)|g' \
+- -e '/TZDIR=/s|\$$(pwd)|$(zonedir)|' \
++ -e '/TZDIR=/s|`pwd`|$(zonedir)|' \
+ -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \
+ -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \
+ -e '/REPORT_BUGS_TO=/s|=.*|="$(REPORT_BUGS_TO)"|' \
+++ /dev/null
-#!/bin/bash
-
-hvconfig_pre()
-{
- export BUILD_CC="gcc"
- export CC="${CLFS_TARGET}-gcc ${CLFS_BUILDFLAGS}"
- export AR="${CLFS_TARGET}-ar"
- export RANLIB="${CLFS_TARGET}-ranlib"
-
- # --with-headers
- # tells GLIBC where the Linux kernel headers are installed.
- # --enable-obsolete-rpc
- # install rpc headers that are not installed by default but may be
- # needed by other packages.
- CONFIGURE_OPTS="\
- --prefix=/tools \
- --host=${CLFS_TARGET} \
- --build=${CLFS_HOST} \
- --disable-profile \
- --enable-add-ons \
- --with-tls \
- --enable-kernel=$(get_pkg_ver3 ${KERNEL}) \
- --with-__thread \
- --with-binutils=/cross-tools/bin \
- --with-headers=/tools/include"
-
- cd ${LFS_TMP}/${PACKAGE}
-
- decompress_package ${EGLIBC_PORTS} $(pwd) 1> /dev/null
-
- # libgcc_eh.a does not get built if building GCC with `--disable-shared'.
- # The objects that would otherwise end up in libgcc_eh.a end up in libgcc.a
- # instead. Unfortunately, Glibc insists upon linking with `-lgcc_eh'.
- # Therefore, disable linking to libgcc_eh:
- sed -e 's/-lgcc_eh//g' -i Makeconfig
-}
-
-# For Glibc to support NPTL:
-hvconfig_cache()
-{
-cat > ${LFS_TMP}/${PACKAGE}-build/config.cache << EOF
-libc_cv_forced_unwind=yes
-libc_cv_c_cleanup=yes
-libc_cv_gnu89_inline=yes
-libc_cv_ssp=no
-EOF
-}
-
-hvbuild()
-{
- ${HVMAKE}
- ${HVMAKE} install inst_vardbdir=/tools/var/db
-}
-
-hvconfig_post()
-{
- unset BUILD_CC
- unset CC
- unset AR
- unset RANLIB
-}
--- /dev/null
+#!/bin/bash
+
+hvconfig_pre()
+{
+ export BUILD_CC="gcc"
+ export CC="${CLFS_TARGET}-gcc ${CLFS_BUILDFLAGS}"
+ export AR="${CLFS_TARGET}-ar"
+ export RANLIB="${CLFS_TARGET}-ranlib"
+
+ # --with-headers
+ # tells GLIBC where the Linux kernel headers are installed.
+ # --enable-obsolete-rpc
+ # install rpc headers that are not installed by default but may be
+ # needed by other packages.
+ CONFIGURE_OPTS="\
+ --prefix=/tools \
+ --host=${CLFS_TARGET} \
+ --build=${CLFS_HOST} \
+ --disable-profile \
+ --with-tls \
+ --enable-kernel=$(get_pkg_ver3 ${KERNEL}) \
+ --with-__thread \
+ --with-binutils=/cross-tools/bin \
+ --enable-obsolete-rpc \
+ --with-headers=/tools/include"
+}
+
+# For Glibc to support NPTL:
+hvconfig_cache()
+{
+cat > ${LFS_TMP}/${PACKAGE}-build/config.cache << EOF
+libc_cv_forced_unwind=yes
+libc_cv_c_cleanup=yes
+libc_cv_gnu89_inline=yes
+libc_cv_ssp=no
+EOF
+}
+
+hvconfig_post()
+{
+ unset BUILD_CC
+ unset CC
+ unset AR
+ unset RANLIB
+}
# When Bash is cross-compiled, it cannot test for the presence of named pipes,
# among other things. If you used su to become an unprivileged user, this
# combination will cause Bash to build without process substitution, which
-# will break one of the C++ test scripts in eglibc. The following prevents
+# will break one of the C++ test scripts in glibc. The following prevents
# future problems by skipping the check for named pipes, as well as other tests
# that can not run while cross-compiling or that do not run properly:
hvconfig_cache()
ipkg -m noac -l "kernel-headers" -s "kernel-headers" ${KERNEL}
ipkg -m noac ${MANPAGES}
-ipkg ${EGLIBC}
+ipkg ${GLIBC}
rscr once "Adjusting toolchain" toolchain-adjust
rscr mult "Testing toolchain" toolchain-test
# These packages were already downloaded for stage0:
lpkg 0 ${KERNEL}
-lpkg 0 ${EGLIBC}
+lpkg 0 ${GLIBC}
lpkg 0 ${GMP}
lpkg 0 ${MPFR}
lpkg 0 ${MPC}
+++ /dev/null
-Submitted By: Jonathan Norman (jonathan at bluesquarelinux dot co dot uk)
-Date: 2012-02-16
-Initial Package Version: 2.15
-Origin: http://sourceware.org/ml/libc-alpha/2011-06/msg00010.html
-Upstream Status: Submitted
-Description: Fixes segfault with sound devices / output.
-
-diff -Naur eglibc-2_15.orig/elf/dl-close.c eglibc-2_15/elf/dl-close.c
---- eglibc-2_15.orig/elf/dl-close.c 2012-02-16 09:31:47.478224779 +0000
-+++ eglibc-2_15/elf/dl-close.c 2012-02-16 09:37:17.287098571 +0000
-@@ -119,17 +119,8 @@
- if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
- || dl_close_state != not_pending)
- {
-- if (map->l_direct_opencount == 0)
-- {
-- if (map->l_type == lt_loaded)
-- dl_close_state = rerun;
-- else if (map->l_type == lt_library)
-- {
-- struct link_map **oldp = map->l_initfini;
-- map->l_initfini = map->l_orig_initfini;
-- _dl_scope_free (oldp);
-- }
-- }
-+ if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
-+ dl_close_state = rerun;
-
- /* There are still references to this object. Do nothing more. */
- if (__builtin_expect (GLRO_dl_debug_mask & DL_DEBUG_FILES, 0))
-diff -Naur eglibc-2_15.orig/elf/dl-deps.c eglibc-2_15/elf/dl-deps.c
---- eglibc-2_15.orig/elf/dl-deps.c 2012-02-16 09:31:47.474224671 +0000
-+++ eglibc-2_15/elf/dl-deps.c 2012-02-16 09:39:54.791335897 +0000
-@@ -489,6 +489,8 @@
- nneeded * sizeof needed[0]);
- atomic_write_barrier ();
- l->l_initfini = l_initfini;
-+ l->l_free_initfini = 1;
-+
- }
-
- /* If we have no auxiliary objects just go on to the next map. */
-@@ -689,6 +691,7 @@
- l_initfini[nlist] = NULL;
- atomic_write_barrier ();
- map->l_initfini = l_initfini;
-+ map->l_free_initfini = 1;
- if (l_reldeps != NULL)
- {
- atomic_write_barrier ();
-@@ -697,7 +700,7 @@
- _dl_scope_free (old_l_reldeps);
- }
- if (old_l_initfini != NULL)
-- map->l_orig_initfini = old_l_initfini;
-+ _dl_scope_free (old_l_initfini);
-
- if (errno_reason)
- _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
-diff -Naur eglibc-2_15.orig/elf/dl-libc.c eglibc-2_15/elf/dl-libc.c
---- eglibc-2_15.orig/elf/dl-libc.c 2012-02-16 09:31:47.478224779 +0000
-+++ eglibc-2_15/elf/dl-libc.c 2012-02-16 09:32:43.619735410 +0000
-@@ -284,6 +284,10 @@
- if (! old->dont_free)
- free (old);
- }
-+
-+ /* Free the initfini dependency list. */
-+ if (l->l_free_initfini)
-+ free (l->l_initfini);
- }
-
- if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0
-diff -Naur eglibc-2_15.orig/elf/rtld.c eglibc-2_15/elf/rtld.c
---- eglibc-2_15.orig/elf/rtld.c 2012-02-16 09:31:47.470224563 +0000
-+++ eglibc-2_15/elf/rtld.c 2012-02-16 09:35:01.611448263 +0000
-@@ -2277,6 +2277,7 @@
- lnp->dont_free = 1;
- lnp = lnp->next;
- }
-+ l->l_free_initfini = 0;
-
- if (l != &GL(dl_rtld_map))
- _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
-diff -Naur eglibc-2_15.orig/include/link.h eglibc-2_15/include/link.h
---- eglibc-2_15.orig/include/link.h 2012-02-16 09:31:47.710231021 +0000
-+++ eglibc-2_15/include/link.h 2012-02-16 09:42:04.610828212 +0000
-@@ -192,6 +192,9 @@
- during LD_TRACE_PRELINKING=1
- contains any DT_SYMBOLIC
- libraries. */
-+ unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
-+ freed, ie. not allocated with
-+ the dummy malloc in ld.so. */
-
- /* Collected information about own RPATH directories. */
- struct r_search_path_struct l_rpath_dirs;
-@@ -240,9 +243,6 @@
-
- /* List of object in order of the init and fini calls. */
- struct link_map **l_initfini;
-- /* The init and fini list generated at startup, saved when the
-- object is also loaded dynamically. */
-- struct link_map **l_orig_initfini;
-
- /* List of the dependencies introduced through symbol binding. */
- struct link_map_reldeps
+++ /dev/null
-If we're using a cvs snapshot which updates the source files, and
-perl isn't installed yet, then we can't regen the docs. Not a big
-deal, so just whine a little and continue on our merry way.
-
-http://bugs.gentoo.org/60132
-
-diff -durN glibc-2.12.1.orig/manual/Makefile glibc-2.12.1/manual/Makefile
---- glibc-2.12.1.orig/manual/Makefile 2006-01-08 07:43:47.000000000 +0100
-+++ glibc-2.12.1/manual/Makefile 2009-11-13 00:49:54.000000000 +0100
-@@ -104,9 +104,14 @@
- libm-err.texi: stamp-libm-err
- stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\
- $(dir)/libm-test-ulps))
-+ifneq ($(PERL),no)
- pwd=`pwd`; \
- $(PERL) $< $$pwd/.. > libm-err-tmp
- $(move-if-change) libm-err-tmp libm-err.texi
-+else
-+ echo "Unable to rebuild math docs, no perl installed"
-+ touch libm-err.texi
-+endif
- touch $@
-
- # Generate Texinfo files from the C source for the example programs.
--- /dev/null
+Submitted By: Armin K. <krejzi at email dot com>
+Date: 2013-02-11
+Initial Package Version: 2.17
+Upstream Status: Not Applicable
+Origin: Self
+Description: This patch removes references to /var/db directory which is not part
+ of FHS and replaces them with more suitable directories in /var
+ hierarchy - /var/cache/nscd for nscd and /var/lib/nss_db for nss_db.
+
+--- a/Makeconfig 2012-12-25 04:02:13.000000000 +0100
++++ b/Makeconfig 2013-02-11 01:32:32.500667439 +0100
+@@ -250,7 +250,7 @@
+
+ # Directory for the database files and Makefile for nss_db.
+ ifndef vardbdir
+-vardbdir = $(localstatedir)/db
++vardbdir = $(localstatedir)/lib/nss_db
+ endif
+ inst_vardbdir = $(install_root)$(vardbdir)
+
+--- a/nscd/nscd.h 2012-12-25 04:02:13.000000000 +0100
++++ b/nscd/nscd.h 2013-02-11 01:32:32.500667439 +0100
+@@ -112,11 +112,11 @@
+
+
+ /* Paths of the file for the persistent storage. */
+-#define _PATH_NSCD_PASSWD_DB "/var/db/nscd/passwd"
+-#define _PATH_NSCD_GROUP_DB "/var/db/nscd/group"
+-#define _PATH_NSCD_HOSTS_DB "/var/db/nscd/hosts"
+-#define _PATH_NSCD_SERVICES_DB "/var/db/nscd/services"
+-#define _PATH_NSCD_NETGROUP_DB "/var/db/nscd/netgroup"
++#define _PATH_NSCD_PASSWD_DB "/var/cache/nscd/passwd"
++#define _PATH_NSCD_GROUP_DB "/var/cache/nscd/group"
++#define _PATH_NSCD_HOSTS_DB "/var/cache/nscd/hosts"
++#define _PATH_NSCD_SERVICES_DB "/var/cache/nscd/services"
++#define _PATH_NSCD_NETGROUP_DB "/var/cache/nscd/netgroup"
+
+ /* Path used when not using persistent storage. */
+ #define _PATH_NSCD_XYZ_DB_TMP "/var/run/nscd/dbXXXXXX"
+--- a/nss/db-Makefile 2012-12-25 04:02:13.000000000 +0100
++++ b/nss/db-Makefile 2013-02-11 01:32:32.500667439 +0100
+@@ -22,7 +22,7 @@
+ /etc/rpc /etc/services /etc/shadow /etc/gshadow \
+ /etc/netgroup)
+
+-VAR_DB = /var/db
++VAR_DB = /var/lib/nss_db
+
+ AWK = awk
+ MAKEDB = makedb --quiet
+--- a/sysdeps/generic/paths.h 2012-12-25 04:02:13.000000000 +0100
++++ b/sysdeps/generic/paths.h 2013-02-11 01:32:32.500667439 +0100
+@@ -68,7 +68,7 @@
+ /* Provide trailing slash, since mostly used for building pathnames. */
+ #define _PATH_DEV "/dev/"
+ #define _PATH_TMP "/tmp/"
+-#define _PATH_VARDB "/var/db/"
++#define _PATH_VARDB "/var/lib/nss_db/"
+ #define _PATH_VARRUN "/var/run/"
+ #define _PATH_VARTMP "/var/tmp/"
+
+--- a/sysdeps/unix/sysv/linux/paths.h 2012-12-25 04:02:13.000000000 +0100
++++ b/sysdeps/unix/sysv/linux/paths.h 2013-02-11 01:32:32.504000831 +0100
+@@ -68,7 +68,7 @@
+ /* Provide trailing slash, since mostly used for building pathnames. */
+ #define _PATH_DEV "/dev/"
+ #define _PATH_TMP "/tmp/"
+-#define _PATH_VARDB "/var/db/"
++#define _PATH_VARDB "/var/lib/nss_db/"
+ #define _PATH_VARRUN "/var/run/"
+ #define _PATH_VARTMP "/var/tmp/"
+
--- /dev/null
+Submitted By: Hugo Villeneuve <hugo at hugovil dot com>
+Date: 2014-12-01
+Initial Package Version: 2.19
+Upstream Status: Not sent
+Origin: http://bugs.gentoo.org/60132
+Description: Do not regenerate the documentation if Perl is not installed.
+
+If we're using a cvs snapshot which updates the source files, and
+perl isn't installed yet, then we can't regen the docs. Not a big
+deal, so just whine a little and continue on our merry way.
+
+diff -Naur glibc-2.19.orig/manual/Makefile glibc-2.19.patched/manual/Makefile
+--- glibc-2.19.orig/manual/Makefile 2014-02-07 04:04:38.000000000 -0500
++++ glibc-2.19.patched/manual/Makefile 2014-12-01 17:08:45.787467918 -0500
+@@ -108,9 +108,14 @@
+ $(objpfx)libm-err.texi: $(objpfx)stamp-libm-err
+ $(objpfx)stamp-libm-err: libm-err-tab.pl $(wildcard $(foreach dir,$(sysdirs),\
+ $(dir)/libm-test-ulps))
++ifneq ($(PERL),no)
+ pwd=`pwd`; \
+ $(PERL) $< $$pwd/.. > $(objpfx)libm-err-tmp
+ $(move-if-change) $(objpfx)libm-err-tmp $(objpfx)libm-err.texi
++else
++ echo "Unable to rebuild math docs, no perl installed"
++ touch libm-err.texi
++endif
+ touch $@
+
+ # Package version and bug reporting URL.
--- /dev/null
+../../../stage0/patches/common/glibc-2.19-tzselect.patch
\ No newline at end of file
+++ /dev/null
-#!/bin/bash
-
-hvconfig_pre()
-{
- CONFIGURE_OPTS+=" \
- --disable-profile \
- --enable-add-ons \
- --enable-kernel=$(get_pkg_ver ${KERNEL}) \
- --libexecdir=/usr/lib/eglibc"
-
- cd ${LFS_TMP}/${PACKAGE}
-
- # At the end of the installation, the build system will run a sanity test to
- # make sure everything installed properly. This script will attempt to test
- # for a library that is only used in the test suite and is never installed.
- # Prevent the script from testing for this library with the following command:
- sed -i 's/\(&& $name ne\) "db1"/ & \1 "nss_test1"/' scripts/test-installation.pl
-
- # When running make install, a script called test-installation.pl performs a
- # small sanity test on our newly installed Glibc. However, because our
- # toolchain still points to the /tools directory, the sanity test would be
- # carried out against the wrong Glibc. We can force the script to check the
- # Glibc we have just installed with:
- LINKER=$(readelf -l $(file /tools/lib/libc-* | cut -f1 -d:) | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p')
- sed -i "s|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=${LINKER} -o|" \
- scripts/test-installation.pl
- unset LINKER
-
- cd ${LFS_TMP}/${PACKAGE}-build
-
- case "${HVL_TARGET}" in
- "x86_64")
- # Tell EGLIBC to install its libraries into /lib:
- echo "slibdir=/lib" >> configparms
- CONFIGURE_OPTS+=" --libdir=/usr/lib"
- ;;
- esac
-}
-
-hvbuild()
-{
- make
- touch /etc/ld.so.conf
-
- case "${HVL_TARGET}" in
- "x86_64")
- # The install will finish by checking that everything is correctly
- # installed. Unfortunately, it will test for a multilib installation.
- # On x86_64 Pure64 this means it will try to test the non-existent
- # 32-bit loader which has a different name from the 64-bit loader
- # (unlike on other 64-bit architectures). We fool it by creating a
- # symlink to the real loader.
- local EGLIBC_VER=$(cat ${LFS_TMP}/${PACKAGE}/version.h | \
- grep "VERSION" | sed "s!.*VERSION\ \"\(.*\)\"!\1!")
-
- ln -svfT ld-${EGLIBC_VER}.so /lib/ld-linux.so.2
- make install
-
- # Now we can remove this symlink.
- rm -v /lib/ld-linux.so.2
-
- # We also need to correct the /usr/bin/ldd script - if you look at this,
- # you will see it references not only the 32-bit linker, but also /lib64
- # where it thinks the 64-bit linker is.
- cp -v /usr/bin/ldd{,.bak}
- sed '/RTLDLIST/s%/ld-linux.so.2 /lib64%%' /usr/bin/ldd.bak >/usr/bin/ldd
- rm -v /usr/bin/ldd.bak
- ;;
- *)
- make install
- ;;
- esac
-
- # The following instructions, instead of the install-locales target
- # above, will install the minimum set of locales necessary for the
- # tests to run successfully:
- mkdir -pv /usr/lib/locale
- localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8
- localedef -i de_DE -f ISO-8859-1 de_DE
- localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
- localedef -i de_DE -f UTF-8 de_DE.UTF-8
- localedef -i en_HK -f ISO-8859-1 en_HK
- localedef -i en_PH -f ISO-8859-1 en_PH
- localedef -i en_US -f ISO-8859-1 en_US
- localedef -i en_US -f UTF-8 en_US.UTF-8
- localedef -i es_MX -f ISO-8859-1 es_MX
- localedef -i fa_IR -f UTF-8 fa_IR
- localedef -i fr_FR -f ISO-8859-1 fr_FR
- localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
- localedef -i fr_FR -f UTF-8 fr_FR.UTF-8
- localedef -i it_IT -f ISO-8859-1 it_IT
- localedef -i ja_JP -f EUC-JP ja_JP
- localedef -i tr_TR -f UTF-8 tr_TR.UTF-8
- localedef -i zh_CN -f GB18030 zh_CN.GB18030
-
- # French canadian locales:
- localedef -i ca_FR -f UTF-8 ca_FR.UTF-8
- localedef -i ca_FR -f ISO-8859-1 ca_FR
- localedef -i fr_CA -f UTF-8 fr_CA.UTF-8
- localedef -i fr_CA -f ISO-8859-1 fr_CA
-
- cat > /etc/nsswitch.conf << "EOF"
-# /etc/nsswitch.conf
-
-passwd: files
-group: files
-shadow: files
-
-hosts: files dns
-networks: files
-
-protocols: files
-services: files
-ethers: files
-rpc: files
-EOF
-
- ln -svfT ${TIMEZONE} /usr/share/zoneinfo/localtime
- cp --remove-destination /usr/share/zoneinfo/${TIMEZONE} /etc/localtime
-
- cat > /etc/ld.so.conf << "EOF"
-# /etc/ld.so.conf
-/usr/local/lib
-/opt/lib
-EOF
-}
--- /dev/null
+#!/bin/bash
+
+hvconfig_pre()
+{
+ # --enable-obsolete-rpc
+ # install rpc headers that are not installed by default but may be
+ # needed by other packages.
+ CONFIGURE_OPTS+=" \
+ --disable-profile \
+ --enable-kernel=$(get_pkg_ver ${KERNEL}) \
+ --enable-obsolete-rpc \
+ --libexecdir=/usr/lib/glibc"
+
+ cd ${LFS_TMP}/${PACKAGE}
+
+ # When running make install, a script called test-installation.pl performs a
+ # small sanity test on our newly installed Glibc. However, because our
+ # toolchain still points to the /tools directory, the sanity test would be
+ # carried out against the wrong Glibc. We can force the script to check the
+ # Glibc we have just installed with:
+ LINKER=$(readelf -l /tools/bin/bash | \
+ sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p')
+ sed -i "s|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=${LINKER} -o|" \
+ scripts/test-installation.pl
+ unset LINKER
+
+ cd ${LFS_TMP}/${PACKAGE}-build
+
+ case "${HVL_TARGET}" in
+ "x86_64")
+ # Tell glibc to install its libraries into /lib:
+ echo "slibdir=/lib" >> configparms
+ CONFIGURE_OPTS+=" --libdir=/usr/lib"
+ ;;
+ esac
+}
+
+hvbuild()
+{
+ make
+ touch /etc/ld.so.conf
+
+ case "${HVL_TARGET}" in
+ "x86_64")
+ # The install will finish by checking that everything is correctly
+ # installed. Unfortunately, it will test for a multilib
+ # installation.
+ # On x86_64 Pure64 this means it will try to test the non-existent
+ # 32-bit loader which has a different name from the 64-bit loader
+ # (unlike on other 64-bit architectures). We fool it by creating a
+ # symlink to the real loader.
+ ln -svfT ld-$(get_pkg_ver2 ${PACKAGE}).so /lib/ld-linux.so.2
+
+ make install
+
+ # Remove unneeded files from /usr/include/rpcsvc
+ rm -v /usr/include/rpcsvc/*.x
+
+ # Now we can remove this symlink.
+ rm -v /lib/ld-linux.so.2
+
+ # We also need to correct the /usr/bin/ldd script - if you look at
+ # this, you will see it references not only the 32-bit linker, but
+ # also /lib64 where it thinks the 64-bit linker is.
+ cp -v /usr/bin/ldd{,.bak}
+ sed '/RTLDLIST/s%/ld-linux.so.2 /lib64%%' /usr/bin/ldd.bak > \
+ /usr/bin/ldd
+ rm -v /usr/bin/ldd.bak
+ ;;
+ *)
+ make install
+ ;;
+ esac
+
+ # Install the configuration file and runtime directory for nscd:
+ cp -v ${LFS_TMP}/${PACKAGE}/nscd/nscd.conf /etc/nscd.conf
+ mkdir -pv /var/cache/nscd
+
+ # The following instructions, instead of the install-locales target
+ # above, will install the minimum set of locales necessary for the
+ # tests to run successfully:
+ mkdir -pv /usr/lib/locale
+ localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8
+ localedef -i de_DE -f ISO-8859-1 de_DE
+ localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
+ localedef -i de_DE -f UTF-8 de_DE.UTF-8
+ localedef -i en_HK -f ISO-8859-1 en_HK
+ localedef -i en_PH -f ISO-8859-1 en_PH
+ localedef -i en_US -f ISO-8859-1 en_US
+ localedef -i en_US -f UTF-8 en_US.UTF-8
+ localedef -i es_MX -f ISO-8859-1 es_MX
+ localedef -i fa_IR -f UTF-8 fa_IR
+ localedef -i fr_FR -f ISO-8859-1 fr_FR
+ localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
+ localedef -i fr_FR -f UTF-8 fr_FR.UTF-8
+ localedef -i it_IT -f ISO-8859-1 it_IT
+ localedef -i ja_JP -f EUC-JP ja_JP
+ localedef -i tr_TR -f UTF-8 tr_TR.UTF-8
+ localedef -i zh_CN -f GB18030 zh_CN.GB18030
+
+ # French canadian locales:
+ localedef -i ca_FR -f UTF-8 ca_FR.UTF-8
+ localedef -i ca_FR -f ISO-8859-1 ca_FR
+ localedef -i fr_CA -f UTF-8 fr_CA.UTF-8
+ localedef -i fr_CA -f ISO-8859-1 fr_CA
+
+ cat > /etc/nsswitch.conf << "EOF"
+# /etc/nsswitch.conf
+
+passwd: files
+group: files
+shadow: files
+
+hosts: files dns
+networks: files
+
+protocols: files
+services: files
+ethers: files
+rpc: files
+EOF
+
+ cat > /etc/ld.so.conf << "EOF"
+# /etc/ld.so.conf
+/usr/local/lib
+/opt/lib
+EOF
+}