From e2677c255a26c73c1e2081b15fbdc771d4cc9a89 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 3 Jun 2007 13:34:02 +0000 Subject: [PATCH] Clifford Wolf: Updated glibc (2.6) [2007060101031414301] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@8547 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/base/glibc/config-400.in | 5 +- package/base/glibc/glibc.conf | 12 ++- package/base/glibc/glibc.desc | 8 +- package/base/glibc/glibc26/gcc_eh.patch.cross | 37 +++++++ .../base/glibc/glibc26/ldconfig-glob.patch | 99 +++++++++++++++++++ package/base/glibc/glibc26/zrelrocheck.patch | 10 ++ 6 files changed, 164 insertions(+), 7 deletions(-) create mode 100644 package/base/glibc/glibc26/gcc_eh.patch.cross create mode 100644 package/base/glibc/glibc26/ldconfig-glob.patch create mode 100644 package/base/glibc/glibc26/zrelrocheck.patch diff --git a/package/base/glibc/config-400.in b/package/base/glibc/config-400.in index 62dca41e9..fc37690b8 100644 --- a/package/base/glibc/config-400.in +++ b/package/base/glibc/config-400.in @@ -36,8 +36,9 @@ then ROCKCFGSET_PKG_GLIBC22_USEIT=1 fi - choice ROCKCFG_PKG_GLIBC_BRANCH glibc25 \ - glibc25 'Use glibc-2.5 (recommended)' \ + choice ROCKCFG_PKG_GLIBC_BRANCH glibc26 \ + glibc26 'Use glibc-2.6 (recommended)' \ + glibc25 'Use glibc-2.5' \ glibc23 'Use glibc-2.3.x' \ glibc22 'Use glibc-2.2.x' diff --git a/package/base/glibc/glibc.conf b/package/base/glibc/glibc.conf index 5d857188a..096201dcf 100644 --- a/package/base/glibc/glibc.conf +++ b/package/base/glibc/glibc.conf @@ -32,6 +32,10 @@ case "$xpkg" in echo_error "Cross package not yet supported by glibc25. Use glibc23!" exit 1 fi + if [[ $xpkg = *26 ]] ; then + echo_error "Cross package not yet supported by glibc26. Use glibc23!" + exit 1 + fi pkg_glibc_cross="${xpkg#glibc*-cross-}" pkg_glibc_version=${pkg_glibc_version%-cross-*} pkg_glibc_target="${pkg_glibc_cross}-unknown-linux-gnu" @@ -51,7 +55,7 @@ pkg_glibc_linuxthreads=1 # fall back to linuxthreads for cross glibcs [ -n "$pkg_glibc_cross" ] && pkg_glibc_linuxthreads=1 -[ "${pkg_glibc_version}" = "25" ] && pkg_glibc_linuxthreads=0 +[ "${pkg_glibc_version}" = "25" -o "${pkg_glibc_version}" = "26" ] && pkg_glibc_linuxthreads=0 # Give a more descriptive error message than the one that would happen during the build. kernel_mainline="`uname -r | cut -f-2 -d'.'`" @@ -276,7 +280,7 @@ fi #--------------------------------- #--------------------------------- -if [ $pkg_glibc_version = 25 ]; then +if [ $pkg_glibc_version = 25 -o $pkg_glibc_version = 26 ]; then glibc_custmain() { # check whether profiling is enabled @@ -370,14 +374,14 @@ glibc_prepatch() { if [ $pkg_glibc_linuxthreads = 1 -a -f $archdir/*linuxthreads*.tar.bz2 ]; then tar $taropt $archdir/*linuxthreads*.tar.bz2 fi - if [ "${pkg_glibc_version}" = "25" ] ; then + if [ "${pkg_glibc_version}" = "25" -o "${pkg_glibc_version}" = "26" ] ; then echo "extracting glibc-ports" tar $taropt $archdir/glibc-ports-*.tar.bz2 fi } glibc_stage0() { - if [ $pkg_glibc_version = 25 ] + if [ $pkg_glibc_version = 25 -o $pkg_glibc_version = 26 ] then mkdir -p objdir; cd objdir diff --git a/package/base/glibc/glibc.desc b/package/base/glibc/glibc.desc index 708ea8ecb..460ed5536 100644 --- a/package/base/glibc/glibc.desc +++ b/package/base/glibc/glibc.desc @@ -61,5 +61,11 @@ [D] 4254948014 glibc-ports-2.5.tar.bz2 http://ftp.gnu.org/gnu/glibc/ #endif -[CD] cp $cachedir/glibc2[235].cache $confdir/$pkg.cache +#if xpkg == glibc26.* +[V] 2.6 +[D] 3511308126 glibc-2.6.tar.bz2 http://ftp.gnu.org/gnu/glibc/ +[D] 2841039313 glibc-ports-2.6.tar.bz2 http://ftp.gnu.org/gnu/glibc/ +#endif + +[CD] cp $cachedir/glibc2[2356].cache $confdir/$pkg.cache diff --git a/package/base/glibc/glibc26/gcc_eh.patch.cross b/package/base/glibc/glibc26/gcc_eh.patch.cross new file mode 100644 index 000000000..19d3973a9 --- /dev/null +++ b/package/base/glibc/glibc26/gcc_eh.patch.cross @@ -0,0 +1,37 @@ +# --- ROCK-COPYRIGHT-NOTE-BEGIN --- +# +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# Please add additional copyright information _after_ the line containing +# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by +# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! +# +# ROCK Linux: rock-src/package/base/glibc/glibc23/gcc_eh.patch.cross +# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# --- ROCK-COPYRIGHT-NOTE-END --- + +diff -ruN glibc-2.3.4/Makeconfig glibc-2.3.4-new/Makeconfig +--- glibc-2.3.4/Makeconfig 2004-12-15 19:51:47.000000000 +0100 ++++ glibc-2.3.4-new/Makeconfig 2005-03-27 15:47:19.000000000 +0200 +@@ -514,12 +514,12 @@ + libunwind = -lunwind + endif + ifneq ($(have-as-needed),yes) +- libgcc_eh := -lgcc_eh $(libunwind) ++ libgcc_eh := $(libunwind) + else + libgcc_eh := -Wl,--as-needed -lgcc_s$(libgcc_s_suffix) $(libunwind) -Wl,--no-as-needed + endif + gnulib := -lgcc $(libgcc_eh) +-static-gnulib := -lgcc -lgcc_eh $(libunwind) ++static-gnulib := -lgcc $(libunwind) + libc.so-gnulib := -lgcc + endif + ifeq ($(elf),yes) diff --git a/package/base/glibc/glibc26/ldconfig-glob.patch b/package/base/glibc/glibc26/ldconfig-glob.patch new file mode 100644 index 000000000..91df451f2 --- /dev/null +++ b/package/base/glibc/glibc26/ldconfig-glob.patch @@ -0,0 +1,99 @@ +# --- ROCK-COPYRIGHT-NOTE-BEGIN --- +# +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# Please add additional copyright information _after_ the line containing +# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by +# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! +# +# ROCK Linux: rock-src/package/base/glibc/glibc23/ldconfig-glob.patch +# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# --- ROCK-COPYRIGHT-NOTE-END --- + + +This is an alternative ldconfig wildcard expansion (glob) patch for +recent glibc's. + + - Valentin Ziegler + +--- ./elf/ldconfig.c.orig 2004-09-14 13:28:34.000000000 +0200 ++++ ./elf/ldconfig.c 2004-09-14 14:19:07.000000000 +0200 +@@ -359,21 +359,57 @@ + if (opt_chroot) + path = chroot_canon (opt_chroot, path); + +- struct stat64 stat_buf; +- if (path == NULL || stat64 (path, &stat_buf)) +- { +- if (opt_verbose) +- error (0, errno, _("Can't stat %s"), entry->path); +- free (entry->path); +- free (entry); +- } +- else +- { +- entry->ino = stat_buf.st_ino; +- entry->dev = stat_buf.st_dev; ++ /* assume path is a pattern. - Valentin */ + +- add_single_dir (entry, 1); +- } ++ glob_t result; ++ if (glob(path, GLOB_ONLYDIR, NULL, &result) == 0) { ++ ++ for (int j = 0; j < result.gl_pathc; j++) ++ { ++ /* create a copy entry with expanded path */ ++ struct dir_entry *real_entry = xmalloc (sizeof (struct dir_entry)); ++ memcpy (real_entry, entry, sizeof (struct dir_entry)); ++ real_entry->path = xstrdup (result.gl_pathv[j]); ++ ++ struct stat64 stat_buf; ++ if (real_entry -> path == NULL || stat64 (real_entry -> path, &stat_buf)) ++ { ++ if (opt_verbose) ++ error (0, errno, _("Can't stat %s"), real_entry->path); ++ free (real_entry->path); ++ free (real_entry); ++ } ++ else ++ { ++ real_entry->ino = stat_buf.st_ino; ++ real_entry->dev = stat_buf.st_dev; ++ ++ add_single_dir (real_entry, 1); ++ } ++ } ++ ++ } else { ++ /* fallback to code from glibc with orig. error handling */ ++ struct stat64 stat_buf; ++ if (path == NULL || stat64 (path, &stat_buf)) ++ { ++ if (opt_verbose) ++ error (0, errno, _("Can't stat %s"), entry->path); ++ free (entry->path); ++ free (entry); ++ } ++ else ++ { ++ entry->ino = stat_buf.st_ino; ++ entry->dev = stat_buf.st_dev; ++ ++ add_single_dir (entry, 1); ++ } ++ } ++ ++ globfree (&result); ++ ++ /* ******************************* */ + + if (opt_chroot) + free (path); diff --git a/package/base/glibc/glibc26/zrelrocheck.patch b/package/base/glibc/glibc26/zrelrocheck.patch new file mode 100644 index 000000000..fb885a232 --- /dev/null +++ b/package/base/glibc/glibc26/zrelrocheck.patch @@ -0,0 +1,10 @@ +--- ./configure.orig 2007-05-18 04:07:18.000000000 +0200 ++++ ./configure 2007-05-31 00:09:59.000000000 +0200 +@@ -5631,6 +5631,7 @@ + + case "$base_machine" in + i[34567]86 | x86_64 | powerpc* | s390* | sparc* | alpha*) ++ libc_cv_z_relro=yes + echo "$as_me:$LINENO: checking for -z relro option" >&5 + echo $ECHO_N "checking for -z relro option... $ECHO_C" >&6 + if test "${libc_cv_z_relro+set}" = set; then