From b99ee4fadea43f239cf2df146fb93bfc95bd783e Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Tue, 23 Sep 2014 21:53:32 -0400 Subject: [PATCH] Replace eglibc by glibc-2.19 Remove Glibc ports package: Glibc ports not available for versions > 2.16 --- config/packages-list | 3 +- stage0/hv-install-2 | 2 +- stage0/packages-update | 3 +- .../common/eglibc-2.15-r17386-fixes-1.patch | 107 ------------------ .../patches/common/glibc-2.19-tzselect.patch | 12 ++ stage0/pkg/{eglibc => glibc} | 18 +-- stage1/pkg/bash | 2 +- stage2/hv-install-1 | 2 +- stage2/packages-update | 2 +- .../common/eglibc-2.15-r17386-fixes-1.patch | 107 ------------------ .../common/eglibc-2.15-r17386-no-perl.patch | 24 ---- stage2/patches/common/glibc-2.19-fhs-1.patch | 72 ++++++++++++ .../patches/common/glibc-2.19-no-perl.patch | 29 +++++ .../patches/common/glibc-2.19-tzselect.patch | 1 + stage2/pkg/{eglibc => glibc} | 46 ++++---- 15 files changed, 145 insertions(+), 285 deletions(-) delete mode 100644 stage0/patches/common/eglibc-2.15-r17386-fixes-1.patch create mode 100644 stage0/patches/common/glibc-2.19-tzselect.patch rename stage0/pkg/{eglibc => glibc} (66%) delete mode 100644 stage2/patches/common/eglibc-2.15-r17386-fixes-1.patch delete mode 100644 stage2/patches/common/eglibc-2.15-r17386-no-perl.patch create mode 100644 stage2/patches/common/glibc-2.19-fhs-1.patch create mode 100644 stage2/patches/common/glibc-2.19-no-perl.patch create mode 120000 stage2/patches/common/glibc-2.19-tzselect.patch rename stage2/pkg/{eglibc => glibc} (72%) diff --git a/config/packages-list b/config/packages-list index 11753f2..95789fd 100644 --- a/config/packages-list +++ b/config/packages-list @@ -76,8 +76,7 @@ DVDRWTOOLS="dvd+rw-tools-7.1" 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" diff --git a/stage0/hv-install-2 b/stage0/hv-install-2 index 33a9447..8e3bf20 100755 --- a/stage0/hv-install-2 +++ b/stage0/hv-install-2 @@ -42,7 +42,7 @@ LDFLAGS="" ipkg ${BINUTILS} ipkg -l "${GCC}-pass1" ${GCC} -ipkg ${EGLIBC} +ipkg ${GLIBC} ipkg -l "${GCC}-pass2" ${GCC} exit $? diff --git a/stage0/packages-update b/stage0/packages-update index 3fe8587..edef445 100755 --- a/stage0/packages-update +++ b/stage0/packages-update @@ -23,7 +23,6 @@ fpkg -e "tar.gz" ${MPC} "http://www.multiprecision.org/mpc/download" 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 $? diff --git a/stage0/patches/common/eglibc-2.15-r17386-fixes-1.patch b/stage0/patches/common/eglibc-2.15-r17386-fixes-1.patch deleted file mode 100644 index cb709c9..0000000 --- a/stage0/patches/common/eglibc-2.15-r17386-fixes-1.patch +++ /dev/null @@ -1,107 +0,0 @@ -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 diff --git a/stage0/patches/common/glibc-2.19-tzselect.patch b/stage0/patches/common/glibc-2.19-tzselect.patch new file mode 100644 index 0000000..2ce58a7 --- /dev/null +++ b/stage0/patches/common/glibc-2.19-tzselect.patch @@ -0,0 +1,12 @@ +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)"|' \ diff --git a/stage0/pkg/eglibc b/stage0/pkg/glibc similarity index 66% rename from stage0/pkg/eglibc rename to stage0/pkg/glibc index 3dde496..d31ab21 100644 --- a/stage0/pkg/eglibc +++ b/stage0/pkg/glibc @@ -17,22 +17,12 @@ hvconfig_pre() --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 \ + --enable-obsolete-rpc \ --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: @@ -46,12 +36,6 @@ libc_cv_ssp=no EOF } -hvbuild() -{ - ${HVMAKE} - ${HVMAKE} install inst_vardbdir=/tools/var/db -} - hvconfig_post() { unset BUILD_CC diff --git a/stage1/pkg/bash b/stage1/pkg/bash index 867e03a..6e3d9e5 100644 --- a/stage1/pkg/bash +++ b/stage1/pkg/bash @@ -3,7 +3,7 @@ # 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() diff --git a/stage2/hv-install-1 b/stage2/hv-install-1 index bfcc153..61e6138 100755 --- a/stage2/hv-install-1 +++ b/stage2/hv-install-1 @@ -10,7 +10,7 @@ rscr mult "Performing pre-install" pre-install 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 diff --git a/stage2/packages-update b/stage2/packages-update index 5499233..d478a2b 100755 --- a/stage2/packages-update +++ b/stage2/packages-update @@ -10,7 +10,7 @@ update_packages_init ${*} # 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} diff --git a/stage2/patches/common/eglibc-2.15-r17386-fixes-1.patch b/stage2/patches/common/eglibc-2.15-r17386-fixes-1.patch deleted file mode 100644 index cb709c9..0000000 --- a/stage2/patches/common/eglibc-2.15-r17386-fixes-1.patch +++ /dev/null @@ -1,107 +0,0 @@ -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 diff --git a/stage2/patches/common/eglibc-2.15-r17386-no-perl.patch b/stage2/patches/common/eglibc-2.15-r17386-no-perl.patch deleted file mode 100644 index 2eb5414..0000000 --- a/stage2/patches/common/eglibc-2.15-r17386-no-perl.patch +++ /dev/null @@ -1,24 +0,0 @@ -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. diff --git a/stage2/patches/common/glibc-2.19-fhs-1.patch b/stage2/patches/common/glibc-2.19-fhs-1.patch new file mode 100644 index 0000000..4ac8d10 --- /dev/null +++ b/stage2/patches/common/glibc-2.19-fhs-1.patch @@ -0,0 +1,72 @@ +Submitted By: Armin K. +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/" + diff --git a/stage2/patches/common/glibc-2.19-no-perl.patch b/stage2/patches/common/glibc-2.19-no-perl.patch new file mode 100644 index 0000000..fb7fc67 --- /dev/null +++ b/stage2/patches/common/glibc-2.19-no-perl.patch @@ -0,0 +1,29 @@ +Submitted By: Hugo Villeneuve +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. diff --git a/stage2/patches/common/glibc-2.19-tzselect.patch b/stage2/patches/common/glibc-2.19-tzselect.patch new file mode 120000 index 0000000..e52f98f --- /dev/null +++ b/stage2/patches/common/glibc-2.19-tzselect.patch @@ -0,0 +1 @@ +../../../stage0/patches/common/glibc-2.19-tzselect.patch \ No newline at end of file diff --git a/stage2/pkg/eglibc b/stage2/pkg/glibc similarity index 72% rename from stage2/pkg/eglibc rename to stage2/pkg/glibc index 0d07767..b98c282 100644 --- a/stage2/pkg/eglibc +++ b/stage2/pkg/glibc @@ -2,35 +2,33 @@ 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-add-ons \ --enable-kernel=$(get_pkg_ver ${KERNEL}) \ - --libexecdir=/usr/lib/eglibc" + --enable-obsolete-rpc \ + --libexecdir=/usr/lib/glibc" 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') + 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 + 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: + # Tell glibc to install its libraries into /lib: echo "slibdir=/lib" >> configparms CONFIGURE_OPTS+=" --libdir=/usr/lib" ;; @@ -45,25 +43,28 @@ hvbuild() 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. + # 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-$(get_pkg_ver2 ${PACKAGE}).so /lib/ld-linux.so.2 - ln -svfT ld-${EGLIBC_VER}.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. + # 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 + sed '/RTLDLIST/s%/ld-linux.so.2 /lib64%%' /usr/bin/ldd.bak > \ + /usr/bin/ldd rm -v /usr/bin/ldd.bak ;; *) @@ -71,6 +72,10 @@ hvbuild() ;; 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: @@ -115,9 +120,6 @@ 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 -- 2.20.1