From f8d4ce3d0e9b384a66286901f6680c835af76284 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Wed, 23 Aug 2017 16:05:40 -0700 Subject: Implement a script for checking packages Then use this script to check that all packages can be extracted and patched. Signed-off-by: Alexey Neyman diff --git a/.gitignore b/.gitignore index 138b741..225009c 100644 --- a/.gitignore +++ b/.gitignore @@ -13,11 +13,13 @@ config/configure.in config/gen/ config/versions/ .config +maintainer/package-versions # Temporaries .*.swp build.log .config.old +temp.* # This is the place where toolchains are built .build/ diff --git a/bootstrap b/bootstrap index d01a7de..8882a6e 100755 --- a/bootstrap +++ b/bootstrap @@ -570,7 +570,9 @@ gen_packages() msg "Master packages: ${pkg_masters[@]}" # Now for each master, create its kconfig file with version - # definitions. + # definitions. As a byproduct, generate a list of all package + # versions for maintenance purposes. + exec 3>"maintainer/package-versions" for p in "${pkg_masters[@]}"; do msg "Generating '${config_versions_dir}/${p}.in'" exec >"${config_versions_dir}/${p}.in" @@ -586,6 +588,7 @@ gen_packages() set_iter milestone ${pkg_milestones[${p}]} run_template "maintainer/kconfig-versions.template" + run_template "maintainer/package-versions.template" >&3 done } diff --git a/maintainer/kconfig-versions.template b/maintainer/kconfig-versions.template index 4692a25..c16bb77 100644 --- a/maintainer/kconfig-versions.template +++ b/maintainer/kconfig-versions.template @@ -252,10 +252,16 @@ config @@pfx@@_MIRRORS config @@pfx@@_ARCHIVE_FILENAME string +#!foreach version + default "@@archive_filename@@" if @@pfx@@_V_@@kcfg@@ +#!end-foreach default "@@archive_filename@@" config @@pfx@@_ARCHIVE_DIRNAME string +#!foreach version + default "@@archive_dirname@@" if @@pfx@@_V_@@kcfg@@ +#!end-foreach default "@@archive_dirname@@" config @@pfx@@_ARCHIVE_FORMATS diff --git a/maintainer/package-versions.template b/maintainer/package-versions.template new file mode 100644 index 0000000..3645162 --- /dev/null +++ b/maintainer/package-versions.template @@ -0,0 +1,13 @@ +#!foreach fork +#!foreach version +run_pkgversion \ + master=@@master@@ \ + masterpfx=@@masterpfx@@ \ + originpfx=@@originpfx@@ \ + pkg_name=@@pkg_name@@ \ + pfx=@@pfx@@ \ + versionlocked=@@versionlocked@@ \ + ver=@@ver@@ \ + kcfg=@@kcfg@@ +#!end-foreach +#!end-foreach diff --git a/maintainer/test-packages.sh b/maintainer/test-packages.sh new file mode 100755 index 0000000..7a19651 --- /dev/null +++ b/maintainer/test-packages.sh @@ -0,0 +1,190 @@ +#!/bin/bash + +selected= + +usage() +{ + cat <&2; exit 1; } + selected="${1}" + ;; + --help|-?) + usage + exit 0 + ;; + *) + echo "Unknown option ${1}" >&2 + exit 1 + ;; + esac + shift +done + +CT_LIB_DIR=`pwd` +CT_TOP_DIR=`pwd` +CT_TARBALLS_DIR=`pwd`/temp.tarballs +CT_COMMON_SRC_DIR=`pwd`/temp.src +CT_SRC_DIR=`pwd`/temp.src +CT_LOG_LEVEL_MAX=EXTRA +mkdir -p ${CT_TARBALLS_DIR} + +# Does not matter, just to make the scripts load +CT_ARCH=arm +CT_KERNEL=bare-metal +CT_BINUTILS=binutils +CT_LIBC=none +CT_CC=gcc + +. paths.sh +. scripts/functions + +rm -f build.log +CT_LogEnable + +check_pkg_urls() +{ + local e m mh url + + for e in ${archive_formats}; do + local -A mirror_status=( ) + + CT_DoStep EXTRA "Looking for ${archive_filename}${e}" + for m in ${mirrors}; do + url="${m}/${archive_filename}${e}" + mh="${m#*://}" + mh="${mh%%[:/]*}" + if [ -n "${mirror_status[${mh}]}" ]; then + CT_DoLog DEBUG "Skipping '${url}': already found on this host at '${mirror_status[${mh}]}'" + continue + fi + if CT_DoExecLog ALL wget --spider "${url}"; then + mirror_status[${mh}]="${url}" + else + mirror_status[${mh}]= + fi + done + for mh in "${!mirror_status[@]}"; do + if [ -n "${mirror_status[${mh}]}" ]; then + CT_DoLog EXTRA "OK ${mh} [${archive_filename}${e}]" + else + CT_DoLog ERROR "FAIL ${mh} [${archive_filename}${e}]" + fi + done + CT_EndStep + done +} + +run_pkgversion() +{ + while [ -n "${1}" ]; do + eval "local ${1}" + shift + done + + if [ -n "${selected}" ]; then + case "${selected}" in + ${pkg_name}|${pkg_name}-${ver}) + ;; + *) + return + ;; + esac + fi + + CT_DoStep INFO "Handling ${pkg_name}-${ver}" + + # Create a temporary configuration head file + cat >temp.in <temp.defconfig </dev/null + + CT_LoadConfig + rm -f .config .config.old temp.defconfig temp.in + if [ -n "${verify_urls}" ]; then + CT_DoLog EXTRA "Verifying URLs for ${pkg_name}-${ver}" + CT_PackageRun "${masterpfx}" check_pkg_urls + fi + if [ -n "${download_pkgs}" ]; then + CT_DoLog EXTRA "Downloading ${pkg_name}-${ver}" + CT_Fetch "${masterpfx}" + fi + if [ -n "${apply_patches}" ]; then + rm -rf ${CT_COMMON_SRC_DIR} + mkdir -p ${CT_COMMON_SRC_DIR} + CT_ExtractPatch "${masterpfx}" + fi + + CT_EndStep +} + +. maintainer/package-versions + +rm -rf ${CT_TARBALLS_DIR} ${CT_COMMON_SRC_DIR} diff --git a/packages/gcc-linaro/6.3-2017.05/1100-ubsan-fix-check-empty-string.patch b/packages/gcc-linaro/6.3-2017.05/1100-ubsan-fix-check-empty-string.patch deleted file mode 100644 index c012719..0000000 --- a/packages/gcc-linaro/6.3-2017.05/1100-ubsan-fix-check-empty-string.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 8db2cf6353c13f2a84cbe49b689654897906c499 Mon Sep 17 00:00:00 2001 -From: kyukhin -Date: Sat, 3 Sep 2016 10:57:05 +0000 -Subject: [PATCH] gcc/ * ubsan.c (ubsan_use_new_style_p): Fix check for empty - string. - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239971 138bc75d-0d04-0410-961f-82ee72b054a4 - -Upstream-Status: Backport -Signed-off-by: Joshua Lock - ---- - gcc/ubsan.c | 2 +- - 2 files changed, 5 insertions(+), 1 deletion(-) - -Index: gcc-6.3.0/gcc/ubsan.c -=================================================================== ---- gcc-6.3.0.orig/gcc/ubsan.c -+++ gcc-6.3.0/gcc/ubsan.c -@@ -1471,7 +1471,7 @@ ubsan_use_new_style_p (location_t loc) - - expanded_location xloc = expand_location (loc); - if (xloc.file == NULL || strncmp (xloc.file, "\1", 2) == 0 -- || xloc.file == '\0' || xloc.file[0] == '\xff' -+ || xloc.file[0] == '\0' || xloc.file[0] == '\xff' - || xloc.file[1] == '\xff') - return false; - diff --git a/packages/gdb/6.8a/version.desc b/packages/gdb/6.8a/version.desc index f26b5a2..f3953c8 100644 --- a/packages/gdb/6.8a/version.desc +++ b/packages/gdb/6.8a/version.desc @@ -1,2 +1,3 @@ obsolete='yes' archive_formats='.tar.bz2 .tar.gz' +archive_dirname='gdb-6.8' diff --git a/packages/gdb/7.0.1a/version.desc b/packages/gdb/7.0.1a/version.desc index f26b5a2..f98f67c 100644 --- a/packages/gdb/7.0.1a/version.desc +++ b/packages/gdb/7.0.1a/version.desc @@ -1,2 +1,3 @@ obsolete='yes' archive_formats='.tar.bz2 .tar.gz' +archive_dirname='gdb-7.0.1' diff --git a/packages/gdb/7.0a/version.desc b/packages/gdb/7.0a/version.desc index f26b5a2..10d8a67 100644 --- a/packages/gdb/7.0a/version.desc +++ b/packages/gdb/7.0a/version.desc @@ -1,2 +1,3 @@ obsolete='yes' archive_formats='.tar.bz2 .tar.gz' +archive_dirname='gdb-7.0' diff --git a/packages/gdb/7.1a/version.desc b/packages/gdb/7.1a/version.desc index f26b5a2..009fd5d 100644 --- a/packages/gdb/7.1a/version.desc +++ b/packages/gdb/7.1a/version.desc @@ -1,2 +1,3 @@ obsolete='yes' archive_formats='.tar.bz2 .tar.gz' +archive_dirname='gdb-7.1' diff --git a/packages/gdb/7.2a/version.desc b/packages/gdb/7.2a/version.desc index f26b5a2..094d937 100644 --- a/packages/gdb/7.2a/version.desc +++ b/packages/gdb/7.2a/version.desc @@ -1,2 +1,3 @@ obsolete='yes' archive_formats='.tar.bz2 .tar.gz' +archive_dirname='gdb-7.2' diff --git a/packages/glibc-ports/2.12.1/090-Fix-ARM-build-with-GCC-trunk.patch b/packages/glibc-ports/2.12.1/090-Fix-ARM-build-with-GCC-trunk.patch index 1a632fe..259b285 100644 --- a/packages/glibc-ports/2.12.1/090-Fix-ARM-build-with-GCC-trunk.patch +++ b/packages/glibc-ports/2.12.1/090-Fix-ARM-build-with-GCC-trunk.patch @@ -20,8 +20,8 @@ Tested that this fixes the build for ARM. sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c ++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c @@ -23,7 +23,8 @@ #include @@ -35,8 +35,8 @@ Tested that this fixes the build for ARM. static _Unwind_Reason_Code (*libgcc_s_forcedunwind) diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c index bff3e2b..1f1eb71 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c +--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c ++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c @@ -21,7 +21,8 @@ #include #include @@ -47,8 +47,8 @@ index bff3e2b..1f1eb71 100644 static _Unwind_Reason_Code (*libgcc_s_personality) (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, struct _Unwind_Context *); ---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c +--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c ++++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c @@ -23,7 +23,8 @@ #include @@ -59,8 +59,8 @@ index bff3e2b..1f1eb71 100644 static _Unwind_Reason_Code (*libgcc_s_personality) (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); static _Unwind_Reason_Code (*libgcc_s_forcedunwind) ---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c +--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c ++++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c @@ -21,7 +21,8 @@ #include #include diff --git a/packages/glibc-ports/2.12.1/100-respect-env-CPPFLAGS.patch b/packages/glibc-ports/2.12.1/100-respect-env-CPPFLAGS.patch deleted file mode 100644 index ed022be..0000000 --- a/packages/glibc-ports/2.12.1/100-respect-env-CPPFLAGS.patch +++ /dev/null @@ -1,25 +0,0 @@ -Respect environment CPPFLAGS when we run ./configure so we can inject -random -D things without having to set CFLAGS/ASFLAGS - -diff -durN glibc-2.12.1.orig/Makeconfig glibc-2.12.1/Makeconfig ---- glibc-2.12.1.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 -+++ glibc-2.12.1/Makeconfig 2009-11-13 00:49:41.000000000 +0100 -@@ -697,6 +697,7 @@ - $(foreach lib,$(libof-$(basename $(@F))) \ - $(libof-$(field.le_next)) - -+#define LIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = LIST_FIRST((head)); \ -+ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - /* - * List access methods. - */ -@@ -197,6 +202,16 @@ - #define SLIST_FOREACH(var, head, field) \ - for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) - -+#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = SLIST_FIRST((head)); \ -+ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ -+#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ -+ for ((varp) = &SLIST_FIRST((head)); \ -+ ((var) = *(varp)) != NULL; \ -+ (varp) = &SLIST_NEXT((var), field)) -+ - /* - * Singly-linked List access methods. - */ -@@ -242,6 +257,12 @@ - (head)->stqh_last = &(elm)->field.stqe_next; \ - } while (/*CONSTCOND*/0) - -+#define STAILQ_LAST(head, type, field) \ -+ (STAILQ_EMPTY((head)) ? \ -+ NULL : \ -+ ((struct type *)(void *) \ -+ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) -+ - #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ - (head)->stqh_last = &(elm)->field.stqe_next; \ -@@ -271,6 +292,11 @@ - (var); \ - (var) = ((var)->field.stqe_next)) - -+#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = STAILQ_FIRST((head)); \ -+ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define STAILQ_CONCAT(head1, head2) do { \ - if (!STAILQ_EMPTY((head2))) { \ - *(head1)->stqh_last = (head2)->stqh_first; \ -@@ -437,11 +463,21 @@ - (var); \ - (var) = ((var)->field.tqe_next)) - -+#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = TAILQ_FIRST((head)); \ -+ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ - for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ - (var); \ - (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) - -+#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ -+ for ((var) = TAILQ_LAST((head), headname); \ -+ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_CONCAT(head1, head2, field) do { \ - if (!TAILQ_EMPTY(head2)) { \ - *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/packages/glibc-ports/2.12.1/160-manual-no-perl.patch b/packages/glibc-ports/2.12.1/160-manual-no-perl.patch deleted file mode 100644 index 2eb5414..0000000 --- a/packages/glibc-ports/2.12.1/160-manual-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/packages/glibc-ports/2.12.1/170-localedef-fix-trampoline.patch b/packages/glibc-ports/2.12.1/170-localedef-fix-trampoline.patch deleted file mode 100644 index fb0881d..0000000 --- a/packages/glibc-ports/2.12.1/170-localedef-fix-trampoline.patch +++ /dev/null @@ -1,53 +0,0 @@ -# DP: Description: Fix localedef segfault when run under exec-shield, -# PaX or similar. (#231438, #198099) -# DP: Dpatch Author: James Troup -# DP: Patch Author: (probably) Jakub Jelinek -# DP: Upstream status: Unknown -# DP: Status Details: Unknown -# DP: Date: 2004-03-16 -diff -durN glibc-2.12.1.orig/locale/programs/3level.h glibc-2.12.1/locale/programs/3level.h ---- glibc-2.12.1.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 -+++ glibc-2.12.1/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 -@@ -203,6 +203,42 @@ - } - } - } -+ -+/* GCC ATM seems to do a poor job with pointers to nested functions passed -+ to inlined functions. Help it a little bit with this hack. */ -+#define wchead_table_iterate(tp, fn) \ -+do \ -+ { \ -+ struct wchead_table *t = (tp); \ -+ uint32_t index1; \ -+ for (index1 = 0; index1 < t->level1_size; index1++) \ -+ { \ -+ uint32_t lookup1 = t->level1[index1]; \ -+ if (lookup1 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup1_shifted = lookup1 << t->q; \ -+ uint32_t index2; \ -+ for (index2 = 0; index2 < (1 << t->q); index2++) \ -+ { \ -+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ -+ if (lookup2 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup2_shifted = lookup2 << t->p; \ -+ uint32_t index3; \ -+ for (index3 = 0; index3 < (1 << t->p); index3++) \ -+ { \ -+ struct element_t *lookup3 \ -+ = t->level3[index3 + lookup2_shifted]; \ -+ if (lookup3 != NULL) \ -+ fn ((((index1 << t->q) + index2) << t->p) + index3, \ -+ lookup3); \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } while (0) -+ - #endif - - #ifndef NO_FINALIZE diff --git a/packages/glibc-ports/2.12.1/180-resolv-dynamic.patch b/packages/glibc-ports/2.12.1/180-resolv-dynamic.patch deleted file mode 100644 index 8f74a53..0000000 --- a/packages/glibc-ports/2.12.1/180-resolv-dynamic.patch +++ /dev/null @@ -1,39 +0,0 @@ -ripped from SuSE - -if /etc/resolv.conf is updated, then make sure applications -already running get the updated information. - -http://bugs.gentoo.org/177416 - -diff -durN glibc-2.12.1.orig/resolv/res_libc.c glibc-2.12.1/resolv/res_libc.c ---- glibc-2.12.1.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 -+++ glibc-2.12.1/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - - /* The following bit is copied from res_data.c (where it is #ifdef'ed -@@ -95,6 +96,20 @@ - __res_maybe_init (res_state resp, int preinit) - { - if (resp->options & RES_INIT) { -+ static time_t last_mtime, last_check; -+ time_t now; -+ struct stat statbuf; -+ -+ time (&now); -+ if (now != last_check) { -+ last_check = now; -+ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { -+ last_mtime = statbuf.st_mtime; -+ atomicinclock (lock); -+ atomicinc (__res_initstamp); -+ atomicincunlock (lock); -+ } -+ } - if (__res_initstamp != resp->_u._ext.initstamp) { - if (resp->nscount > 0) - __res_iclose (resp, true); diff --git a/packages/glibc-ports/2.12.1/190-localedef-mmap.patch b/packages/glibc-ports/2.12.1/190-localedef-mmap.patch deleted file mode 100644 index b24ed80..0000000 --- a/packages/glibc-ports/2.12.1/190-localedef-mmap.patch +++ /dev/null @@ -1,39 +0,0 @@ -sniped from Debian -http://bugs.gentoo.org/289615 - -2009-10-27 Aurelien Jarno - - * locale/programs/locarchive.c: use MMAP_SHARED to reserve memory - used later with MMAP_FIXED | MMAP_SHARED to cope with different - alignment restrictions. - -diff -durN glibc-2.12.1.orig/locale/programs/locarchive.c glibc-2.12.1/locale/programs/locarchive.c ---- glibc-2.12.1.orig/locale/programs/locarchive.c 2009-04-27 16:07:47.000000000 +0200 -+++ glibc-2.12.1/locale/programs/locarchive.c 2009-11-13 00:50:01.000000000 +0100 -@@ -134,7 +134,7 @@ - size_t reserved = RESERVE_MMAP_SIZE; - int xflags = 0; - if (total < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else -@@ -396,7 +396,7 @@ - size_t reserved = RESERVE_MMAP_SIZE; - int xflags = 0; - if (total < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else -@@ -614,7 +614,7 @@ - int xflags = 0; - void *p; - if (st.st_size < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else diff --git a/packages/glibc-ports/2.12.1/200-fadvise64_64.patch b/packages/glibc-ports/2.12.1/200-fadvise64_64.patch deleted file mode 100644 index a9f10cd..0000000 --- a/packages/glibc-ports/2.12.1/200-fadvise64_64.patch +++ /dev/null @@ -1,28 +0,0 @@ -ripped from Debian - - sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.12.1/sysdeps/unix/sysv/linux/posix_fadvise.c ---- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 -@@ -35,6 +35,19 @@ - return INTERNAL_SYSCALL_ERRNO (ret, err); - return 0; - #else -+# ifdef __NR_fadvise64_64 -+ INTERNAL_SYSCALL_DECL (err); -+ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, -+ __LONG_LONG_PAIR ((long) (offset >> 31), -+ (long) offset), -+ __LONG_LONG_PAIR ((long) (len >> 31), -+ (long) len), -+ advise); -+ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) -+ return INTERNAL_SYSCALL_ERRNO (ret, err); -+ return 0; -+# else - return ENOSYS; -+# endif - #endif - } diff --git a/packages/glibc-ports/2.12.1/220-section-comments.patch b/packages/glibc-ports/2.12.1/220-section-comments.patch deleted file mode 100644 index 4d35535..0000000 --- a/packages/glibc-ports/2.12.1/220-section-comments.patch +++ /dev/null @@ -1,24 +0,0 @@ -http://sources.redhat.com/ml/binutils/2004-04/msg00665.html - -fixes building on some architectures (like m68k/arm/cris/etc...) because -it does the right thing - -diff -durN glibc-2.12.1.orig/include/libc-symbols.h glibc-2.12.1/include/libc-symbols.h ---- glibc-2.12.1.orig/include/libc-symbols.h 2009-03-14 00:51:46.000000000 +0100 -+++ glibc-2.12.1/include/libc-symbols.h 2009-11-13 00:50:07.000000000 +0100 -@@ -239,12 +239,12 @@ - # define __make_section_unallocated(section_string) - # endif - --/* Tacking on "\n\t#" to the section name makes gcc put it's bogus -+/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus - section attributes on what looks like a comment to the assembler. */ - # ifdef HAVE_SECTION_QUOTES --# define __sec_comment "\"\n\t#\"" -+# define __sec_comment "\"\n#APP\n\t#\"" - # else --# define __sec_comment "\n\t#" -+# define __sec_comment "\n#APP\n\t#" - # endif - # define link_warning(symbol, msg) \ - __make_section_unallocated (".gnu.warning." #symbol) \ diff --git a/packages/glibc-ports/2.12.1/230-no-inline-gmon.patch b/packages/glibc-ports/2.12.1/230-no-inline-gmon.patch deleted file mode 100644 index 594fb79..0000000 --- a/packages/glibc-ports/2.12.1/230-no-inline-gmon.patch +++ /dev/null @@ -1,36 +0,0 @@ -http://bugs.gentoo.org/196245 -http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html - -Attached is a patch to add __attribute__ ((noinline)) to -call_gmon_start. - -Without this patch, the sec script that processed initfini.s removes a -part of inlined call_gmon_start, causing undefined label errors. - -This patch solves the problem by forcing gcc not to inline -call_gmon_start with __attribute__ ((noinline)). - -Tested by building for arm-none-lixux-gnueabi. OK to apply? - -Kazu Hirata - -2006-05-07 Kazu Hirata <kazu@codesourcery.com> - - * sysdeps/generic/initfini.c (call_gmon_start): Add - __attribute__ ((noinline)). - -Index: sysdeps/generic/initfini.c -=================================================================== - -diff -durN glibc-2.12.1.orig/sysdeps/generic/initfini.c glibc-2.12.1/sysdeps/generic/initfini.c ---- glibc-2.12.1.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200 -+++ glibc-2.12.1/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100 -@@ -70,7 +70,7 @@ - /* The beginning of _init: */ - asm ("\n/*@_init_PROLOG_BEGINS*/"); - --static void -+static void __attribute__ ((noinline)) - call_gmon_start(void) - { - extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ diff --git a/packages/glibc-ports/2.12.1/240-check_native-headers.patch b/packages/glibc-ports/2.12.1/240-check_native-headers.patch deleted file mode 100644 index de0cb5b..0000000 --- a/packages/glibc-ports/2.12.1/240-check_native-headers.patch +++ /dev/null @@ -1,17 +0,0 @@ -many ports hit this warning: -../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' -../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' - -snipped from suse - -diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/check_native.c glibc-2.12.1/sysdeps/unix/sysv/linux/check_native.c ---- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/check_native.c 2007-11-24 04:12:17.000000000 +0100 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/check_native.c 2009-11-13 00:50:11.000000000 +0100 -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/packages/glibc-ports/2.12.1/250-fix-pr631.patch b/packages/glibc-ports/2.12.1/250-fix-pr631.patch deleted file mode 100644 index af5b347..0000000 --- a/packages/glibc-ports/2.12.1/250-fix-pr631.patch +++ /dev/null @@ -1,45 +0,0 @@ -From dank@kegel.com -Wed Jun 15 09:12:43 PDT 2005 - -Fixes - -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r' -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent' -... 53 lines deleted ... -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r' -collect2: ld returned 1 exit status -make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1 - -when building glibc with --enable-static-nss. - -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631 - -diff -durN glibc-2.12.1.orig/Makeconfig glibc-2.12.1/Makeconfig ---- glibc-2.12.1.orig/Makeconfig 2009-11-13 00:49:41.000000000 +0100 -+++ glibc-2.12.1/Makeconfig 2009-11-13 00:50:13.000000000 +0100 -@@ -531,7 +531,7 @@ - - # The static libraries. - ifeq (yes,$(build-static)) --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a - else - ifeq (yes,$(build-shared)) - # We can try to link the programs with lib*_pic.a... -diff -durN glibc-2.12.1.orig/elf/Makefile glibc-2.12.1/elf/Makefile ---- glibc-2.12.1.orig/elf/Makefile 2009-01-31 01:20:55.000000000 +0100 -+++ glibc-2.12.1/elf/Makefile 2009-11-13 00:50:13.000000000 +0100 -@@ -146,6 +146,13 @@ - install-bin-script = ldd - endif - -+ifeq (yes,$(build-static-nss)) -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss) -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv) -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ -+ $(resolvobjdir)/libresolv.a -+endif -+ - others = sprof sln - install-bin = sprof - others-static = sln diff --git a/packages/glibc-ports/2.12.1/260-assume-pipe2.patch b/packages/glibc-ports/2.12.1/260-assume-pipe2.patch deleted file mode 100644 index b84f882..0000000 --- a/packages/glibc-ports/2.12.1/260-assume-pipe2.patch +++ /dev/null @@ -1,40 +0,0 @@ -http://bugs.gentoo.org/250342 -http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 - -we cant assume sock_cloexec and pipe2 are bound together as the former defines -are found in glibc only while the latter are a combo of kernel headers and -glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub -inside of glibc, we hit a problem. for example: - -#include -#include -main() -{ - getgrnam("portage"); - if (!popen("ls", "r")) - perror("popen()"); -} - -getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both -__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against -older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS -stub for it. so popen() will always fail as glibc assumes pipe2() works. - -diff -durN glibc-2.12.1.orig/socket/have_sock_cloexec.c glibc-2.12.1/socket/have_sock_cloexec.c ---- glibc-2.12.1.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 -+++ glibc-2.12.1/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 -@@ -16,9 +16,14 @@ - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -+#include - #include - #include - - #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC - int __have_sock_cloexec; - #endif -+ -+#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 -+int __have_pipe2; -+#endif diff --git a/packages/glibc-ports/2.12.1/270-china.patch b/packages/glibc-ports/2.12.1/270-china.patch deleted file mode 100644 index 4cde1cf..0000000 --- a/packages/glibc-ports/2.12.1/270-china.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.12.1.orig/localedata/locales/zh_TW glibc-2.12.1/localedata/locales/zh_TW ---- glibc-2.12.1.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 -+++ glibc-2.12.1/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 -@@ -1,7 +1,7 @@ - comment_char % - escape_char / - % --% Chinese language locale for Taiwan R.O.C. -+% Chinese language locale for Taiwan - % charmap: BIG5-CP950 - % - % Original Author: -@@ -17,7 +17,7 @@ - % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf - - LC_IDENTIFICATION --title "Chinese locale for Taiwan R.O.C." -+title "Chinese locale for Taiwan" - source "" - address "" - contact "" -@@ -25,7 +25,7 @@ - tel "" - fax "" - language "Chinese" --territory "Taiwan R.O.C." -+territory "Taiwan" - revision "0.2" - date "2000-08-02" - % diff --git a/packages/glibc-ports/2.12.1/280-new-valencian-locale.patch b/packages/glibc-ports/2.12.1/280-new-valencian-locale.patch deleted file mode 100644 index 6b46b44..0000000 --- a/packages/glibc-ports/2.12.1/280-new-valencian-locale.patch +++ /dev/null @@ -1,115 +0,0 @@ -http://bugs.gentoo.org/show_bug.cgi?id=131815 -http://sourceware.org/bugzilla/show_bug.cgi?id=2522 - -diff -durN glibc-2.12.1.orig/localedata/SUPPORTED glibc-2.12.1/localedata/SUPPORTED ---- glibc-2.12.1.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 -+++ glibc-2.12.1/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 -@@ -72,6 +72,8 @@ - ca_ES.UTF-8/UTF-8 \ - ca_ES/ISO-8859-1 \ - ca_ES@euro/ISO-8859-15 \ -+ca_ES.UTF-8@valencia/UTF-8 \ -+ca_ES@valencia/ISO-8859-15 \ - ca_FR.UTF-8/UTF-8 \ - ca_FR/ISO-8859-15 \ - ca_IT.UTF-8/UTF-8 \ -diff -durN glibc-2.12.1.orig/localedata/locales/ca_ES@valencia glibc-2.12.1/localedata/locales/ca_ES@valencia ---- glibc-2.12.1.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.12.1/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 -@@ -0,0 +1,96 @@ -+comment_char % -+escape_char / -+% -+% Valencian (southern Catalan) locale for Spain with Euro -+% -+% Note that this locale is almost the same as ca_ES@euro. The point of having -+% a separate locale is only for PO translations, which have a lot of social -+% support and are very appreciated by the Valencian-speaking community. -+% -+% Contact: Jordi Mallach -+% Email: jordi@gnu.org -+% Tel: -+% Fax: -+% Language: ca -+% Territory: ES -+% Option: euro -+% Revision: 1.0 -+% Date: 2006-04-06 -+% Application: general -+% Users: general -+% Repertoiremap: mnemonic,ds -+% Charset: ISO-8859-15 -+% Distribution and use is free, also -+% for commercial purposes. -+ -+LC_IDENTIFICATION -+title "Valencian (southern Catalan) locale for Spain with Euro" -+source "" -+address "" -+contact "Jordi Mallach" -+email "jordi@gnu.org" -+tel "" -+fax "" -+language "Catalan" -+territory "Spain" -+revision "1.0" -+date "2006-04-06" -+% -+category "ca_ES@valencia:2006";LC_IDENTIFICATION -+category "ca_ES@valencia:2006";LC_CTYPE -+category "ca_ES@valencia:2006";LC_COLLATE -+category "ca_ES@valencia:2006";LC_MONETARY -+category "ca_ES@valencia:2006";LC_NUMERIC -+category "ca_ES@valencia:2006";LC_TIME -+category "ca_ES@valencia:2006";LC_MESSAGES -+category "ca_ES@valencia:2006";LC_PAPER -+category "ca_ES@valencia:2006";LC_NAME -+category "ca_ES@valencia:2006";LC_ADDRESS -+category "ca_ES@valencia:2006";LC_TELEPHONE -+category "ca_ES@valencia:2006";LC_MEASUREMENT -+ -+END LC_IDENTIFICATION -+ -+LC_CTYPE -+copy "i18n" -+END LC_CTYPE -+ -+LC_COLLATE -+copy "ca_ES" -+END LC_COLLATE -+ -+LC_MONETARY -+copy "ca_ES" -+END LC_MONETARY -+ -+LC_NUMERIC -+copy "ca_ES" -+END LC_NUMERIC -+ -+LC_TIME -+copy "ca_ES" -+END LC_TIME -+ -+LC_MESSAGES -+copy "ca_ES" -+END LC_MESSAGES -+ -+LC_PAPER -+copy "ca_ES" -+END LC_PAPER -+ -+LC_NAME -+copy "ca_ES" -+END LC_NAME -+ -+LC_ADDRESS -+copy "ca_ES" -+END LC_ADDRESS -+ -+LC_TELEPHONE -+copy "ca_ES" -+END LC_TELEPHONE -+ -+LC_MEASUREMENT -+copy "ca_ES" -+END LC_MEASUREMENT diff --git a/packages/glibc-ports/2.12.1/300-nscd-one-fork.patch b/packages/glibc-ports/2.12.1/300-nscd-one-fork.patch deleted file mode 100644 index 27eae51..0000000 --- a/packages/glibc-ports/2.12.1/300-nscd-one-fork.patch +++ /dev/null @@ -1,40 +0,0 @@ -only fork one to assist in stop-start-daemon assumptions about daemon behavior - -http://bugs.gentoo.org/190785 - -diff -durN glibc-2.12.1.orig/nscd/nscd.c glibc-2.12.1/nscd/nscd.c ---- glibc-2.12.1.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 -+++ glibc-2.12.1/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 -@@ -182,6 +182,9 @@ - if (pid != 0) - exit (0); - -+ if (write_pid (_PATH_NSCDPID) < 0) -+ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -+ - int nullfd = open (_PATH_DEVNULL, O_RDWR); - if (nullfd != -1) - { -@@ -231,12 +234,6 @@ - for (i = min_close_fd; i < getdtablesize (); i++) - close (i); - -- pid = fork (); -- if (pid == -1) -- error (EXIT_FAILURE, errno, _("cannot fork")); -- if (pid != 0) -- exit (0); -- - setsid (); - - if (chdir ("/") != 0) -@@ -245,9 +242,6 @@ - - openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); - -- if (write_pid (_PATH_NSCDPID) < 0) -- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -- - if (!init_logfile ()) - dbg_log (_("Could not create log file")); - diff --git a/packages/glibc-ports/2.12.1/310-hppa-nptl-carlos.patch b/packages/glibc-ports/2.12.1/310-hppa-nptl-carlos.patch deleted file mode 100644 index 947bb58..0000000 --- a/packages/glibc-ports/2.12.1/310-hppa-nptl-carlos.patch +++ /dev/null @@ -1,246 +0,0 @@ - - -diff -durN glibc-2.12.1.orig/elf/rtld.c glibc-2.12.1/elf/rtld.c ---- glibc-2.12.1.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 -+++ glibc-2.12.1/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 -@@ -390,14 +390,14 @@ - know it is available. We do not have to clear the memory if we - do not have to use the temporary bootstrap_map. Global variables - are initialized to zero by default. */ --#ifndef DONT_USE_BOOTSTRAP_MAP -+#if !defined DONT_USE_BOOTSTRAP_MAP - # ifdef HAVE_BUILTIN_MEMSET - __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); - # else -- for (size_t cnt = 0; -- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); -- ++cnt) -- bootstrap_map.l_info[cnt] = 0; -+ /* Clear the whole bootstrap_map structure */ -+ for (char *cnt = (char *)&(bootstrap_map); -+ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); -+ *cnt++ = '\0'); - # endif - # if USE___THREAD - bootstrap_map.l_tls_modid = 0; -diff -durN glibc-2.12.1.orig/include/atomic.h glibc-2.12.1/include/atomic.h ---- glibc-2.12.1.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 -+++ glibc-2.12.1/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 -@@ -185,7 +185,7 @@ - __typeof (*(mem)) __atg5_value = (newvalue); \ - \ - do \ -- __atg5_oldval = *__atg5_memp; \ -+ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ - __atg5_oldval), 0)); \ -@@ -206,7 +206,7 @@ - __typeof (*(mem)) __atg6_value = (value); \ - \ - do \ -- __atg6_oldval = *__atg6_memp; \ -+ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ - __atg6_oldval \ -@@ -224,7 +224,7 @@ - __typeof (*(mem)) __atg7_value = (value); \ - \ - do \ -- __atg7_oldv = *__atg7_memp; \ -+ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ - __atg7_oldv \ -@@ -242,7 +242,7 @@ - __typeof (mem) __atg8_memp = (mem); \ - __typeof (*(mem)) __atg8_value = (value); \ - do { \ -- __atg8_oldval = *__atg8_memp; \ -+ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ - if (__atg8_oldval >= __atg8_value) \ - break; \ - } while (__builtin_expect \ -@@ -259,7 +259,7 @@ - __typeof (mem) __atg9_memp = (mem); \ - __typeof (*(mem)) __atg9_value = (value); \ - do { \ -- __atg9_oldv = *__atg9_memp; \ -+ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ - if (__atg9_oldv >= __atg9_value) \ - break; \ - } while (__builtin_expect \ -@@ -277,7 +277,7 @@ - __typeof (mem) __atg10_memp = (mem); \ - __typeof (*(mem)) __atg10_value = (value); \ - do { \ -- __atg10_oldval = *__atg10_memp; \ -+ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ - if (__atg10_oldval <= __atg10_value) \ - break; \ - } while (__builtin_expect \ -@@ -361,7 +361,7 @@ - \ - do \ - { \ -- __atg11_oldval = *__atg11_memp; \ -+ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ - if (__builtin_expect (__atg11_oldval <= 0, 0)) \ - break; \ - } \ -@@ -400,7 +400,7 @@ - __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ - \ - do \ -- __atg14_old = (*__atg14_memp); \ -+ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ - __atg14_old | __atg14_mask,\ -@@ -418,7 +418,7 @@ - __typeof (*(mem)) __atg15_mask = (mask); \ - \ - do \ -- __atg15_old = (*__atg15_memp); \ -+ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ - __atg15_old & __atg15_mask, \ -@@ -450,7 +450,7 @@ - __typeof (*(mem)) __atg16_mask = (mask); \ - \ - do \ -- __atg16_old = (*__atg16_memp); \ -+ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ - __atg16_old & __atg16_mask,\ -@@ -468,7 +468,7 @@ - __typeof (*(mem)) __atg17_mask = (mask); \ - \ - do \ -- __atg17_old = (*__atg17_memp); \ -+ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ - __atg17_old | __atg17_mask, \ -@@ -484,7 +484,7 @@ - __typeof (*(mem)) __atg18_mask = (mask); \ - \ - do \ -- __atg18_old = (*__atg18_memp); \ -+ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ - __atg18_old | __atg18_mask,\ -@@ -500,7 +500,7 @@ - __typeof (*(mem)) __atg19_mask = (mask); \ - \ - do \ -- __atg19_old = (*__atg19_memp); \ -+ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ - __atg19_old | __atg19_mask,\ -diff -durN glibc-2.12.1.orig/nptl/Makefile glibc-2.12.1/nptl/Makefile ---- glibc-2.12.1.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 -+++ glibc-2.12.1/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -264,9 +264,9 @@ - # Files which must not be linked with libpthread. - tests-nolibpthread = tst-unload - --# This sets the stack resource limit to 1023kb, which is not a multiple --# of the page size since every architecture's page size is > 1k. --tst-oddstacklimit-ENV = ; ulimit -s 1023; -+# This sets the stack resource limit to 8193kb, which is not a multiple -+# of the page size since every architecture's page size is 4096 bytes. -+tst-oddstacklimit-ENV = ; ulimit -s 8193; - - distribute = eintr.c tst-cleanup4aux.c - -@@ -425,6 +425,35 @@ - CFLAGS-tst-cleanupx4.c += -fexceptions - CFLAGS-tst-oncex3.c += -fexceptions - CFLAGS-tst-oncex4.c += -fexceptions -+ -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed -+LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) -+ - CFLAGS-tst-align.c += $(stack-align-test-flags) - CFLAGS-tst-align3.c += $(stack-align-test-flags) - CFLAGS-tst-initializers1.c = -W -Wall -Werror -diff -durN glibc-2.12.1.orig/nptl/pthread_barrier_wait.c glibc-2.12.1/nptl/pthread_barrier_wait.c ---- glibc-2.12.1.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 -+++ glibc-2.12.1/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 -@@ -64,7 +64,7 @@ - do - lll_futex_wait (&ibarrier->curr_event, event, - ibarrier->private ^ FUTEX_PRIVATE_FLAG); -- while (event == ibarrier->curr_event); -+ while (event == *(volatile unsigned int *)&ibarrier->curr_event); - } - - /* Make sure the init_count is stored locally or in a register. */ -diff -durN glibc-2.12.1.orig/nptl/sysdeps/pthread/Makefile glibc-2.12.1/nptl/sysdeps/pthread/Makefile ---- glibc-2.12.1.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 -+++ glibc-2.12.1/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -33,7 +33,9 @@ - - ifeq ($(have-forced-unwind),yes) - tests += tst-mqueue8x -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed - CFLAGS-tst-mqueue8x.c += -fexceptions -+LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) - endif - endif - -diff -durN glibc-2.12.1.orig/stdio-common/Makefile glibc-2.12.1/stdio-common/Makefile ---- glibc-2.12.1.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 -+++ glibc-2.12.1/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -82,7 +82,7 @@ - $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' - endif - --CFLAGS-vfprintf.c = -Wno-uninitialized -+CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch - CFLAGS-vfwprintf.c = -Wno-uninitialized - CFLAGS-tst-printf.c = -Wno-format - CFLAGS-tstdiomisc.c = -Wno-format -diff -durN glibc-2.12.1.orig/sunrpc/clnt_udp.c glibc-2.12.1/sunrpc/clnt_udp.c ---- glibc-2.12.1.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 -+++ glibc-2.12.1/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 -@@ -456,7 +456,7 @@ - while (inlen < 0 && errno == EINTR); - if (inlen < 0) - { -- if (errno == EWOULDBLOCK) -+ if (errno == EWOULDBLOCK || errno == EAGAIN) - continue; - cu->cu_error.re_errno = errno; - return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/packages/glibc-ports/2.12.1/330-m68k-sys-user.patch b/packages/glibc-ports/2.12.1/330-m68k-sys-user.patch index b441691..c3a9c67 100644 --- a/packages/glibc-ports/2.12.1/330-m68k-sys-user.patch +++ b/packages/glibc-ports/2.12.1/330-m68k-sys-user.patch @@ -1,8 +1,8 @@ copied from kernel as it is sanitized now -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys/user.h ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 +diff -durN glibc-ports-2.12.1.orig/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys/user.h +--- glibc-ports-2.12.1.orig/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 @@ -1,3 +1,90 @@ +#ifndef _SYS_USER_H +#define _SYS_USER_H @@ -94,4 +94,3 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/m68k/sys /* Copyright (C) 2008 Free Software Foundation, Inc. This file is part of the GNU C Library. -diff -durN glibc-2.12.1.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.12.1/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h diff --git a/packages/glibc-ports/2.12.1/340-dl_execstack-PaX-support.patch b/packages/glibc-ports/2.12.1/340-dl_execstack-PaX-support.patch deleted file mode 100644 index afdb39c..0000000 --- a/packages/glibc-ports/2.12.1/340-dl_execstack-PaX-support.patch +++ /dev/null @@ -1,66 +0,0 @@ - With latest versions of glibc, a lot of apps failed on a PaX enabled - system with: - cannot enable executable stack as shared object requires: Permission denied - - This is due to PaX 'exec-protecting' the stack, and ld.so then trying - to make the stack executable due to some libraries not containing the - PT_GNU_STACK section. Bug #32960. (12 Nov 2003). - - Patch also NPTL. Bug #116086. (20 Dec 2005). - -diff -durN glibc-2.12.1.orig/nptl/allocatestack.c glibc-2.12.1/nptl/allocatestack.c ---- glibc-2.12.1.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 -+++ glibc-2.12.1/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -329,7 +329,8 @@ - # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" - #endif - if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) -- return errno; -+ if (errno != EACCES) /* PAX is enabled */ -+ return errno; - - return 0; - } -diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.12.1/sysdeps/unix/sysv/linux/dl-execstack.c ---- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -63,7 +63,10 @@ - else - # endif - { -- result = errno; -+ if (errno == EACCES) /* PAX is enabled */ -+ result = 0; -+ else -+ result = errno; - goto out; - } - } -@@ -89,7 +92,12 @@ - page -= size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; -@@ -115,7 +123,12 @@ - page += size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; diff --git a/packages/glibc-ports/2.12.1/350-pre20040117-pt_pax.patch b/packages/glibc-ports/2.12.1/350-pre20040117-pt_pax.patch deleted file mode 100644 index 3f03169..0000000 --- a/packages/glibc-ports/2.12.1/350-pre20040117-pt_pax.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.12.1.orig/elf/elf.h glibc-2.12.1/elf/elf.h ---- glibc-2.12.1.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 -+++ glibc-2.12.1/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 -@@ -580,6 +580,7 @@ - #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ - #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ - #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ -+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ - #define PT_LOSUNW 0x6ffffffa - #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ - #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ -@@ -593,6 +594,18 @@ - #define PF_X (1 << 0) /* Segment is executable */ - #define PF_W (1 << 1) /* Segment is writable */ - #define PF_R (1 << 2) /* Segment is readable */ -+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ -+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ -+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ -+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ -+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ -+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ -+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ -+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ -+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ -+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ -+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ -+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ - #define PF_MASKOS 0x0ff00000 /* OS-specific */ - #define PF_MASKPROC 0xf0000000 /* Processor-specific */ - diff --git a/packages/glibc-ports/2.12.1/360-tests-sandbox-libdl-paths.patch b/packages/glibc-ports/2.12.1/360-tests-sandbox-libdl-paths.patch deleted file mode 100644 index a847cdb..0000000 --- a/packages/glibc-ports/2.12.1/360-tests-sandbox-libdl-paths.patch +++ /dev/null @@ -1,193 +0,0 @@ -when glibc runs its tests, it does so by invoking the local library loader. -in Gentoo, we build/run inside of our "sandbox" which itself is linked against -libdl (so that it can load libraries and pull out symbols). the trouble -is that when you upgrade from an older glibc to the new one, often times -internal symbols change name or abi. this is normally OK as you cannot use -libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so -we always say "keep all of the glibc libraries from the same build". but -when glibc runs its tests, it uses dynamic paths to point to its new local -copies of libraries. if the test doesnt use libdl, then glibc doesnt add -its path, and when sandbox triggers the loading of libdl, glibc does so -from the host system system. this gets us into the case of all libraries -are from the locally compiled version of glibc except for libdl.so. - -Fix by Wormo - -http://bugs.gentoo.org/56898 - -diff -durN glibc-2.12.1.orig/grp/tst_fgetgrent.sh glibc-2.12.1/grp/tst_fgetgrent.sh ---- glibc-2.12.1.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 -+++ glibc-2.12.1/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,7 +24,8 @@ - rtld_installed_name=$1; shift - - testout=${common_objpfx}/grp/tst_fgetgrent.out --library_path=${common_objpfx} -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn - - result=0 - -diff -durN glibc-2.12.1.orig/iconvdata/run-iconv-test.sh glibc-2.12.1/iconvdata/run-iconv-test.sh ---- glibc-2.12.1.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 -+++ glibc-2.12.1/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -34,7 +34,7 @@ - export GCONV_PATH - - # We have to have some directories in the library path. --LIBPATH=$codir:$codir/iconvdata -+LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn - - # How the start the iconv(1) program. - ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ -diff -durN glibc-2.12.1.orig/iconvdata/tst-table.sh glibc-2.12.1/iconvdata/tst-table.sh ---- glibc-2.12.1.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 -+++ glibc-2.12.1/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -59,8 +59,11 @@ - irreversible=${charset}.irreversible - fi - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # iconv in one direction. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-table-from ${charset} \ - > ${objpfx}tst-${charset}.table - -diff -durN glibc-2.12.1.orig/intl/tst-codeset.sh glibc-2.12.1/intl/tst-codeset.sh ---- glibc-2.12.1.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 -+++ glibc-2.12.1/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -37,6 +37,9 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - ${common_objpfx}elf/ld.so --library-path $common_objpfx \ - ${objpfx}tst-codeset > ${objpfx}tst-codeset.out - -diff -durN glibc-2.12.1.orig/intl/tst-gettext.sh glibc-2.12.1/intl/tst-gettext.sh ---- glibc-2.12.1.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 -+++ glibc-2.12.1/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -51,9 +51,12 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. - MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.12.1.orig/intl/tst-gettext2.sh glibc-2.12.1/intl/tst-gettext2.sh ---- glibc-2.12.1.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 -+++ glibc-2.12.1/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -65,8 +65,11 @@ - LOCPATH=${objpfx}domaindir - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && - cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.12.1.orig/malloc/tst-mtrace.sh glibc-2.12.1/malloc/tst-mtrace.sh ---- glibc-2.12.1.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 -+++ glibc-2.12.1/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,9 +24,12 @@ - status=0 - trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ - LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${common_objpfx}malloc/tst-mtrace || status=1 - - if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then -diff -durN glibc-2.12.1.orig/nptl/tst-tls6.sh glibc-2.12.1/nptl/tst-tls6.sh ---- glibc-2.12.1.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 -+++ glibc-2.12.1/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -5,8 +5,8 @@ - rtld_installed_name=$1; shift - logfile=$common_objpfx/nptl/tst-tls6.out - --# We have to find libc and nptl --library_path=${common_objpfx}:${common_objpfx}nptl -+# We have to find libc and nptl (also libdl in case sandbox is in use) -+library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn - tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}/nptl/tst-tls5" - -diff -durN glibc-2.12.1.orig/posix/globtest.sh glibc-2.12.1/posix/globtest.sh ---- glibc-2.12.1.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 -+++ glibc-2.12.1/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -18,7 +18,7 @@ - esac - - # We have to find the libc and the NSS modules. --library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod -+library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn - - # Since we use `sort' we must make sure to use the same locale everywhere. - LC_ALL=C -diff -durN glibc-2.12.1.orig/posix/tst-getconf.sh glibc-2.12.1/posix/tst-getconf.sh ---- glibc-2.12.1.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 -+++ glibc-2.12.1/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -10,7 +10,10 @@ - else - rtld_installed_name=$1; shift - runit() { -- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" -+ -+ # make sure libdl is also in path in case sandbox is in use -+ library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" - } - fi - -diff -durN glibc-2.12.1.orig/posix/wordexp-tst.sh glibc-2.12.1/posix/wordexp-tst.sh ---- glibc-2.12.1.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 -+++ glibc-2.12.1/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -19,8 +19,11 @@ - " - export IFS - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - failed=0 --${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ -+${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 - cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 - wordexp returned 0 diff --git a/packages/glibc-ports/2.12.1/370-fnmatch.patch b/packages/glibc-ports/2.12.1/370-fnmatch.patch deleted file mode 100644 index f345b35..0000000 --- a/packages/glibc-ports/2.12.1/370-fnmatch.patch +++ /dev/null @@ -1,62 +0,0 @@ -http://sourceware.org/ml/libc-hacker/2002-11/msg00071.html - -When fnmatch detects an invalid multibyte character it should fall back to -single byte matching, so that "*" has a chance to match such a string. - -Andreas. - -2005-04-12 Andreas Schwab - - * posix/fnmatch.c (fnmatch): If conversion to wide character - fails fall back to single byte matching. - -Index: posix/fnmatch.c -=================================================================== - -diff -durN glibc-2.12.1.orig/posix/fnmatch.c glibc-2.12.1/posix/fnmatch.c ---- glibc-2.12.1.orig/posix/fnmatch.c 2007-07-28 22:35:00.000000000 +0200 -+++ glibc-2.12.1/posix/fnmatch.c 2009-11-13 00:50:39.000000000 +0100 -@@ -327,6 +327,7 @@ - # if HANDLE_MULTIBYTE - if (__builtin_expect (MB_CUR_MAX, 1) != 1) - { -+ const char *orig_pattern = pattern; - mbstate_t ps; - size_t n; - const char *p; -@@ -382,10 +383,8 @@ - wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t)); - n = mbsrtowcs (wstring, &p, n + 1, &ps); - if (__builtin_expect (n == (size_t) -1, 0)) -- /* Something wrong. -- XXX Do we have to set `errno' to something which mbsrtows hasn't -- already done? */ -- return -1; -+ /* Something wrong. Fall back to single byte matching. */ -+ goto try_singlebyte; - if (p) - { - memset (&ps, '\0', sizeof (ps)); -@@ -397,10 +396,8 @@ - prepare_wstring: - n = mbsrtowcs (NULL, &string, 0, &ps); - if (__builtin_expect (n == (size_t) -1, 0)) -- /* Something wrong. -- XXX Do we have to set `errno' to something which mbsrtows hasn't -- already done? */ -- return -1; -+ /* Something wrong. Fall back to single byte matching. */ -+ goto try_singlebyte; - wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t)); - assert (mbsinit (&ps)); - (void) mbsrtowcs (wstring, &string, n + 1, &ps); -@@ -408,6 +405,9 @@ - - return internal_fnwmatch (wpattern, wstring, wstring + n, - flags & FNM_PERIOD, flags, NULL); -+ -+ try_singlebyte: -+ pattern = orig_pattern; - } - # endif /* mbstate_t and mbsrtowcs or _LIBC. */ - diff --git a/packages/glibc-ports/2.12.1/380-dont-build-timezone.patch b/packages/glibc-ports/2.12.1/380-dont-build-timezone.patch deleted file mode 100644 index 0a30436..0000000 --- a/packages/glibc-ports/2.12.1/380-dont-build-timezone.patch +++ /dev/null @@ -1,14 +0,0 @@ -timezone data has been split into the package sys-libs/timezone-data - -diff -durN glibc-2.12.1.orig/Makeconfig glibc-2.12.1/Makeconfig ---- glibc-2.12.1.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 -+++ glibc-2.12.1/Makeconfig 2009-11-13 00:50:41.000000000 +0100 -@@ -944,7 +944,7 @@ - stdlib stdio-common libio malloc string wcsmbs time dirent \ - grp pwd posix io termios resource misc socket sysvipc gmon \ - gnulib iconv iconvdata wctype manual shadow gshadow po argp \ -- crypt nss localedata timezone rt conform debug \ -+ crypt nss localedata rt conform debug \ - $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) - - ifndef avoid-generated diff --git a/packages/glibc-ports/2.12.1/400-alpha-xstat.patch b/packages/glibc-ports/2.12.1/400-alpha-xstat.patch deleted file mode 100644 index 97bea98..0000000 --- a/packages/glibc-ports/2.12.1/400-alpha-xstat.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -@@ -386,6 +386,11 @@ - # define __ASSUME_GETDENTS32_D_TYPE 1 - #endif - -+/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ -+#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ -+# define __ASSUME_STAT64_SYSCALL 1 -+#endif -+ - /* Starting with version 2.5.3, the initial location returned by `brk' - after exec is always rounded up to the next page. */ - #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/packages/glibc-ports/2.12.1/430-alpha-creat.patch b/packages/glibc-ports/2.12.1/430-alpha-creat.patch deleted file mode 100644 index bfb72d0..0000000 --- a/packages/glibc-ports/2.12.1/430-alpha-creat.patch +++ /dev/null @@ -1,14 +0,0 @@ -alpha does not have a __NR_creat - -http://bugs.gentoo.org/227275 -http://sourceware.org/bugzilla/show_bug.cgi?id=6650 - -diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.12.1/sysdeps/unix/sysv/linux/wordsize-64/creat64.c ---- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 -@@ -1 +1,5 @@ - /* Defined as alias for the syscall. */ -+#include -+#ifndef __NR_creat -+#include "../../../../../io/creat64.c" -+#endif diff --git a/packages/glibc-ports/2.12.1/440-alpha-cache-shape.patch b/packages/glibc-ports/2.12.1/440-alpha-cache-shape.patch index ea85e99..879f8db 100644 --- a/packages/glibc-ports/2.12.1/440-alpha-cache-shape.patch +++ b/packages/glibc-ports/2.12.1/440-alpha-cache-shape.patch @@ -5,9 +5,9 @@ duplication for static builds with dl-sysdep and dl-support. since dl-sysdep is both shared/static, there is no point in hooking dl-support anymore, so we can punt it. -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/dl-support.c ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 +diff -durN glibc-ports-2.12.1.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/dl-support.c +--- glibc-ports-2.12.1.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 @@ -1,2 +1,1 @@ -#include "dl-auxv.h" #include diff --git a/packages/glibc-ports/2.12.1/460-alpha-fix-gcc-4.1-warnings.patch b/packages/glibc-ports/2.12.1/460-alpha-fix-gcc-4.1-warnings.patch index 6438267..65781b4 100644 --- a/packages/glibc-ports/2.12.1/460-alpha-fix-gcc-4.1-warnings.patch +++ b/packages/glibc-ports/2.12.1/460-alpha-fix-gcc-4.1-warnings.patch @@ -16,9 +16,9 @@ I cannot really think of anything better than ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 +diff -durN glibc-ports-2.12.1.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c +--- glibc-ports-2.12.1.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 @@ -178,13 +178,13 @@ static inline void stb_mb(unsigned char val, unsigned long addr) @@ -53,4 +53,3 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/alpha/io return r; } -diff -durN glibc-2.12.1.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.12.1/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c diff --git a/packages/glibc-ports/2.12.1/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc-ports/2.12.1/490-alpha_alpha-add-fdatasync-support.patch deleted file mode 100644 index 9d35ebd..0000000 --- a/packages/glibc-ports/2.12.1/490-alpha_alpha-add-fdatasync-support.patch +++ /dev/null @@ -1,126 +0,0 @@ -2009-07-25 Aurelien Jarno - - * sysdeps/unix/sysv/linux/kernel-features.h: define - __ASSUME_FDATASYNC. - * sysdeps/unix/sysv/linux/fdatasync.c: New file. - * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with - -fexceptions. - * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. - - sysdeps/unix/sysv/linux/Makefile | 1 - sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ - sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ - sysdeps/unix/sysv/linux/syscalls.list | 1 - 4 files changed, 76 insertions(+), 1 deletion(-) - -diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.12.1/sysdeps/unix/sysv/linux/Makefile ---- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 -@@ -20,6 +20,7 @@ - setfsuid setfsgid makedev epoll_pwait signalfd \ - eventfd eventfd_read eventfd_write - -+CFLAGS-fdatasync.c = -fexceptions - CFLAGS-gethostid.c = -fexceptions - - sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ -diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.12.1/sysdeps/unix/sysv/linux/fdatasync.c ---- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 -@@ -0,0 +1,69 @@ -+/* fdatasync -- synchronize at least the data part of a file with -+ the underlying media. Linux version. -+ -+ Copyright (C) 2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+ -+#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC -+static int __have_no_fdatasync; -+#endif -+ -+static int -+do_fdatasync (int fd) -+{ -+#ifdef __ASSUME_FDATASYNC -+ return INLINE_SYSCALL (fdatasync, 1, fd); -+#elif defined __NR_fdatasync -+ if (!__builtin_expect (__have_no_fdatasync, 0)) -+ { -+ int result = INLINE_SYSCALL (fdatasync, 1, fd); -+ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) -+ return result; -+ -+ __have_no_fdatasync = 1; -+ } -+#endif -+ return INLINE_SYSCALL (fsync, 1, fd); -+} -+ -+int -+__fdatasync (int fd) -+{ -+ if (SINGLE_THREAD_P) -+ return do_fdatasync (fd); -+ -+ int oldtype = LIBC_CANCEL_ASYNC (); -+ -+ int result = do_fdatasync (fd); -+ -+ LIBC_CANCEL_RESET (oldtype); -+ -+ return result; -+} -+ -+weak_alias (__fdatasync, fdatasync) -+ -diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 -@@ -459,6 +459,12 @@ - # define __ASSUME_FUTEX_LOCK_PI 1 - #endif - -+/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it -+ was already present in 2.0 kernels on other architectures. */ -+#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) -+# define __ASSUME_FDATASYNC 1 -+#endif -+ - /* Support for utimensat syscall was added in 2.6.22, on SH - only after 2.6.22-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020616 \ -diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.12.1/sysdeps/unix/sysv/linux/syscalls.list ---- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 -@@ -11,7 +11,6 @@ - epoll_create1 EXTRA epoll_create1 i:i epoll_create1 - epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl - epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait --fdatasync - fdatasync Ci:i fdatasync - flock - flock i:ii __flock flock - fork - fork i: __libc_fork __fork fork - get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/packages/glibc-ports/2.12.1/530-alpha-fix-rtld-fPIC.patch b/packages/glibc-ports/2.12.1/530-alpha-fix-rtld-fPIC.patch index 621a6f3..20b2e32 100644 --- a/packages/glibc-ports/2.12.1/530-alpha-fix-rtld-fPIC.patch +++ b/packages/glibc-ports/2.12.1/530-alpha-fix-rtld-fPIC.patch @@ -5,9 +5,9 @@ ports/sysdeps/alpha/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/alpha/Makefile glibc-2.12.1/glibc-ports-2.12.1/sysdeps/alpha/Makefile ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 +diff -durN glibc-ports-2.12.1.orig/sysdeps/alpha/Makefile glibc-ports-2.12.1/sysdeps/alpha/Makefile +--- glibc-ports-2.12.1.orig/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.12.1/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 @@ -35,7 +35,8 @@ ifeq ($(subdir),elf) @@ -18,4 +18,3 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/alpha/Makefile glibc-2.1 endif # Build everything with full IEEE math support, and with dynamic rounding; -diff -durN glibc-2.12.1.orig/ports/sysdeps/alpha/Makefile glibc-2.12.1/ports/sysdeps/alpha/Makefile diff --git a/packages/glibc-ports/2.12.1/560-ppc-atomic.patch b/packages/glibc-ports/2.12.1/560-ppc-atomic.patch deleted file mode 100644 index 679ef18..0000000 --- a/packages/glibc-ports/2.12.1/560-ppc-atomic.patch +++ /dev/null @@ -1,415 +0,0 @@ -sniped from suse - -Index: sysdeps/powerpc/bits/atomic.h -=================================================================== -RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v -retrieving revision 1.17 -diff -u -a -p -r1.17 atomic.h - -diff -durN glibc-2.12.1.orig/sysdeps/powerpc/bits/atomic.h glibc-2.12.1/sysdeps/powerpc/bits/atomic.h ---- glibc-2.12.1.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 -+++ glibc-2.12.1/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -85,14 +85,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -102,14 +102,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -118,12 +118,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -132,11 +132,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -144,12 +144,12 @@ - #define __arch_atomic_exchange_and_add_32(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stwcx. %1,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -157,12 +157,12 @@ - #define __arch_atomic_increment_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -170,27 +170,27 @@ - #define __arch_atomic_decrement_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_32(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ - " cmpwi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stwcx. %1,0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -diff -durN glibc-2.12.1.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.12.1/sysdeps/powerpc/powerpc32/bits/atomic.h ---- glibc-2.12.1.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 -+++ glibc-2.12.1/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -60,14 +60,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -diff -durN glibc-2.12.1.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.12.1/sysdeps/powerpc/powerpc64/bits/atomic.h ---- glibc-2.12.1.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 -+++ glibc-2.12.1/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp, __tmp2; \ - __asm __volatile (" clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -61,14 +61,14 @@ - unsigned int __tmp, __tmp2; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ - " clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -82,14 +82,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -98,14 +98,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -115,14 +115,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -132,14 +132,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -148,12 +148,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -162,11 +162,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -174,12 +174,12 @@ - #define __arch_atomic_exchange_and_add_64(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stdcx. %1,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -187,12 +187,12 @@ - #define __arch_atomic_increment_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -200,27 +200,27 @@ - #define __arch_atomic_decrement_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_64(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ - " cmpdi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stdcx. %1,0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) diff --git a/packages/glibc-ports/2.12.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/packages/glibc-ports/2.12.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch index fc42a92..7878ab4 100644 --- a/packages/glibc-ports/2.12.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch +++ b/packages/glibc-ports/2.12.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch @@ -1,9 +1,9 @@ http://yann.poupet.free.fr/ep93xx/ Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/bits/endian.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/bits/endian.h ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/bits/endian.h glibc-ports-2.12.1/sysdeps/arm/bits/endian.h +--- glibc-ports-2.12.1.orig/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.12.1/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100 @@ -12,7 +12,7 @@ /* FPA floating point units are always big-endian, irrespective of the CPU endianness. VFP floating point units use the same endianness @@ -13,9 +13,9 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/bits/endian.h glibc- #define __FLOAT_WORD_ORDER __BYTE_ORDER #else #define __FLOAT_WORD_ORDER __BIG_ENDIAN -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/fpu/__longjmp.S glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S +--- glibc-ports-2.12.1.orig/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100 @@ -30,7 +30,33 @@ movs r0, r1 /* get the return value in place */ moveq r0, #1 /* can't let setjmp() return zero! */ @@ -50,9 +50,9 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/__longjmp.S glib LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) END (__longjmp) -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/fpu/bits/fenv.h glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h +--- glibc-ports-2.12.1.orig/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100 @@ -20,6 +20,45 @@ # error "Never use directly; include instead." #endif @@ -108,9 +108,9 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/fenv.h glib /* Type representing exception flags. */ typedef unsigned long int fexcept_t; -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/fpu/bits/setjmp.h glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h +--- glibc-ports-2.12.1.orig/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100 @@ -28,7 +28,11 @@ #ifndef _ASM /* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not @@ -123,9 +123,9 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/bits/setjmp.h gl +#endif #endif -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/fpu/fegetround.c glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c +--- glibc-ports-2.12.1.orig/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100 @@ -18,9 +18,21 @@ 02111-1307 USA. */ @@ -148,9 +148,9 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fegetround.c gli + +#endif } -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/fpu/fesetround.c glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c +--- glibc-ports-2.12.1.orig/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100 @@ -18,12 +18,28 @@ 02111-1307 USA. */ @@ -180,9 +180,9 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fesetround.c gli } libm_hidden_def (fesetround) -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/fpu/fpu_control.h glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h +--- glibc-ports-2.12.1.orig/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100 @@ -1,5 +1,6 @@ /* FPU control word definitions. ARM version. - Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. @@ -278,9 +278,9 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/fpu_control.h gl +#endif + #endif /* _FPU_CONTROL_H */ -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h +--- glibc-ports-2.12.1.orig/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100 @@ -17,4 +17,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ @@ -290,9 +290,9 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/jmpbuf-offsets.h +#else #define __JMP_BUF_SP 20 +#endif -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/fpu/setjmp.S glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S +--- glibc-ports-2.12.1.orig/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100 @@ -24,11 +24,41 @@ ENTRY (__sigsetjmp) @@ -335,9 +335,9 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/fpu/setjmp.S glibc-2 /* Make a tail call to __sigjmp_save; it takes the same args. */ B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/gccframe.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/gccframe.h ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/gccframe.h glibc-ports-2.12.1/sysdeps/arm/gccframe.h +--- glibc-ports-2.12.1.orig/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.12.1/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100 @@ -17,6 +17,10 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ @@ -349,9 +349,9 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/gccframe.h glibc-2.1 +#endif #include -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.12.1.orig/sysdeps/arm/gmp-mparam.h glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h +--- glibc-ports-2.12.1.orig/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100 @@ -29,7 +29,7 @@ #if defined(__ARMEB__) # define IEEE_DOUBLE_MIXED_ENDIAN 0 @@ -361,14 +361,3 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/arm/gmp-mparam.h glibc-2 # define IEEE_DOUBLE_MIXED_ENDIAN 0 # define IEEE_DOUBLE_BIG_ENDIAN 0 #else -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/bits/endian.h glibc-2.12.1/ports/sysdeps/arm/bits/endian.h -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/__longjmp.S glibc-2.12.1/ports/sysdeps/arm/fpu/__longjmp.S -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/bits/fenv.h glibc-2.12.1/ports/sysdeps/arm/fpu/bits/fenv.h -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/bits/setjmp.h glibc-2.12.1/ports/sysdeps/arm/fpu/bits/setjmp.h -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/fegetround.c glibc-2.12.1/ports/sysdeps/arm/fpu/fegetround.c -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/fesetround.c glibc-2.12.1/ports/sysdeps/arm/fpu/fesetround.c -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/fpu_control.h glibc-2.12.1/ports/sysdeps/arm/fpu/fpu_control.h -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.12.1/ports/sysdeps/arm/fpu/jmpbuf-offsets.h -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/fpu/setjmp.S glibc-2.12.1/ports/sysdeps/arm/fpu/setjmp.S -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/gccframe.h glibc-2.12.1/ports/sysdeps/arm/gccframe.h -diff -durN glibc-2.12.1.orig/ports/sysdeps/arm/gmp-mparam.h glibc-2.12.1/ports/sysdeps/arm/gmp-mparam.h diff --git a/packages/glibc-ports/2.12.1/580-nptl-lowlevellock.patch b/packages/glibc-ports/2.12.1/580-nptl-lowlevellock.patch index c243a76..4d1a51a 100644 --- a/packages/glibc-ports/2.12.1/580-nptl-lowlevellock.patch +++ b/packages/glibc-ports/2.12.1/580-nptl-lowlevellock.patch @@ -9,9 +9,9 @@ In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: ../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.) ../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function) -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 +diff -durN glibc-ports-2.12.1.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +--- glibc-ports-2.12.1.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 @@ -25,6 +25,7 @@ #include #include @@ -20,4 +20,3 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/unix/sysv/linux/arm/nptl #define FUTEX_WAIT 0 #define FUTEX_WAKE 1 -diff -durN glibc-2.12.1.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.12.1/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h diff --git a/packages/glibc-ports/2.12.1/610-fpu-cw-mips.patch b/packages/glibc-ports/2.12.1/610-fpu-cw-mips.patch index 7d990de..deab419 100644 --- a/packages/glibc-ports/2.12.1/610-fpu-cw-mips.patch +++ b/packages/glibc-ports/2.12.1/610-fpu-cw-mips.patch @@ -1,8 +1,8 @@ http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html -diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/mips/fpu_control.h glibc-2.12.1/glibc-ports-2.12.1/sysdeps/mips/fpu_control.h ---- glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.12.1/glibc-ports-2.12.1/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 +diff -durN glibc-ports-2.12.1.orig/sysdeps/mips/fpu_control.h glibc-ports-2.12.1/sysdeps/mips/fpu_control.h +--- glibc-ports-2.12.1.orig/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.12.1/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 @@ -86,7 +86,7 @@ #define _FPU_RC_UP 0x2 #define _FPU_RC_DOWN 0x3 @@ -12,4 +12,3 @@ diff -durN glibc-2.12.1.orig/glibc-ports-2.12.1/sysdeps/mips/fpu_control.h glibc /* The fdlibm code requires strict IEEE double precision arithmetic, -diff -durN glibc-2.12.1.orig/ports/sysdeps/mips/fpu_control.h glibc-2.12.1/ports/sysdeps/mips/fpu_control.h diff --git a/packages/glibc-ports/2.12.1/630-mips_shn_undef-hack.patch b/packages/glibc-ports/2.12.1/630-mips_shn_undef-hack.patch deleted file mode 100644 index f6a5eb6..0000000 --- a/packages/glibc-ports/2.12.1/630-mips_shn_undef-hack.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -durN glibc-2.12.1.orig/elf/dl-lookup.c glibc-2.12.1/elf/dl-lookup.c ---- glibc-2.12.1.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 -+++ glibc-2.12.1/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 -@@ -301,6 +301,12 @@ - /* FALLTHROUGH */ - case STB_GLOBAL: - success: -+#ifdef __mips__ -+ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF -+ symbols, we skip them. */ -+ if (sym->st_shndx == SHN_UNDEF) -+ break; -+#endif - /* Global definition. Just what we need. */ - result->s = sym; - result->m = (struct link_map *) map; diff --git a/packages/glibc-ports/2.12.1/640-alpha-atfcts.patch b/packages/glibc-ports/2.12.1/640-alpha-atfcts.patch deleted file mode 100644 index 90a9d0d..0000000 --- a/packages/glibc-ports/2.12.1/640-alpha-atfcts.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 -+++ glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 -@@ -437,7 +437,8 @@ - the code. On PPC they were introduced in 2.6.17-rc1, - on SH in 2.6.19-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020611 \ -- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) -+ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ -+ && (!defined __alpha__) - # define __ASSUME_ATFCTS 1 - #endif - diff --git a/packages/glibc-ports/2.12.1/650-syslog.patch b/packages/glibc-ports/2.12.1/650-syslog.patch deleted file mode 100644 index c20cafc..0000000 --- a/packages/glibc-ports/2.12.1/650-syslog.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c ---- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 -+++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 -@@ -152,7 +152,7 @@ - #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID - /* Check for invalid bits. */ - if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { -- syslog(INTERNALLOG, -+ __syslog(INTERNALLOG, - "syslog: unknown facility/priority: %x", pri); - pri &= LOG_PRIMASK|LOG_FACMASK; - } diff --git a/packages/glibc-ports/2.12.1/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc-ports/2.12.1/660-debug-readlink_chk-readklinkat_chk.patch deleted file mode 100644 index a5a7052..0000000 --- a/packages/glibc-ports/2.12.1/660-debug-readlink_chk-readklinkat_chk.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c ---- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 -+++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 -@@ -25,7 +25,7 @@ - - - ssize_t --__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) -+__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) - { - if (len > buflen) - __chk_fail (); -diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c ---- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 -+++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 -@@ -21,7 +21,7 @@ - - - ssize_t --__readlinkat_chk (int fd, const char *path, void *buf, size_t len, -+__readlinkat_chk (int fd, const char *path, char *buf, size_t len, - size_t buflen) - { - if (len > buflen) diff --git a/packages/glibc-ports/2.12.1/670-support-hard-float-eabi.patch b/packages/glibc-ports/2.12.1/670-support-hard-float-eabi.patch index 3f2bc0f..af5dd39 100644 --- a/packages/glibc-ports/2.12.1/670-support-hard-float-eabi.patch +++ b/packages/glibc-ports/2.12.1/670-support-hard-float-eabi.patch @@ -1,6 +1,6 @@ -diff -ur glibc-2.12.1/ports/sysdeps/arm/preconfigure glibc-2.12.1-patched/ports/sysdeps/arm/preconfigure ---- glibc-2.12.1/ports/sysdeps/arm/preconfigure 2017-03-07 15:33:56.410265000 -0700 -+++ glibc-2.12.1-patched/ports/sysdeps/arm/preconfigure 2017-03-07 15:34:42.016840000 -0700 +diff -ur glibc-2.12.1/sysdeps/arm/preconfigure glibc-2.12.1-patched/sysdeps/arm/preconfigure +--- glibc-2.12.1/sysdeps/arm/preconfigure 2017-03-07 15:33:56.410265000 -0700 ++++ glibc-2.12.1-patched/sysdeps/arm/preconfigure 2017-03-07 15:34:42.016840000 -0700 @@ -2,7 +2,7 @@ arm*) base_machine=arm @@ -10,9 +10,9 @@ diff -ur glibc-2.12.1/ports/sysdeps/arm/preconfigure glibc-2.12.1-patched/ports/ machine=arm/eabi/$machine ;; *) -diff -ur glibc-2.12.1/ports/sysdeps/arm/shlib-versions glibc-2.12.1-patched/ports/sysdeps/arm/shlib-versions ---- glibc-2.12.1/ports/sysdeps/arm/shlib-versions 2017-03-07 15:33:56.439267000 -0700 -+++ glibc-2.12.1-patched/ports/sysdeps/arm/shlib-versions 2017-03-07 15:34:42.018837000 -0700 +diff -ur glibc-2.12.1/sysdeps/arm/shlib-versions glibc-2.12.1-patched/sysdeps/arm/shlib-versions +--- glibc-2.12.1/sysdeps/arm/shlib-versions 2017-03-07 15:33:56.439267000 -0700 ++++ glibc-2.12.1-patched/sysdeps/arm/shlib-versions 2017-03-07 15:34:42.018837000 -0700 @@ -1,4 +1,4 @@ -arm.*-.*-linux-gnueabi DEFAULT GLIBC_2.4 +arm.*-.*-linux-gnueabi.* DEFAULT GLIBC_2.4 diff --git a/packages/glibc-ports/2.13/090-Fix-ARM-build-with-GCC-trunk.patch b/packages/glibc-ports/2.13/090-Fix-ARM-build-with-GCC-trunk.patch index 1a632fe..259b285 100644 --- a/packages/glibc-ports/2.13/090-Fix-ARM-build-with-GCC-trunk.patch +++ b/packages/glibc-ports/2.13/090-Fix-ARM-build-with-GCC-trunk.patch @@ -20,8 +20,8 @@ Tested that this fixes the build for ARM. sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c ++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c @@ -23,7 +23,8 @@ #include @@ -35,8 +35,8 @@ Tested that this fixes the build for ARM. static _Unwind_Reason_Code (*libgcc_s_forcedunwind) diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c index bff3e2b..1f1eb71 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c +--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c ++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c @@ -21,7 +21,8 @@ #include #include @@ -47,8 +47,8 @@ index bff3e2b..1f1eb71 100644 static _Unwind_Reason_Code (*libgcc_s_personality) (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, struct _Unwind_Context *); ---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c +--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c ++++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c @@ -23,7 +23,8 @@ #include @@ -59,8 +59,8 @@ index bff3e2b..1f1eb71 100644 static _Unwind_Reason_Code (*libgcc_s_personality) (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); static _Unwind_Reason_Code (*libgcc_s_forcedunwind) ---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c +--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c ++++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c @@ -21,7 +21,8 @@ #include #include diff --git a/packages/glibc-ports/2.13/100-respect-env-CPPFLAGS.patch b/packages/glibc-ports/2.13/100-respect-env-CPPFLAGS.patch deleted file mode 100644 index 3798cb2..0000000 --- a/packages/glibc-ports/2.13/100-respect-env-CPPFLAGS.patch +++ /dev/null @@ -1,14 +0,0 @@ -Respect environment CPPFLAGS when we run ./configure so we can inject -random -D things without having to set CFLAGS/ASFLAGS - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 -+++ glibc-2.13/Makeconfig 2009-11-13 00:49:41.000000000 +0100 -@@ -697,6 +697,7 @@ - $(foreach lib,$(libof-$(basename $(@F))) \ - $(libof-$(field.le_next)) - -+#define LIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = LIST_FIRST((head)); \ -+ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - /* - * List access methods. - */ -@@ -197,6 +202,16 @@ - #define SLIST_FOREACH(var, head, field) \ - for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) - -+#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = SLIST_FIRST((head)); \ -+ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ -+#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ -+ for ((varp) = &SLIST_FIRST((head)); \ -+ ((var) = *(varp)) != NULL; \ -+ (varp) = &SLIST_NEXT((var), field)) -+ - /* - * Singly-linked List access methods. - */ -@@ -242,6 +257,12 @@ - (head)->stqh_last = &(elm)->field.stqe_next; \ - } while (/*CONSTCOND*/0) - -+#define STAILQ_LAST(head, type, field) \ -+ (STAILQ_EMPTY((head)) ? \ -+ NULL : \ -+ ((struct type *)(void *) \ -+ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) -+ - #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ - (head)->stqh_last = &(elm)->field.stqe_next; \ -@@ -271,6 +292,11 @@ - (var); \ - (var) = ((var)->field.stqe_next)) - -+#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = STAILQ_FIRST((head)); \ -+ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define STAILQ_CONCAT(head1, head2) do { \ - if (!STAILQ_EMPTY((head2))) { \ - *(head1)->stqh_last = (head2)->stqh_first; \ -@@ -437,11 +463,21 @@ - (var); \ - (var) = ((var)->field.tqe_next)) - -+#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = TAILQ_FIRST((head)); \ -+ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ - for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ - (var); \ - (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) - -+#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ -+ for ((var) = TAILQ_LAST((head), headname); \ -+ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_CONCAT(head1, head2, field) do { \ - if (!TAILQ_EMPTY(head2)) { \ - *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/packages/glibc-ports/2.13/160-manual-no-perl.patch b/packages/glibc-ports/2.13/160-manual-no-perl.patch deleted file mode 100644 index 5e2b807..0000000 --- a/packages/glibc-ports/2.13/160-manual-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.13.orig/manual/Makefile glibc-2.13/manual/Makefile ---- glibc-2.13.orig/manual/Makefile 2006-01-08 07:43:47.000000000 +0100 -+++ glibc-2.13/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/packages/glibc-ports/2.13/170-localedef-fix-trampoline.patch b/packages/glibc-ports/2.13/170-localedef-fix-trampoline.patch deleted file mode 100644 index 3cc6559..0000000 --- a/packages/glibc-ports/2.13/170-localedef-fix-trampoline.patch +++ /dev/null @@ -1,53 +0,0 @@ -# DP: Description: Fix localedef segfault when run under exec-shield, -# PaX or similar. (#231438, #198099) -# DP: Dpatch Author: James Troup -# DP: Patch Author: (probably) Jakub Jelinek -# DP: Upstream status: Unknown -# DP: Status Details: Unknown -# DP: Date: 2004-03-16 -diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h ---- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 -+++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 -@@ -203,6 +203,42 @@ - } - } - } -+ -+/* GCC ATM seems to do a poor job with pointers to nested functions passed -+ to inlined functions. Help it a little bit with this hack. */ -+#define wchead_table_iterate(tp, fn) \ -+do \ -+ { \ -+ struct wchead_table *t = (tp); \ -+ uint32_t index1; \ -+ for (index1 = 0; index1 < t->level1_size; index1++) \ -+ { \ -+ uint32_t lookup1 = t->level1[index1]; \ -+ if (lookup1 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup1_shifted = lookup1 << t->q; \ -+ uint32_t index2; \ -+ for (index2 = 0; index2 < (1 << t->q); index2++) \ -+ { \ -+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ -+ if (lookup2 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup2_shifted = lookup2 << t->p; \ -+ uint32_t index3; \ -+ for (index3 = 0; index3 < (1 << t->p); index3++) \ -+ { \ -+ struct element_t *lookup3 \ -+ = t->level3[index3 + lookup2_shifted]; \ -+ if (lookup3 != NULL) \ -+ fn ((((index1 << t->q) + index2) << t->p) + index3, \ -+ lookup3); \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } while (0) -+ - #endif - - #ifndef NO_FINALIZE diff --git a/packages/glibc-ports/2.13/180-resolv-dynamic.patch b/packages/glibc-ports/2.13/180-resolv-dynamic.patch deleted file mode 100644 index e916bce..0000000 --- a/packages/glibc-ports/2.13/180-resolv-dynamic.patch +++ /dev/null @@ -1,39 +0,0 @@ -ripped from SuSE - -if /etc/resolv.conf is updated, then make sure applications -already running get the updated information. - -http://bugs.gentoo.org/177416 - -diff -durN glibc-2.13.orig/resolv/res_libc.c glibc-2.13/resolv/res_libc.c ---- glibc-2.13.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 -+++ glibc-2.13/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - - /* The following bit is copied from res_data.c (where it is #ifdef'ed -@@ -95,6 +96,20 @@ - __res_maybe_init (res_state resp, int preinit) - { - if (resp->options & RES_INIT) { -+ static time_t last_mtime, last_check; -+ time_t now; -+ struct stat statbuf; -+ -+ time (&now); -+ if (now != last_check) { -+ last_check = now; -+ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { -+ last_mtime = statbuf.st_mtime; -+ atomicinclock (lock); -+ atomicinc (__res_initstamp); -+ atomicincunlock (lock); -+ } -+ } - if (__res_initstamp != resp->_u._ext.initstamp) { - if (resp->nscount > 0) - __res_iclose (resp, true); diff --git a/packages/glibc-ports/2.13/190-localedef-mmap.patch b/packages/glibc-ports/2.13/190-localedef-mmap.patch deleted file mode 100644 index f3914cd..0000000 --- a/packages/glibc-ports/2.13/190-localedef-mmap.patch +++ /dev/null @@ -1,39 +0,0 @@ -sniped from Debian -http://bugs.gentoo.org/289615 - -2009-10-27 Aurelien Jarno - - * locale/programs/locarchive.c: use MMAP_SHARED to reserve memory - used later with MMAP_FIXED | MMAP_SHARED to cope with different - alignment restrictions. - -diff -durN glibc-2.13.orig/locale/programs/locarchive.c glibc-2.13/locale/programs/locarchive.c ---- glibc-2.13.orig/locale/programs/locarchive.c 2009-04-27 16:07:47.000000000 +0200 -+++ glibc-2.13/locale/programs/locarchive.c 2009-11-13 00:50:01.000000000 +0100 -@@ -134,7 +134,7 @@ - size_t reserved = RESERVE_MMAP_SIZE; - int xflags = 0; - if (total < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else -@@ -396,7 +396,7 @@ - size_t reserved = RESERVE_MMAP_SIZE; - int xflags = 0; - if (total < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else -@@ -614,7 +614,7 @@ - int xflags = 0; - void *p; - if (st.st_size < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else diff --git a/packages/glibc-ports/2.13/200-fadvise64_64.patch b/packages/glibc-ports/2.13/200-fadvise64_64.patch deleted file mode 100644 index 71bca38..0000000 --- a/packages/glibc-ports/2.13/200-fadvise64_64.patch +++ /dev/null @@ -1,28 +0,0 @@ -ripped from Debian - - sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 -@@ -35,6 +35,19 @@ - return INTERNAL_SYSCALL_ERRNO (ret, err); - return 0; - #else -+# ifdef __NR_fadvise64_64 -+ INTERNAL_SYSCALL_DECL (err); -+ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, -+ __LONG_LONG_PAIR ((long) (offset >> 31), -+ (long) offset), -+ __LONG_LONG_PAIR ((long) (len >> 31), -+ (long) len), -+ advise); -+ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) -+ return INTERNAL_SYSCALL_ERRNO (ret, err); -+ return 0; -+# else - return ENOSYS; -+# endif - #endif - } diff --git a/packages/glibc-ports/2.13/220-section-comments.patch b/packages/glibc-ports/2.13/220-section-comments.patch deleted file mode 100644 index d717829..0000000 --- a/packages/glibc-ports/2.13/220-section-comments.patch +++ /dev/null @@ -1,24 +0,0 @@ -http://sources.redhat.com/ml/binutils/2004-04/msg00665.html - -fixes building on some architectures (like m68k/arm/cris/etc...) because -it does the right thing - -diff -durN glibc-2.13.orig/include/libc-symbols.h glibc-2.13/include/libc-symbols.h ---- glibc-2.13.orig/include/libc-symbols.h 2009-03-14 00:51:46.000000000 +0100 -+++ glibc-2.13/include/libc-symbols.h 2009-11-13 00:50:07.000000000 +0100 -@@ -239,12 +239,12 @@ - # define __make_section_unallocated(section_string) - # endif - --/* Tacking on "\n\t#" to the section name makes gcc put it's bogus -+/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus - section attributes on what looks like a comment to the assembler. */ - # ifdef HAVE_SECTION_QUOTES --# define __sec_comment "\"\n\t#\"" -+# define __sec_comment "\"\n#APP\n\t#\"" - # else --# define __sec_comment "\n\t#" -+# define __sec_comment "\n#APP\n\t#" - # endif - # define link_warning(symbol, msg) \ - __make_section_unallocated (".gnu.warning." #symbol) \ diff --git a/packages/glibc-ports/2.13/230-no-inline-gmon.patch b/packages/glibc-ports/2.13/230-no-inline-gmon.patch deleted file mode 100644 index fa33c2b..0000000 --- a/packages/glibc-ports/2.13/230-no-inline-gmon.patch +++ /dev/null @@ -1,36 +0,0 @@ -http://bugs.gentoo.org/196245 -http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html - -Attached is a patch to add __attribute__ ((noinline)) to -call_gmon_start. - -Without this patch, the sec script that processed initfini.s removes a -part of inlined call_gmon_start, causing undefined label errors. - -This patch solves the problem by forcing gcc not to inline -call_gmon_start with __attribute__ ((noinline)). - -Tested by building for arm-none-lixux-gnueabi. OK to apply? - -Kazu Hirata - -2006-05-07 Kazu Hirata <kazu@codesourcery.com> - - * sysdeps/generic/initfini.c (call_gmon_start): Add - __attribute__ ((noinline)). - -Index: sysdeps/generic/initfini.c -=================================================================== - -diff -durN glibc-2.13.orig/sysdeps/generic/initfini.c glibc-2.13/sysdeps/generic/initfini.c ---- glibc-2.13.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200 -+++ glibc-2.13/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100 -@@ -70,7 +70,7 @@ - /* The beginning of _init: */ - asm ("\n/*@_init_PROLOG_BEGINS*/"); - --static void -+static void __attribute__ ((noinline)) - call_gmon_start(void) - { - extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ diff --git a/packages/glibc-ports/2.13/240-check_native-headers.patch b/packages/glibc-ports/2.13/240-check_native-headers.patch deleted file mode 100644 index c936f71..0000000 --- a/packages/glibc-ports/2.13/240-check_native-headers.patch +++ /dev/null @@ -1,17 +0,0 @@ -many ports hit this warning: -../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' -../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' - -snipped from suse - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/check_native.c glibc-2.13/sysdeps/unix/sysv/linux/check_native.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/check_native.c 2007-11-24 04:12:17.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/check_native.c 2009-11-13 00:50:11.000000000 +0100 -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/packages/glibc-ports/2.13/250-fix-pr631.patch b/packages/glibc-ports/2.13/250-fix-pr631.patch deleted file mode 100644 index a48912e..0000000 --- a/packages/glibc-ports/2.13/250-fix-pr631.patch +++ /dev/null @@ -1,45 +0,0 @@ -From dank@kegel.com -Wed Jun 15 09:12:43 PDT 2005 - -Fixes - -build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r' -build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent' -... 53 lines deleted ... -build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r' -collect2: ld returned 1 exit status -make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1 - -when building glibc with --enable-static-nss. - -See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631 - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-11-13 00:49:41.000000000 +0100 -+++ glibc-2.13/Makeconfig 2009-11-13 00:50:13.000000000 +0100 -@@ -531,7 +531,7 @@ - - # The static libraries. - ifeq (yes,$(build-static)) --link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a -+link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a - else - ifeq (yes,$(build-shared)) - # We can try to link the programs with lib*_pic.a... -diff -durN glibc-2.13.orig/elf/Makefile glibc-2.13/elf/Makefile ---- glibc-2.13.orig/elf/Makefile 2009-01-31 01:20:55.000000000 +0100 -+++ glibc-2.13/elf/Makefile 2009-11-13 00:50:13.000000000 +0100 -@@ -146,6 +146,13 @@ - install-bin-script = ldd - endif - -+ifeq (yes,$(build-static-nss)) -+nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss) -+resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv) -+otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ -+ $(resolvobjdir)/libresolv.a -+endif -+ - others = sprof sln - install-bin = sprof - others-static = sln diff --git a/packages/glibc-ports/2.13/260-assume-pipe2.patch b/packages/glibc-ports/2.13/260-assume-pipe2.patch deleted file mode 100644 index 42e8f4e..0000000 --- a/packages/glibc-ports/2.13/260-assume-pipe2.patch +++ /dev/null @@ -1,40 +0,0 @@ -http://bugs.gentoo.org/250342 -http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 - -we cant assume sock_cloexec and pipe2 are bound together as the former defines -are found in glibc only while the latter are a combo of kernel headers and -glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub -inside of glibc, we hit a problem. for example: - -#include -#include -main() -{ - getgrnam("portage"); - if (!popen("ls", "r")) - perror("popen()"); -} - -getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both -__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against -older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS -stub for it. so popen() will always fail as glibc assumes pipe2() works. - -diff -durN glibc-2.13.orig/socket/have_sock_cloexec.c glibc-2.13/socket/have_sock_cloexec.c ---- glibc-2.13.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 -+++ glibc-2.13/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 -@@ -16,9 +16,14 @@ - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -+#include - #include - #include - - #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC - int __have_sock_cloexec; - #endif -+ -+#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 -+int __have_pipe2; -+#endif diff --git a/packages/glibc-ports/2.13/270-china.patch b/packages/glibc-ports/2.13/270-china.patch deleted file mode 100644 index 41d7759..0000000 --- a/packages/glibc-ports/2.13/270-china.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.13.orig/localedata/locales/zh_TW glibc-2.13/localedata/locales/zh_TW ---- glibc-2.13.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 -+++ glibc-2.13/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 -@@ -1,7 +1,7 @@ - comment_char % - escape_char / - % --% Chinese language locale for Taiwan R.O.C. -+% Chinese language locale for Taiwan - % charmap: BIG5-CP950 - % - % Original Author: -@@ -17,7 +17,7 @@ - % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf - - LC_IDENTIFICATION --title "Chinese locale for Taiwan R.O.C." -+title "Chinese locale for Taiwan" - source "" - address "" - contact "" -@@ -25,7 +25,7 @@ - tel "" - fax "" - language "Chinese" --territory "Taiwan R.O.C." -+territory "Taiwan" - revision "0.2" - date "2000-08-02" - % diff --git a/packages/glibc-ports/2.13/280-new-valencian-locale.patch b/packages/glibc-ports/2.13/280-new-valencian-locale.patch deleted file mode 100644 index 4cdd108..0000000 --- a/packages/glibc-ports/2.13/280-new-valencian-locale.patch +++ /dev/null @@ -1,115 +0,0 @@ -http://bugs.gentoo.org/show_bug.cgi?id=131815 -http://sourceware.org/bugzilla/show_bug.cgi?id=2522 - -diff -durN glibc-2.13.orig/localedata/SUPPORTED glibc-2.13/localedata/SUPPORTED ---- glibc-2.13.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 -+++ glibc-2.13/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 -@@ -72,6 +72,8 @@ - ca_ES.UTF-8/UTF-8 \ - ca_ES/ISO-8859-1 \ - ca_ES@euro/ISO-8859-15 \ -+ca_ES.UTF-8@valencia/UTF-8 \ -+ca_ES@valencia/ISO-8859-15 \ - ca_FR.UTF-8/UTF-8 \ - ca_FR/ISO-8859-15 \ - ca_IT.UTF-8/UTF-8 \ -diff -durN glibc-2.13.orig/localedata/locales/ca_ES@valencia glibc-2.13/localedata/locales/ca_ES@valencia ---- glibc-2.13.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.13/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 -@@ -0,0 +1,96 @@ -+comment_char % -+escape_char / -+% -+% Valencian (southern Catalan) locale for Spain with Euro -+% -+% Note that this locale is almost the same as ca_ES@euro. The point of having -+% a separate locale is only for PO translations, which have a lot of social -+% support and are very appreciated by the Valencian-speaking community. -+% -+% Contact: Jordi Mallach -+% Email: jordi@gnu.org -+% Tel: -+% Fax: -+% Language: ca -+% Territory: ES -+% Option: euro -+% Revision: 1.0 -+% Date: 2006-04-06 -+% Application: general -+% Users: general -+% Repertoiremap: mnemonic,ds -+% Charset: ISO-8859-15 -+% Distribution and use is free, also -+% for commercial purposes. -+ -+LC_IDENTIFICATION -+title "Valencian (southern Catalan) locale for Spain with Euro" -+source "" -+address "" -+contact "Jordi Mallach" -+email "jordi@gnu.org" -+tel "" -+fax "" -+language "Catalan" -+territory "Spain" -+revision "1.0" -+date "2006-04-06" -+% -+category "ca_ES@valencia:2006";LC_IDENTIFICATION -+category "ca_ES@valencia:2006";LC_CTYPE -+category "ca_ES@valencia:2006";LC_COLLATE -+category "ca_ES@valencia:2006";LC_MONETARY -+category "ca_ES@valencia:2006";LC_NUMERIC -+category "ca_ES@valencia:2006";LC_TIME -+category "ca_ES@valencia:2006";LC_MESSAGES -+category "ca_ES@valencia:2006";LC_PAPER -+category "ca_ES@valencia:2006";LC_NAME -+category "ca_ES@valencia:2006";LC_ADDRESS -+category "ca_ES@valencia:2006";LC_TELEPHONE -+category "ca_ES@valencia:2006";LC_MEASUREMENT -+ -+END LC_IDENTIFICATION -+ -+LC_CTYPE -+copy "i18n" -+END LC_CTYPE -+ -+LC_COLLATE -+copy "ca_ES" -+END LC_COLLATE -+ -+LC_MONETARY -+copy "ca_ES" -+END LC_MONETARY -+ -+LC_NUMERIC -+copy "ca_ES" -+END LC_NUMERIC -+ -+LC_TIME -+copy "ca_ES" -+END LC_TIME -+ -+LC_MESSAGES -+copy "ca_ES" -+END LC_MESSAGES -+ -+LC_PAPER -+copy "ca_ES" -+END LC_PAPER -+ -+LC_NAME -+copy "ca_ES" -+END LC_NAME -+ -+LC_ADDRESS -+copy "ca_ES" -+END LC_ADDRESS -+ -+LC_TELEPHONE -+copy "ca_ES" -+END LC_TELEPHONE -+ -+LC_MEASUREMENT -+copy "ca_ES" -+END LC_MEASUREMENT diff --git a/packages/glibc-ports/2.13/300-nscd-one-fork.patch b/packages/glibc-ports/2.13/300-nscd-one-fork.patch deleted file mode 100644 index adc9b3f..0000000 --- a/packages/glibc-ports/2.13/300-nscd-one-fork.patch +++ /dev/null @@ -1,40 +0,0 @@ -only fork one to assist in stop-start-daemon assumptions about daemon behavior - -http://bugs.gentoo.org/190785 - -diff -durN glibc-2.13.orig/nscd/nscd.c glibc-2.13/nscd/nscd.c ---- glibc-2.13.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 -+++ glibc-2.13/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 -@@ -182,6 +182,9 @@ - if (pid != 0) - exit (0); - -+ if (write_pid (_PATH_NSCDPID) < 0) -+ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -+ - int nullfd = open (_PATH_DEVNULL, O_RDWR); - if (nullfd != -1) - { -@@ -231,12 +234,6 @@ - for (i = min_close_fd; i < getdtablesize (); i++) - close (i); - -- pid = fork (); -- if (pid == -1) -- error (EXIT_FAILURE, errno, _("cannot fork")); -- if (pid != 0) -- exit (0); -- - setsid (); - - if (chdir ("/") != 0) -@@ -245,9 +242,6 @@ - - openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); - -- if (write_pid (_PATH_NSCDPID) < 0) -- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -- - if (!init_logfile ()) - dbg_log (_("Could not create log file")); - diff --git a/packages/glibc-ports/2.13/310-hppa-nptl-carlos.patch b/packages/glibc-ports/2.13/310-hppa-nptl-carlos.patch deleted file mode 100644 index 4c028b2..0000000 --- a/packages/glibc-ports/2.13/310-hppa-nptl-carlos.patch +++ /dev/null @@ -1,246 +0,0 @@ - - -diff -durN glibc-2.13.orig/elf/rtld.c glibc-2.13/elf/rtld.c ---- glibc-2.13.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 -+++ glibc-2.13/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 -@@ -392,14 +392,14 @@ - know it is available. We do not have to clear the memory if we - do not have to use the temporary bootstrap_map. Global variables - are initialized to zero by default. */ --#ifndef DONT_USE_BOOTSTRAP_MAP -+#if !defined DONT_USE_BOOTSTRAP_MAP - # ifdef HAVE_BUILTIN_MEMSET - __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); - # else -- for (size_t cnt = 0; -- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); -- ++cnt) -- bootstrap_map.l_info[cnt] = 0; -+ /* Clear the whole bootstrap_map structure */ -+ for (char *cnt = (char *)&(bootstrap_map); -+ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); -+ *cnt++ = '\0'); - # endif - # if USE___THREAD - bootstrap_map.l_tls_modid = 0; -diff -durN glibc-2.13.orig/include/atomic.h glibc-2.13/include/atomic.h ---- glibc-2.13.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 -+++ glibc-2.13/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 -@@ -185,7 +185,7 @@ - __typeof (*(mem)) __atg5_value = (newvalue); \ - \ - do \ -- __atg5_oldval = *__atg5_memp; \ -+ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ - __atg5_oldval), 0)); \ -@@ -206,7 +206,7 @@ - __typeof (*(mem)) __atg6_value = (value); \ - \ - do \ -- __atg6_oldval = *__atg6_memp; \ -+ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ - __atg6_oldval \ -@@ -224,7 +224,7 @@ - __typeof (*(mem)) __atg7_value = (value); \ - \ - do \ -- __atg7_oldv = *__atg7_memp; \ -+ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ - __atg7_oldv \ -@@ -242,7 +242,7 @@ - __typeof (mem) __atg8_memp = (mem); \ - __typeof (*(mem)) __atg8_value = (value); \ - do { \ -- __atg8_oldval = *__atg8_memp; \ -+ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ - if (__atg8_oldval >= __atg8_value) \ - break; \ - } while (__builtin_expect \ -@@ -259,7 +259,7 @@ - __typeof (mem) __atg9_memp = (mem); \ - __typeof (*(mem)) __atg9_value = (value); \ - do { \ -- __atg9_oldv = *__atg9_memp; \ -+ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ - if (__atg9_oldv >= __atg9_value) \ - break; \ - } while (__builtin_expect \ -@@ -277,7 +277,7 @@ - __typeof (mem) __atg10_memp = (mem); \ - __typeof (*(mem)) __atg10_value = (value); \ - do { \ -- __atg10_oldval = *__atg10_memp; \ -+ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ - if (__atg10_oldval <= __atg10_value) \ - break; \ - } while (__builtin_expect \ -@@ -361,7 +361,7 @@ - \ - do \ - { \ -- __atg11_oldval = *__atg11_memp; \ -+ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ - if (__builtin_expect (__atg11_oldval <= 0, 0)) \ - break; \ - } \ -@@ -400,7 +400,7 @@ - __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ - \ - do \ -- __atg14_old = (*__atg14_memp); \ -+ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ - __atg14_old | __atg14_mask,\ -@@ -418,7 +418,7 @@ - __typeof (*(mem)) __atg15_mask = (mask); \ - \ - do \ -- __atg15_old = (*__atg15_memp); \ -+ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ - __atg15_old & __atg15_mask, \ -@@ -450,7 +450,7 @@ - __typeof (*(mem)) __atg16_mask = (mask); \ - \ - do \ -- __atg16_old = (*__atg16_memp); \ -+ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ - __atg16_old & __atg16_mask,\ -@@ -468,7 +468,7 @@ - __typeof (*(mem)) __atg17_mask = (mask); \ - \ - do \ -- __atg17_old = (*__atg17_memp); \ -+ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ - __atg17_old | __atg17_mask, \ -@@ -484,7 +484,7 @@ - __typeof (*(mem)) __atg18_mask = (mask); \ - \ - do \ -- __atg18_old = (*__atg18_memp); \ -+ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ - __atg18_old | __atg18_mask,\ -@@ -500,7 +500,7 @@ - __typeof (*(mem)) __atg19_mask = (mask); \ - \ - do \ -- __atg19_old = (*__atg19_memp); \ -+ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ - __atg19_old | __atg19_mask,\ -diff -durN glibc-2.13.orig/nptl/Makefile glibc-2.13/nptl/Makefile ---- glibc-2.13.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 -+++ glibc-2.13/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -265,9 +265,9 @@ - # Files which must not be linked with libpthread. - tests-nolibpthread = tst-unload - --# This sets the stack resource limit to 1023kb, which is not a multiple --# of the page size since every architecture's page size is > 1k. --tst-oddstacklimit-ENV = ; ulimit -s 1023; -+# This sets the stack resource limit to 8193kb, which is not a multiple -+# of the page size since every architecture's page size is 4096 bytes. -+tst-oddstacklimit-ENV = ; ulimit -s 8193; - - distribute = eintr.c tst-cleanup4aux.c - -@@ -426,6 +426,35 @@ - CFLAGS-tst-cleanupx4.c += -fexceptions - CFLAGS-tst-oncex3.c += -fexceptions - CFLAGS-tst-oncex4.c += -fexceptions -+ -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed -+LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) -+ - CFLAGS-tst-align.c += $(stack-align-test-flags) - CFLAGS-tst-align3.c += $(stack-align-test-flags) - CFLAGS-tst-initializers1.c = -W -Wall -Werror -diff -durN glibc-2.13.orig/nptl/pthread_barrier_wait.c glibc-2.13/nptl/pthread_barrier_wait.c ---- glibc-2.13.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 -+++ glibc-2.13/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 -@@ -64,7 +64,7 @@ - do - lll_futex_wait (&ibarrier->curr_event, event, - ibarrier->private ^ FUTEX_PRIVATE_FLAG); -- while (event == ibarrier->curr_event); -+ while (event == *(volatile unsigned int *)&ibarrier->curr_event); - } - - /* Make sure the init_count is stored locally or in a register. */ -diff -durN glibc-2.13.orig/nptl/sysdeps/pthread/Makefile glibc-2.13/nptl/sysdeps/pthread/Makefile ---- glibc-2.13.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 -+++ glibc-2.13/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -33,7 +33,9 @@ - - ifeq ($(have-forced-unwind),yes) - tests += tst-mqueue8x -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed - CFLAGS-tst-mqueue8x.c += -fexceptions -+LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) - endif - endif - -diff -durN glibc-2.13.orig/stdio-common/Makefile glibc-2.13/stdio-common/Makefile ---- glibc-2.13.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 -+++ glibc-2.13/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -82,7 +82,7 @@ - $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' - endif - --CFLAGS-vfprintf.c = -Wno-uninitialized -+CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch - CFLAGS-vfwprintf.c = -Wno-uninitialized - CFLAGS-tst-printf.c = -Wno-format - CFLAGS-tstdiomisc.c = -Wno-format -diff -durN glibc-2.13.orig/sunrpc/clnt_udp.c glibc-2.13/sunrpc/clnt_udp.c ---- glibc-2.13.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 -+++ glibc-2.13/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 -@@ -456,7 +456,7 @@ - while (inlen < 0 && errno == EINTR); - if (inlen < 0) - { -- if (errno == EWOULDBLOCK) -+ if (errno == EWOULDBLOCK || errno == EAGAIN) - continue; - cu->cu_error.re_errno = errno; - return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/packages/glibc-ports/2.13/330-m68k-sys-user.patch b/packages/glibc-ports/2.13/330-m68k-sys-user.patch index 191e0c6..a2b4528 100644 --- a/packages/glibc-ports/2.13/330-m68k-sys-user.patch +++ b/packages/glibc-ports/2.13/330-m68k-sys-user.patch @@ -1,8 +1,8 @@ copied from kernel as it is sanitized now -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/user.h ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 +diff -durN glibc-ports-2.13.orig/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/user.h +--- glibc-ports-2.13.orig/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 @@ -1,3 +1,90 @@ +#ifndef _SYS_USER_H +#define _SYS_USER_H @@ -94,4 +94,3 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/m68k/sys/use /* Copyright (C) 2008, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. -diff -durN glibc-2.13.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.13/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h diff --git a/packages/glibc-ports/2.13/340-dl_execstack-PaX-support.patch b/packages/glibc-ports/2.13/340-dl_execstack-PaX-support.patch deleted file mode 100644 index 2402af0..0000000 --- a/packages/glibc-ports/2.13/340-dl_execstack-PaX-support.patch +++ /dev/null @@ -1,66 +0,0 @@ - With latest versions of glibc, a lot of apps failed on a PaX enabled - system with: - cannot enable executable stack as shared object requires: Permission denied - - This is due to PaX 'exec-protecting' the stack, and ld.so then trying - to make the stack executable due to some libraries not containing the - PT_GNU_STACK section. Bug #32960. (12 Nov 2003). - - Patch also NPTL. Bug #116086. (20 Dec 2005). - -diff -durN glibc-2.13.orig/nptl/allocatestack.c glibc-2.13/nptl/allocatestack.c ---- glibc-2.13.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 -+++ glibc-2.13/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -329,7 +329,8 @@ - # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" - #endif - if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) -- return errno; -+ if (errno != EACCES) /* PAX is enabled */ -+ return errno; - - return 0; - } -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -63,7 +63,10 @@ - else - # endif - { -- result = errno; -+ if (errno == EACCES) /* PAX is enabled */ -+ result = 0; -+ else -+ result = errno; - goto out; - } - } -@@ -89,7 +92,12 @@ - page -= size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; -@@ -115,7 +123,12 @@ - page += size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; diff --git a/packages/glibc-ports/2.13/350-pre20040117-pt_pax.patch b/packages/glibc-ports/2.13/350-pre20040117-pt_pax.patch deleted file mode 100644 index f8f6b83..0000000 --- a/packages/glibc-ports/2.13/350-pre20040117-pt_pax.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.13.orig/elf/elf.h glibc-2.13/elf/elf.h ---- glibc-2.13.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 -+++ glibc-2.13/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 -@@ -580,6 +580,7 @@ - #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ - #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ - #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ -+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ - #define PT_LOSUNW 0x6ffffffa - #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ - #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ -@@ -593,6 +594,18 @@ - #define PF_X (1 << 0) /* Segment is executable */ - #define PF_W (1 << 1) /* Segment is writable */ - #define PF_R (1 << 2) /* Segment is readable */ -+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ -+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ -+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ -+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ -+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ -+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ -+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ -+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ -+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ -+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ -+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ -+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ - #define PF_MASKOS 0x0ff00000 /* OS-specific */ - #define PF_MASKPROC 0xf0000000 /* Processor-specific */ - diff --git a/packages/glibc-ports/2.13/360-tests-sandbox-libdl-paths.patch b/packages/glibc-ports/2.13/360-tests-sandbox-libdl-paths.patch deleted file mode 100644 index 9f78c52..0000000 --- a/packages/glibc-ports/2.13/360-tests-sandbox-libdl-paths.patch +++ /dev/null @@ -1,193 +0,0 @@ -when glibc runs its tests, it does so by invoking the local library loader. -in Gentoo, we build/run inside of our "sandbox" which itself is linked against -libdl (so that it can load libraries and pull out symbols). the trouble -is that when you upgrade from an older glibc to the new one, often times -internal symbols change name or abi. this is normally OK as you cannot use -libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so -we always say "keep all of the glibc libraries from the same build". but -when glibc runs its tests, it uses dynamic paths to point to its new local -copies of libraries. if the test doesnt use libdl, then glibc doesnt add -its path, and when sandbox triggers the loading of libdl, glibc does so -from the host system system. this gets us into the case of all libraries -are from the locally compiled version of glibc except for libdl.so. - -Fix by Wormo - -http://bugs.gentoo.org/56898 - -diff -durN glibc-2.13.orig/grp/tst_fgetgrent.sh glibc-2.13/grp/tst_fgetgrent.sh ---- glibc-2.13.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 -+++ glibc-2.13/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,7 +24,8 @@ - rtld_installed_name=$1; shift - - testout=${common_objpfx}/grp/tst_fgetgrent.out --library_path=${common_objpfx} -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn - - result=0 - -diff -durN glibc-2.13.orig/iconvdata/run-iconv-test.sh glibc-2.13/iconvdata/run-iconv-test.sh ---- glibc-2.13.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 -+++ glibc-2.13/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -34,7 +34,7 @@ - export GCONV_PATH - - # We have to have some directories in the library path. --LIBPATH=$codir:$codir/iconvdata -+LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn - - # How the start the iconv(1) program. - ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ -diff -durN glibc-2.13.orig/iconvdata/tst-table.sh glibc-2.13/iconvdata/tst-table.sh ---- glibc-2.13.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 -+++ glibc-2.13/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -59,8 +59,11 @@ - irreversible=${charset}.irreversible - fi - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # iconv in one direction. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-table-from ${charset} \ - > ${objpfx}tst-${charset}.table - -diff -durN glibc-2.13.orig/intl/tst-codeset.sh glibc-2.13/intl/tst-codeset.sh ---- glibc-2.13.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 -+++ glibc-2.13/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -37,6 +37,9 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - ${common_objpfx}elf/ld.so --library-path $common_objpfx \ - ${objpfx}tst-codeset > ${objpfx}tst-codeset.out - -diff -durN glibc-2.13.orig/intl/tst-gettext.sh glibc-2.13/intl/tst-gettext.sh ---- glibc-2.13.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 -+++ glibc-2.13/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -51,9 +51,12 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. - MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.13.orig/intl/tst-gettext2.sh glibc-2.13/intl/tst-gettext2.sh ---- glibc-2.13.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 -+++ glibc-2.13/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -65,8 +65,11 @@ - LOCPATH=${objpfx}domaindir - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && - cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.13.orig/malloc/tst-mtrace.sh glibc-2.13/malloc/tst-mtrace.sh ---- glibc-2.13.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 -+++ glibc-2.13/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,9 +24,12 @@ - status=0 - trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ - LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${common_objpfx}malloc/tst-mtrace || status=1 - - if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then -diff -durN glibc-2.13.orig/nptl/tst-tls6.sh glibc-2.13/nptl/tst-tls6.sh ---- glibc-2.13.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 -+++ glibc-2.13/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -5,8 +5,8 @@ - rtld_installed_name=$1; shift - logfile=$common_objpfx/nptl/tst-tls6.out - --# We have to find libc and nptl --library_path=${common_objpfx}:${common_objpfx}nptl -+# We have to find libc and nptl (also libdl in case sandbox is in use) -+library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn - tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}/nptl/tst-tls5" - -diff -durN glibc-2.13.orig/posix/globtest.sh glibc-2.13/posix/globtest.sh ---- glibc-2.13.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 -+++ glibc-2.13/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -18,7 +18,7 @@ - esac - - # We have to find the libc and the NSS modules. --library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod -+library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn - - # Since we use `sort' we must make sure to use the same locale everywhere. - LC_ALL=C -diff -durN glibc-2.13.orig/posix/tst-getconf.sh glibc-2.13/posix/tst-getconf.sh ---- glibc-2.13.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 -+++ glibc-2.13/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -10,7 +10,10 @@ - else - rtld_installed_name=$1; shift - runit() { -- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" -+ -+ # make sure libdl is also in path in case sandbox is in use -+ library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" - } - fi - -diff -durN glibc-2.13.orig/posix/wordexp-tst.sh glibc-2.13/posix/wordexp-tst.sh ---- glibc-2.13.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 -+++ glibc-2.13/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -19,8 +19,11 @@ - " - export IFS - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - failed=0 --${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ -+${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 - cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 - wordexp returned 0 diff --git a/packages/glibc-ports/2.13/380-dont-build-timezone.patch b/packages/glibc-ports/2.13/380-dont-build-timezone.patch deleted file mode 100644 index 11c358e..0000000 --- a/packages/glibc-ports/2.13/380-dont-build-timezone.patch +++ /dev/null @@ -1,14 +0,0 @@ -timezone data has been split into the package sys-libs/timezone-data - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 -+++ glibc-2.13/Makeconfig 2009-11-13 00:50:41.000000000 +0100 -@@ -944,7 +944,7 @@ - stdlib stdio-common libio malloc string wcsmbs time dirent \ - grp pwd posix io termios resource misc socket sysvipc gmon \ - gnulib iconv iconvdata wctype manual shadow gshadow po argp \ -- crypt nss localedata timezone rt conform debug \ -+ crypt nss localedata rt conform debug \ - $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) - - ifndef avoid-generated diff --git a/packages/glibc-ports/2.13/400-alpha-xstat.patch b/packages/glibc-ports/2.13/400-alpha-xstat.patch deleted file mode 100644 index 6e4ab8f..0000000 --- a/packages/glibc-ports/2.13/400-alpha-xstat.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -@@ -386,6 +386,11 @@ - # define __ASSUME_GETDENTS32_D_TYPE 1 - #endif - -+/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ -+#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ -+# define __ASSUME_STAT64_SYSCALL 1 -+#endif -+ - /* Starting with version 2.5.3, the initial location returned by `brk' - after exec is always rounded up to the next page. */ - #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/packages/glibc-ports/2.13/410-alpha-SETPIPE-GETPIPE.patch b/packages/glibc-ports/2.13/410-alpha-SETPIPE-GETPIPE.patch index fd55537..580c16d 100644 --- a/packages/glibc-ports/2.13/410-alpha-SETPIPE-GETPIPE.patch +++ b/packages/glibc-ports/2.13/410-alpha-SETPIPE-GETPIPE.patch @@ -3,10 +3,10 @@ * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (F_SETPIPE_SZ, F_GETPIPE_SZ): Define. -diff --git glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +diff --git glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h index 860e9ac..e5e726b 100644 ---- glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h -+++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h +--- glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h ++++ glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/fcntl.h @@ -97,6 +97,8 @@ # define F_SETLEASE 1024 /* Set a lease. */ # define F_GETLEASE 1025 /* Enquire what lease is active. */ diff --git a/packages/glibc-ports/2.13/420-alpha-statfs.patch b/packages/glibc-ports/2.13/420-alpha-statfs.patch index 65c925a..accb5af 100644 --- a/packages/glibc-ports/2.13/420-alpha-statfs.patch +++ b/packages/glibc-ports/2.13/420-alpha-statfs.patch @@ -3,10 +3,10 @@ * sysdeps/unix/sysv/linux/mips/bits/statfs.h (struct statfs, struct statfs64): Add f_flags field. -diff --git glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h +diff --git glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h index d838e6b..157591d 100644 ---- glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h -+++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h +--- glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h ++++ glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/bits/statfs.h @@ -42,7 +42,8 @@ struct statfs __fsid_t f_fsid; int f_namelen; diff --git a/packages/glibc-ports/2.13/430-alpha-creat.patch b/packages/glibc-ports/2.13/430-alpha-creat.patch deleted file mode 100644 index da6ddda..0000000 --- a/packages/glibc-ports/2.13/430-alpha-creat.patch +++ /dev/null @@ -1,14 +0,0 @@ -alpha does not have a __NR_creat - -http://bugs.gentoo.org/227275 -http://sourceware.org/bugzilla/show_bug.cgi?id=6650 - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 -@@ -1 +1,5 @@ - /* Defined as alias for the syscall. */ -+#include -+#ifndef __NR_creat -+#include "../../../../../io/creat64.c" -+#endif diff --git a/packages/glibc-ports/2.13/440-alpha-cache-shape.patch b/packages/glibc-ports/2.13/440-alpha-cache-shape.patch index 62ade7b..602c80d 100644 --- a/packages/glibc-ports/2.13/440-alpha-cache-shape.patch +++ b/packages/glibc-ports/2.13/440-alpha-cache-shape.patch @@ -5,9 +5,9 @@ duplication for static builds with dl-sysdep and dl-support. since dl-sysdep is both shared/static, there is no point in hooking dl-support anymore, so we can punt it. -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/dl-support.c ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 +diff -durN glibc-ports-2.13.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/dl-support.c +--- glibc-ports-2.13.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 @@ -1,2 +1,1 @@ -#include "dl-auxv.h" #include diff --git a/packages/glibc-ports/2.13/450-alpha-DEFAULT_STACK_PERMS.patch b/packages/glibc-ports/2.13/450-alpha-DEFAULT_STACK_PERMS.patch index ac3ea9a..0d85ce5 100644 --- a/packages/glibc-ports/2.13/450-alpha-DEFAULT_STACK_PERMS.patch +++ b/packages/glibc-ports/2.13/450-alpha-DEFAULT_STACK_PERMS.patch @@ -2,10 +2,10 @@ * sysdeps/alpha/stackinfo.h: Define DEFAULT_STACK_PERMS with PF_X. -diff --git glibc-2.13/glibc-ports-2.13/sysdeps/alpha/stackinfo.h glibc-2.13/glibc-ports-2.13/sysdeps/alpha/stackinfo.h +diff --git glibc-ports-2.13/sysdeps/alpha/stackinfo.h glibc-ports-2.13/sysdeps/alpha/stackinfo.h index 0a281bd..d9dbc35 100644 ---- glibc-2.13/glibc-ports-2.13/sysdeps/alpha/stackinfo.h -+++ glibc-2.13/glibc-ports-2.13/sysdeps/alpha/stackinfo.h +--- glibc-ports-2.13/sysdeps/alpha/stackinfo.h ++++ glibc-ports-2.13/sysdeps/alpha/stackinfo.h @@ -22,7 +22,13 @@ #ifndef _STACKINFO_H #define _STACKINFO_H 1 diff --git a/packages/glibc-ports/2.13/460-alpha-fix-gcc-4.1-warnings.patch b/packages/glibc-ports/2.13/460-alpha-fix-gcc-4.1-warnings.patch index 313e0e0..d23ecf9 100644 --- a/packages/glibc-ports/2.13/460-alpha-fix-gcc-4.1-warnings.patch +++ b/packages/glibc-ports/2.13/460-alpha-fix-gcc-4.1-warnings.patch @@ -16,9 +16,9 @@ I cannot really think of anything better than ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm.c ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 +diff -durN glibc-ports-2.13.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm.c +--- glibc-ports-2.13.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 @@ -178,13 +178,13 @@ static inline void stb_mb(unsigned char val, unsigned long addr) @@ -53,4 +53,3 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/alpha/ioperm return r; } -diff -durN glibc-2.13.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.13/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c diff --git a/packages/glibc-ports/2.13/470-alpha-feupdateenv.patch b/packages/glibc-ports/2.13/470-alpha-feupdateenv.patch index 45a7051..ea1e056 100644 --- a/packages/glibc-ports/2.13/470-alpha-feupdateenv.patch +++ b/packages/glibc-ports/2.13/470-alpha-feupdateenv.patch @@ -4,20 +4,20 @@ libm_hidden_def. * sysdeps/alpha/fpu/ftestexcept.c (fetestexcept): Likewise. -diff --git glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c +diff --git glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c index c798070..9abbf11 100644 ---- glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c -+++ glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c +--- glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c ++++ glibc-ports-2.13/sysdeps/alpha/fpu/feupdateenv.c @@ -46,4 +46,5 @@ strong_alias (__feupdateenv, __old_feupdateenv) compat_symbol (libm, __old_feupdateenv, feupdateenv, GLIBC_2_1); #endif +libm_hidden_ver (__feupdateenv, feupdateenv) versioned_symbol (libm, __feupdateenv, feupdateenv, GLIBC_2_2); -diff --git glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c +diff --git glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c index a4b3081..34d8113 100644 ---- glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c -+++ glibc-2.13/glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c +--- glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c ++++ glibc-ports-2.13/sysdeps/alpha/fpu/ftestexcept.c @@ -30,3 +30,4 @@ fetestexcept (int excepts) return tmp & excepts & SWCR_STATUS_MASK; diff --git a/packages/glibc-ports/2.13/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc-ports/2.13/490-alpha_alpha-add-fdatasync-support.patch deleted file mode 100644 index 372f34c..0000000 --- a/packages/glibc-ports/2.13/490-alpha_alpha-add-fdatasync-support.patch +++ /dev/null @@ -1,126 +0,0 @@ -2009-07-25 Aurelien Jarno - - * sysdeps/unix/sysv/linux/kernel-features.h: define - __ASSUME_FDATASYNC. - * sysdeps/unix/sysv/linux/fdatasync.c: New file. - * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with - -fexceptions. - * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. - - sysdeps/unix/sysv/linux/Makefile | 1 - sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ - sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ - sysdeps/unix/sysv/linux/syscalls.list | 1 - 4 files changed, 76 insertions(+), 1 deletion(-) - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.13/sysdeps/unix/sysv/linux/Makefile ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 -@@ -20,6 +20,7 @@ - setfsuid setfsgid makedev epoll_pwait signalfd \ - eventfd eventfd_read eventfd_write prlimit - -+CFLAGS-fdatasync.c = -fexceptions - CFLAGS-gethostid.c = -fexceptions - - sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 -@@ -0,0 +1,69 @@ -+/* fdatasync -- synchronize at least the data part of a file with -+ the underlying media. Linux version. -+ -+ Copyright (C) 2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+ -+#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC -+static int __have_no_fdatasync; -+#endif -+ -+static int -+do_fdatasync (int fd) -+{ -+#ifdef __ASSUME_FDATASYNC -+ return INLINE_SYSCALL (fdatasync, 1, fd); -+#elif defined __NR_fdatasync -+ if (!__builtin_expect (__have_no_fdatasync, 0)) -+ { -+ int result = INLINE_SYSCALL (fdatasync, 1, fd); -+ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) -+ return result; -+ -+ __have_no_fdatasync = 1; -+ } -+#endif -+ return INLINE_SYSCALL (fsync, 1, fd); -+} -+ -+int -+__fdatasync (int fd) -+{ -+ if (SINGLE_THREAD_P) -+ return do_fdatasync (fd); -+ -+ int oldtype = LIBC_CANCEL_ASYNC (); -+ -+ int result = do_fdatasync (fd); -+ -+ LIBC_CANCEL_RESET (oldtype); -+ -+ return result; -+} -+ -+weak_alias (__fdatasync, fdatasync) -+ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 -@@ -459,6 +459,12 @@ - # define __ASSUME_FUTEX_LOCK_PI 1 - #endif - -+/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it -+ was already present in 2.0 kernels on other architectures. */ -+#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) -+# define __ASSUME_FDATASYNC 1 -+#endif -+ - /* Support for utimensat syscall was added in 2.6.22, on SH - only after 2.6.22-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020616 \ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 -@@ -11,7 +11,6 @@ - epoll_create1 EXTRA epoll_create1 i:i epoll_create1 - epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl - epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait --fdatasync - fdatasync Ci:i fdatasync - flock - flock i:ii __flock flock - fork - fork i: __libc_fork __fork fork - get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/packages/glibc-ports/2.13/530-alpha-fix-rtld-fPIC.patch b/packages/glibc-ports/2.13/530-alpha-fix-rtld-fPIC.patch index b2ae9b5..38562b6 100644 --- a/packages/glibc-ports/2.13/530-alpha-fix-rtld-fPIC.patch +++ b/packages/glibc-ports/2.13/530-alpha-fix-rtld-fPIC.patch @@ -5,9 +5,9 @@ ports/sysdeps/alpha/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/alpha/Makefile glibc-2.13/glibc-ports-2.13/sysdeps/alpha/Makefile ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 +diff -durN glibc-ports-2.13.orig/sysdeps/alpha/Makefile glibc-ports-2.13/sysdeps/alpha/Makefile +--- glibc-ports-2.13.orig/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.13/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 @@ -35,7 +35,8 @@ ifeq ($(subdir),elf) @@ -18,4 +18,3 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/alpha/Makefile glibc-2.13/gl endif # Build everything with full IEEE math support, and with dynamic rounding; -diff -durN glibc-2.13.orig/ports/sysdeps/alpha/Makefile glibc-2.13/ports/sysdeps/alpha/Makefile diff --git a/packages/glibc-ports/2.13/560-ppc-atomic.patch b/packages/glibc-ports/2.13/560-ppc-atomic.patch deleted file mode 100644 index ee1cb90..0000000 --- a/packages/glibc-ports/2.13/560-ppc-atomic.patch +++ /dev/null @@ -1,415 +0,0 @@ -sniped from suse - -Index: sysdeps/powerpc/bits/atomic.h -=================================================================== -RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v -retrieving revision 1.17 -diff -u -a -p -r1.17 atomic.h - -diff -durN glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h glibc-2.13/sysdeps/powerpc/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -85,14 +85,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -102,14 +102,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -118,12 +118,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -132,11 +132,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -144,12 +144,12 @@ - #define __arch_atomic_exchange_and_add_32(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stwcx. %1,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -157,12 +157,12 @@ - #define __arch_atomic_increment_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -170,27 +170,27 @@ - #define __arch_atomic_decrement_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_32(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ - " cmpwi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stwcx. %1,0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -60,14 +60,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp, __tmp2; \ - __asm __volatile (" clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -61,14 +61,14 @@ - unsigned int __tmp, __tmp2; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ - " clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -82,14 +82,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -98,14 +98,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -115,14 +115,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -132,14 +132,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -148,12 +148,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -162,11 +162,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -174,12 +174,12 @@ - #define __arch_atomic_exchange_and_add_64(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stdcx. %1,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -187,12 +187,12 @@ - #define __arch_atomic_increment_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -200,27 +200,27 @@ - #define __arch_atomic_decrement_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_64(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ - " cmpdi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stdcx. %1,0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) diff --git a/packages/glibc-ports/2.13/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/packages/glibc-ports/2.13/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch index 4f4dbec..b7d54ac 100644 --- a/packages/glibc-ports/2.13/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch +++ b/packages/glibc-ports/2.13/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch @@ -1,9 +1,9 @@ http://yann.poupet.free.fr/ep93xx/ Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/bits/endian.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/bits/endian.h ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.13.orig/sysdeps/arm/bits/endian.h glibc-ports-2.13/sysdeps/arm/bits/endian.h +--- glibc-ports-2.13.orig/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.13/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100 @@ -12,7 +12,7 @@ /* FPA floating point units are always big-endian, irrespective of the CPU endianness. VFP floating point units use the same endianness @@ -13,9 +13,9 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/bits/endian.h glibc-2.13 #define __FLOAT_WORD_ORDER __BYTE_ORDER #else #define __FLOAT_WORD_ORDER __BIG_ENDIAN -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.13.orig/sysdeps/arm/fpu/__longjmp.S glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S +--- glibc-ports-2.13.orig/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100 @@ -30,7 +30,33 @@ movs r0, r1 /* get the return value in place */ moveq r0, #1 /* can't let setjmp() return zero! */ @@ -50,9 +50,9 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/__longjmp.S glibc-2. LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) END (__longjmp) -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.13.orig/sysdeps/arm/fpu/bits/fenv.h glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h +--- glibc-ports-2.13.orig/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100 @@ -20,6 +20,45 @@ # error "Never use directly; include instead." #endif @@ -108,9 +108,9 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/bits/fenv.h glibc-2. /* Type representing exception flags. */ typedef unsigned long int fexcept_t; -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.13.orig/sysdeps/arm/fpu/bits/setjmp.h glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h +--- glibc-ports-2.13.orig/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100 @@ -28,7 +28,11 @@ #ifndef _ASM /* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not @@ -123,9 +123,9 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/bits/setjmp.h glibc- +#endif #endif -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.13.orig/sysdeps/arm/fpu/fegetround.c glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c +--- glibc-ports-2.13.orig/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100 @@ -18,9 +18,21 @@ 02111-1307 USA. */ @@ -148,9 +148,9 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fegetround.c glibc-2 + +#endif } -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.13.orig/sysdeps/arm/fpu/fesetround.c glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c +--- glibc-ports-2.13.orig/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100 @@ -18,12 +18,28 @@ 02111-1307 USA. */ @@ -180,9 +180,9 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fesetround.c glibc-2 } libm_hidden_def (fesetround) -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.13.orig/sysdeps/arm/fpu/fpu_control.h glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h +--- glibc-ports-2.13.orig/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100 @@ -1,5 +1,6 @@ /* FPU control word definitions. ARM version. - Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. @@ -278,9 +278,9 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/fpu_control.h glibc- +#endif + #endif /* _FPU_CONTROL_H */ -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.13.orig/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h +--- glibc-ports-2.13.orig/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100 @@ -17,4 +17,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ @@ -290,9 +290,9 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/jmpbuf-offsets.h gli +#else #define __JMP_BUF_SP 20 +#endif -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.13.orig/sysdeps/arm/fpu/setjmp.S glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S +--- glibc-ports-2.13.orig/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100 @@ -24,11 +24,41 @@ ENTRY (__sigsetjmp) @@ -335,9 +335,9 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/fpu/setjmp.S glibc-2.13/ /* Make a tail call to __sigjmp_save; it takes the same args. */ B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/gccframe.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/gccframe.h ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.13.orig/sysdeps/arm/gccframe.h glibc-ports-2.13/sysdeps/arm/gccframe.h +--- glibc-ports-2.13.orig/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.13/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100 @@ -17,6 +17,10 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ @@ -349,9 +349,9 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/gccframe.h glibc-2.13/gl +#endif #include -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/gmp-mparam.h glibc-2.13/glibc-ports-2.13/sysdeps/arm/gmp-mparam.h ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.13.orig/sysdeps/arm/gmp-mparam.h glibc-ports-2.13/sysdeps/arm/gmp-mparam.h +--- glibc-ports-2.13.orig/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.13/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100 @@ -29,7 +29,7 @@ #if defined(__ARMEB__) # define IEEE_DOUBLE_MIXED_ENDIAN 0 @@ -361,14 +361,3 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/arm/gmp-mparam.h glibc-2.13/ # define IEEE_DOUBLE_MIXED_ENDIAN 0 # define IEEE_DOUBLE_BIG_ENDIAN 0 #else -diff -durN glibc-2.13.orig/ports/sysdeps/arm/bits/endian.h glibc-2.13/ports/sysdeps/arm/bits/endian.h -diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/__longjmp.S glibc-2.13/ports/sysdeps/arm/fpu/__longjmp.S -diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/bits/fenv.h glibc-2.13/ports/sysdeps/arm/fpu/bits/fenv.h -diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/bits/setjmp.h glibc-2.13/ports/sysdeps/arm/fpu/bits/setjmp.h -diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/fegetround.c glibc-2.13/ports/sysdeps/arm/fpu/fegetround.c -diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/fesetround.c glibc-2.13/ports/sysdeps/arm/fpu/fesetround.c -diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/fpu_control.h glibc-2.13/ports/sysdeps/arm/fpu/fpu_control.h -diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.13/ports/sysdeps/arm/fpu/jmpbuf-offsets.h -diff -durN glibc-2.13.orig/ports/sysdeps/arm/fpu/setjmp.S glibc-2.13/ports/sysdeps/arm/fpu/setjmp.S -diff -durN glibc-2.13.orig/ports/sysdeps/arm/gccframe.h glibc-2.13/ports/sysdeps/arm/gccframe.h -diff -durN glibc-2.13.orig/ports/sysdeps/arm/gmp-mparam.h glibc-2.13/ports/sysdeps/arm/gmp-mparam.h diff --git a/packages/glibc-ports/2.13/580-nptl-lowlevellock.patch b/packages/glibc-ports/2.13/580-nptl-lowlevellock.patch index 08518e9..9f3fb76 100644 --- a/packages/glibc-ports/2.13/580-nptl-lowlevellock.patch +++ b/packages/glibc-ports/2.13/580-nptl-lowlevellock.patch @@ -9,9 +9,9 @@ In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: ../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.) ../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function) -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 +diff -durN glibc-ports-2.13.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +--- glibc-ports-2.13.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 @@ -25,6 +25,7 @@ #include #include @@ -20,4 +20,3 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/unix/sysv/linux/arm/nptl/low #define FUTEX_WAIT 0 #define FUTEX_WAKE 1 -diff -durN glibc-2.13.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.13/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h diff --git a/packages/glibc-ports/2.13/610-fpu-cw-mips.patch b/packages/glibc-ports/2.13/610-fpu-cw-mips.patch index cd2b4d9..c6345b3 100644 --- a/packages/glibc-ports/2.13/610-fpu-cw-mips.patch +++ b/packages/glibc-ports/2.13/610-fpu-cw-mips.patch @@ -1,8 +1,8 @@ http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html -diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/mips/fpu_control.h glibc-2.13/glibc-ports-2.13/sysdeps/mips/fpu_control.h ---- glibc-2.13.orig/glibc-ports-2.13/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.13/glibc-ports-2.13/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 +diff -durN glibc-ports-2.13.orig/sysdeps/mips/fpu_control.h glibc-ports-2.13/sysdeps/mips/fpu_control.h +--- glibc-ports-2.13.orig/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.13/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 @@ -86,7 +86,7 @@ #define _FPU_RC_UP 0x2 #define _FPU_RC_DOWN 0x3 @@ -12,4 +12,3 @@ diff -durN glibc-2.13.orig/glibc-ports-2.13/sysdeps/mips/fpu_control.h glibc-2.1 /* The fdlibm code requires strict IEEE double precision arithmetic, -diff -durN glibc-2.13.orig/ports/sysdeps/mips/fpu_control.h glibc-2.13/ports/sysdeps/mips/fpu_control.h diff --git a/packages/glibc-ports/2.13/630-mips_shn_undef-hack.patch b/packages/glibc-ports/2.13/630-mips_shn_undef-hack.patch deleted file mode 100644 index 791d76c..0000000 --- a/packages/glibc-ports/2.13/630-mips_shn_undef-hack.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -durN glibc-2.13.orig/elf/dl-lookup.c glibc-2.13/elf/dl-lookup.c ---- glibc-2.13.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 -+++ glibc-2.13/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 -@@ -301,6 +301,12 @@ - /* FALLTHROUGH */ - case STB_GLOBAL: - success: -+#ifdef __mips__ -+ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF -+ symbols, we skip them. */ -+ if (sym->st_shndx == SHN_UNDEF) -+ break; -+#endif - /* Global definition. Just what we need. */ - result->s = sym; - result->m = (struct link_map *) map; diff --git a/packages/glibc-ports/2.13/640-alpha-atfcts.patch b/packages/glibc-ports/2.13/640-alpha-atfcts.patch deleted file mode 100644 index 7a8a94a..0000000 --- a/packages/glibc-ports/2.13/640-alpha-atfcts.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 -@@ -437,7 +437,8 @@ - the code. On PPC they were introduced in 2.6.17-rc1, - on SH in 2.6.19-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020611 \ -- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) -+ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ -+ && (!defined __alpha__) - # define __ASSUME_ATFCTS 1 - #endif - diff --git a/packages/glibc-ports/2.13/650-syslog.patch b/packages/glibc-ports/2.13/650-syslog.patch deleted file mode 100644 index c20cafc..0000000 --- a/packages/glibc-ports/2.13/650-syslog.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c ---- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 -+++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 -@@ -152,7 +152,7 @@ - #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID - /* Check for invalid bits. */ - if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { -- syslog(INTERNALLOG, -+ __syslog(INTERNALLOG, - "syslog: unknown facility/priority: %x", pri); - pri &= LOG_PRIMASK|LOG_FACMASK; - } diff --git a/packages/glibc-ports/2.13/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc-ports/2.13/660-debug-readlink_chk-readklinkat_chk.patch deleted file mode 100644 index a5a7052..0000000 --- a/packages/glibc-ports/2.13/660-debug-readlink_chk-readklinkat_chk.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c ---- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 -+++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 -@@ -25,7 +25,7 @@ - - - ssize_t --__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) -+__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) - { - if (len > buflen) - __chk_fail (); -diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c ---- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 -+++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 -@@ -21,7 +21,7 @@ - - - ssize_t --__readlinkat_chk (int fd, const char *path, void *buf, size_t len, -+__readlinkat_chk (int fd, const char *path, char *buf, size_t len, - size_t buflen) - { - if (len > buflen) diff --git a/packages/glibc-ports/2.13/670-support-hard-float-eabi.patch b/packages/glibc-ports/2.13/670-support-hard-float-eabi.patch index 589f11e..ec00405 100644 --- a/packages/glibc-ports/2.13/670-support-hard-float-eabi.patch +++ b/packages/glibc-ports/2.13/670-support-hard-float-eabi.patch @@ -1,6 +1,6 @@ -diff -ur glibc-2.13/ports/sysdeps/arm/preconfigure glibc-2.13-patched/ports/sysdeps/arm/preconfigure ---- glibc-2.13/ports/sysdeps/arm/preconfigure 2011-01-25 14:00:16.000000000 -0700 -+++ glibc-2.13-patched/ports/sysdeps/arm/preconfigure 2017-03-07 15:36:50.310454000 -0700 +diff -ur glibc-2.13/sysdeps/arm/preconfigure glibc-2.13-patched/sysdeps/arm/preconfigure +--- glibc-2.13/sysdeps/arm/preconfigure 2011-01-25 14:00:16.000000000 -0700 ++++ glibc-2.13-patched/sysdeps/arm/preconfigure 2017-03-07 15:36:50.310454000 -0700 @@ -2,7 +2,7 @@ arm*) base_machine=arm @@ -10,9 +10,9 @@ diff -ur glibc-2.13/ports/sysdeps/arm/preconfigure glibc-2.13-patched/ports/sysd machine=arm/eabi/$machine if [ "${CFLAGS+set}" != "set" ]; then CFLAGS="-g -O2" -diff -ur glibc-2.13/ports/sysdeps/arm/shlib-versions glibc-2.13-patched/ports/sysdeps/arm/shlib-versions ---- glibc-2.13/ports/sysdeps/arm/shlib-versions 2011-01-25 14:00:16.000000000 -0700 -+++ glibc-2.13-patched/ports/sysdeps/arm/shlib-versions 2017-03-07 15:36:50.312457000 -0700 +diff -ur glibc-2.13/sysdeps/arm/shlib-versions glibc-2.13-patched/sysdeps/arm/shlib-versions +--- glibc-2.13/sysdeps/arm/shlib-versions 2011-01-25 14:00:16.000000000 -0700 ++++ glibc-2.13-patched/sysdeps/arm/shlib-versions 2017-03-07 15:36:50.312457000 -0700 @@ -1,4 +1,4 @@ -arm.*-.*-linux-gnueabi DEFAULT GLIBC_2.4 +arm.*-.*-linux-gnueabi.* DEFAULT GLIBC_2.4 diff --git a/packages/glibc-ports/2.14.1/090-Fix-ARM-build-with-GCC-trunk.patch b/packages/glibc-ports/2.14.1/090-Fix-ARM-build-with-GCC-trunk.patch index 1a632fe..259b285 100644 --- a/packages/glibc-ports/2.14.1/090-Fix-ARM-build-with-GCC-trunk.patch +++ b/packages/glibc-ports/2.14.1/090-Fix-ARM-build-with-GCC-trunk.patch @@ -20,8 +20,8 @@ Tested that this fixes the build for ARM. sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c ++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c @@ -23,7 +23,8 @@ #include @@ -35,8 +35,8 @@ Tested that this fixes the build for ARM. static _Unwind_Reason_Code (*libgcc_s_forcedunwind) diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c index bff3e2b..1f1eb71 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c +--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c ++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c @@ -21,7 +21,8 @@ #include #include @@ -47,8 +47,8 @@ index bff3e2b..1f1eb71 100644 static _Unwind_Reason_Code (*libgcc_s_personality) (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, struct _Unwind_Context *); ---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c +--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c ++++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c @@ -23,7 +23,8 @@ #include @@ -59,8 +59,8 @@ index bff3e2b..1f1eb71 100644 static _Unwind_Reason_Code (*libgcc_s_personality) (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); static _Unwind_Reason_Code (*libgcc_s_forcedunwind) ---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c +--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c ++++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c @@ -21,7 +21,8 @@ #include #include diff --git a/packages/glibc-ports/2.14.1/100-respect-env-CPPFLAGS.patch b/packages/glibc-ports/2.14.1/100-respect-env-CPPFLAGS.patch deleted file mode 100644 index 3798cb2..0000000 --- a/packages/glibc-ports/2.14.1/100-respect-env-CPPFLAGS.patch +++ /dev/null @@ -1,14 +0,0 @@ -Respect environment CPPFLAGS when we run ./configure so we can inject -random -D things without having to set CFLAGS/ASFLAGS - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 -+++ glibc-2.13/Makeconfig 2009-11-13 00:49:41.000000000 +0100 -@@ -697,6 +697,7 @@ - $(foreach lib,$(libof-$(basename $(@F))) \ - $(libof-$(field.le_next)) - -+#define LIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = LIST_FIRST((head)); \ -+ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - /* - * List access methods. - */ -@@ -197,6 +202,16 @@ - #define SLIST_FOREACH(var, head, field) \ - for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) - -+#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = SLIST_FIRST((head)); \ -+ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ -+#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ -+ for ((varp) = &SLIST_FIRST((head)); \ -+ ((var) = *(varp)) != NULL; \ -+ (varp) = &SLIST_NEXT((var), field)) -+ - /* - * Singly-linked List access methods. - */ -@@ -242,6 +257,12 @@ - (head)->stqh_last = &(elm)->field.stqe_next; \ - } while (/*CONSTCOND*/0) - -+#define STAILQ_LAST(head, type, field) \ -+ (STAILQ_EMPTY((head)) ? \ -+ NULL : \ -+ ((struct type *)(void *) \ -+ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) -+ - #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ - (head)->stqh_last = &(elm)->field.stqe_next; \ -@@ -271,6 +292,11 @@ - (var); \ - (var) = ((var)->field.stqe_next)) - -+#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = STAILQ_FIRST((head)); \ -+ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define STAILQ_CONCAT(head1, head2) do { \ - if (!STAILQ_EMPTY((head2))) { \ - *(head1)->stqh_last = (head2)->stqh_first; \ -@@ -437,11 +463,21 @@ - (var); \ - (var) = ((var)->field.tqe_next)) - -+#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = TAILQ_FIRST((head)); \ -+ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ - for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ - (var); \ - (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) - -+#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ -+ for ((var) = TAILQ_LAST((head), headname); \ -+ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_CONCAT(head1, head2, field) do { \ - if (!TAILQ_EMPTY(head2)) { \ - *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/packages/glibc-ports/2.14.1/160-manual-no-perl.patch b/packages/glibc-ports/2.14.1/160-manual-no-perl.patch deleted file mode 100644 index 5e2b807..0000000 --- a/packages/glibc-ports/2.14.1/160-manual-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.13.orig/manual/Makefile glibc-2.13/manual/Makefile ---- glibc-2.13.orig/manual/Makefile 2006-01-08 07:43:47.000000000 +0100 -+++ glibc-2.13/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/packages/glibc-ports/2.14.1/170-localedef-fix-trampoline.patch b/packages/glibc-ports/2.14.1/170-localedef-fix-trampoline.patch deleted file mode 100644 index 3cc6559..0000000 --- a/packages/glibc-ports/2.14.1/170-localedef-fix-trampoline.patch +++ /dev/null @@ -1,53 +0,0 @@ -# DP: Description: Fix localedef segfault when run under exec-shield, -# PaX or similar. (#231438, #198099) -# DP: Dpatch Author: James Troup -# DP: Patch Author: (probably) Jakub Jelinek -# DP: Upstream status: Unknown -# DP: Status Details: Unknown -# DP: Date: 2004-03-16 -diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h ---- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 -+++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 -@@ -203,6 +203,42 @@ - } - } - } -+ -+/* GCC ATM seems to do a poor job with pointers to nested functions passed -+ to inlined functions. Help it a little bit with this hack. */ -+#define wchead_table_iterate(tp, fn) \ -+do \ -+ { \ -+ struct wchead_table *t = (tp); \ -+ uint32_t index1; \ -+ for (index1 = 0; index1 < t->level1_size; index1++) \ -+ { \ -+ uint32_t lookup1 = t->level1[index1]; \ -+ if (lookup1 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup1_shifted = lookup1 << t->q; \ -+ uint32_t index2; \ -+ for (index2 = 0; index2 < (1 << t->q); index2++) \ -+ { \ -+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ -+ if (lookup2 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup2_shifted = lookup2 << t->p; \ -+ uint32_t index3; \ -+ for (index3 = 0; index3 < (1 << t->p); index3++) \ -+ { \ -+ struct element_t *lookup3 \ -+ = t->level3[index3 + lookup2_shifted]; \ -+ if (lookup3 != NULL) \ -+ fn ((((index1 << t->q) + index2) << t->p) + index3, \ -+ lookup3); \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } while (0) -+ - #endif - - #ifndef NO_FINALIZE diff --git a/packages/glibc-ports/2.14.1/180-resolv-dynamic.patch b/packages/glibc-ports/2.14.1/180-resolv-dynamic.patch deleted file mode 100644 index e916bce..0000000 --- a/packages/glibc-ports/2.14.1/180-resolv-dynamic.patch +++ /dev/null @@ -1,39 +0,0 @@ -ripped from SuSE - -if /etc/resolv.conf is updated, then make sure applications -already running get the updated information. - -http://bugs.gentoo.org/177416 - -diff -durN glibc-2.13.orig/resolv/res_libc.c glibc-2.13/resolv/res_libc.c ---- glibc-2.13.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 -+++ glibc-2.13/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - - /* The following bit is copied from res_data.c (where it is #ifdef'ed -@@ -95,6 +96,20 @@ - __res_maybe_init (res_state resp, int preinit) - { - if (resp->options & RES_INIT) { -+ static time_t last_mtime, last_check; -+ time_t now; -+ struct stat statbuf; -+ -+ time (&now); -+ if (now != last_check) { -+ last_check = now; -+ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { -+ last_mtime = statbuf.st_mtime; -+ atomicinclock (lock); -+ atomicinc (__res_initstamp); -+ atomicincunlock (lock); -+ } -+ } - if (__res_initstamp != resp->_u._ext.initstamp) { - if (resp->nscount > 0) - __res_iclose (resp, true); diff --git a/packages/glibc-ports/2.14.1/190-localedef-mmap.patch b/packages/glibc-ports/2.14.1/190-localedef-mmap.patch deleted file mode 100644 index f3914cd..0000000 --- a/packages/glibc-ports/2.14.1/190-localedef-mmap.patch +++ /dev/null @@ -1,39 +0,0 @@ -sniped from Debian -http://bugs.gentoo.org/289615 - -2009-10-27 Aurelien Jarno - - * locale/programs/locarchive.c: use MMAP_SHARED to reserve memory - used later with MMAP_FIXED | MMAP_SHARED to cope with different - alignment restrictions. - -diff -durN glibc-2.13.orig/locale/programs/locarchive.c glibc-2.13/locale/programs/locarchive.c ---- glibc-2.13.orig/locale/programs/locarchive.c 2009-04-27 16:07:47.000000000 +0200 -+++ glibc-2.13/locale/programs/locarchive.c 2009-11-13 00:50:01.000000000 +0100 -@@ -134,7 +134,7 @@ - size_t reserved = RESERVE_MMAP_SIZE; - int xflags = 0; - if (total < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else -@@ -396,7 +396,7 @@ - size_t reserved = RESERVE_MMAP_SIZE; - int xflags = 0; - if (total < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else -@@ -614,7 +614,7 @@ - int xflags = 0; - void *p; - if (st.st_size < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else diff --git a/packages/glibc-ports/2.14.1/200-fadvise64_64.patch b/packages/glibc-ports/2.14.1/200-fadvise64_64.patch deleted file mode 100644 index 71bca38..0000000 --- a/packages/glibc-ports/2.14.1/200-fadvise64_64.patch +++ /dev/null @@ -1,28 +0,0 @@ -ripped from Debian - - sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 -@@ -35,6 +35,19 @@ - return INTERNAL_SYSCALL_ERRNO (ret, err); - return 0; - #else -+# ifdef __NR_fadvise64_64 -+ INTERNAL_SYSCALL_DECL (err); -+ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, -+ __LONG_LONG_PAIR ((long) (offset >> 31), -+ (long) offset), -+ __LONG_LONG_PAIR ((long) (len >> 31), -+ (long) len), -+ advise); -+ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) -+ return INTERNAL_SYSCALL_ERRNO (ret, err); -+ return 0; -+# else - return ENOSYS; -+# endif - #endif - } diff --git a/packages/glibc-ports/2.14.1/220-section-comments.patch b/packages/glibc-ports/2.14.1/220-section-comments.patch deleted file mode 100644 index d717829..0000000 --- a/packages/glibc-ports/2.14.1/220-section-comments.patch +++ /dev/null @@ -1,24 +0,0 @@ -http://sources.redhat.com/ml/binutils/2004-04/msg00665.html - -fixes building on some architectures (like m68k/arm/cris/etc...) because -it does the right thing - -diff -durN glibc-2.13.orig/include/libc-symbols.h glibc-2.13/include/libc-symbols.h ---- glibc-2.13.orig/include/libc-symbols.h 2009-03-14 00:51:46.000000000 +0100 -+++ glibc-2.13/include/libc-symbols.h 2009-11-13 00:50:07.000000000 +0100 -@@ -239,12 +239,12 @@ - # define __make_section_unallocated(section_string) - # endif - --/* Tacking on "\n\t#" to the section name makes gcc put it's bogus -+/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus - section attributes on what looks like a comment to the assembler. */ - # ifdef HAVE_SECTION_QUOTES --# define __sec_comment "\"\n\t#\"" -+# define __sec_comment "\"\n#APP\n\t#\"" - # else --# define __sec_comment "\n\t#" -+# define __sec_comment "\n#APP\n\t#" - # endif - # define link_warning(symbol, msg) \ - __make_section_unallocated (".gnu.warning." #symbol) \ diff --git a/packages/glibc-ports/2.14.1/230-no-inline-gmon.patch b/packages/glibc-ports/2.14.1/230-no-inline-gmon.patch deleted file mode 100644 index fa33c2b..0000000 --- a/packages/glibc-ports/2.14.1/230-no-inline-gmon.patch +++ /dev/null @@ -1,36 +0,0 @@ -http://bugs.gentoo.org/196245 -http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html - -Attached is a patch to add __attribute__ ((noinline)) to -call_gmon_start. - -Without this patch, the sec script that processed initfini.s removes a -part of inlined call_gmon_start, causing undefined label errors. - -This patch solves the problem by forcing gcc not to inline -call_gmon_start with __attribute__ ((noinline)). - -Tested by building for arm-none-lixux-gnueabi. OK to apply? - -Kazu Hirata - -2006-05-07 Kazu Hirata <kazu@codesourcery.com> - - * sysdeps/generic/initfini.c (call_gmon_start): Add - __attribute__ ((noinline)). - -Index: sysdeps/generic/initfini.c -=================================================================== - -diff -durN glibc-2.13.orig/sysdeps/generic/initfini.c glibc-2.13/sysdeps/generic/initfini.c ---- glibc-2.13.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200 -+++ glibc-2.13/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100 -@@ -70,7 +70,7 @@ - /* The beginning of _init: */ - asm ("\n/*@_init_PROLOG_BEGINS*/"); - --static void -+static void __attribute__ ((noinline)) - call_gmon_start(void) - { - extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ diff --git a/packages/glibc-ports/2.14.1/260-assume-pipe2.patch b/packages/glibc-ports/2.14.1/260-assume-pipe2.patch deleted file mode 100644 index 42e8f4e..0000000 --- a/packages/glibc-ports/2.14.1/260-assume-pipe2.patch +++ /dev/null @@ -1,40 +0,0 @@ -http://bugs.gentoo.org/250342 -http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 - -we cant assume sock_cloexec and pipe2 are bound together as the former defines -are found in glibc only while the latter are a combo of kernel headers and -glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub -inside of glibc, we hit a problem. for example: - -#include -#include -main() -{ - getgrnam("portage"); - if (!popen("ls", "r")) - perror("popen()"); -} - -getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both -__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against -older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS -stub for it. so popen() will always fail as glibc assumes pipe2() works. - -diff -durN glibc-2.13.orig/socket/have_sock_cloexec.c glibc-2.13/socket/have_sock_cloexec.c ---- glibc-2.13.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 -+++ glibc-2.13/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 -@@ -16,9 +16,14 @@ - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -+#include - #include - #include - - #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC - int __have_sock_cloexec; - #endif -+ -+#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 -+int __have_pipe2; -+#endif diff --git a/packages/glibc-ports/2.14.1/270-china.patch b/packages/glibc-ports/2.14.1/270-china.patch deleted file mode 100644 index 41d7759..0000000 --- a/packages/glibc-ports/2.14.1/270-china.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.13.orig/localedata/locales/zh_TW glibc-2.13/localedata/locales/zh_TW ---- glibc-2.13.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 -+++ glibc-2.13/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 -@@ -1,7 +1,7 @@ - comment_char % - escape_char / - % --% Chinese language locale for Taiwan R.O.C. -+% Chinese language locale for Taiwan - % charmap: BIG5-CP950 - % - % Original Author: -@@ -17,7 +17,7 @@ - % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf - - LC_IDENTIFICATION --title "Chinese locale for Taiwan R.O.C." -+title "Chinese locale for Taiwan" - source "" - address "" - contact "" -@@ -25,7 +25,7 @@ - tel "" - fax "" - language "Chinese" --territory "Taiwan R.O.C." -+territory "Taiwan" - revision "0.2" - date "2000-08-02" - % diff --git a/packages/glibc-ports/2.14.1/280-new-valencian-locale.patch b/packages/glibc-ports/2.14.1/280-new-valencian-locale.patch deleted file mode 100644 index 4cdd108..0000000 --- a/packages/glibc-ports/2.14.1/280-new-valencian-locale.patch +++ /dev/null @@ -1,115 +0,0 @@ -http://bugs.gentoo.org/show_bug.cgi?id=131815 -http://sourceware.org/bugzilla/show_bug.cgi?id=2522 - -diff -durN glibc-2.13.orig/localedata/SUPPORTED glibc-2.13/localedata/SUPPORTED ---- glibc-2.13.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 -+++ glibc-2.13/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 -@@ -72,6 +72,8 @@ - ca_ES.UTF-8/UTF-8 \ - ca_ES/ISO-8859-1 \ - ca_ES@euro/ISO-8859-15 \ -+ca_ES.UTF-8@valencia/UTF-8 \ -+ca_ES@valencia/ISO-8859-15 \ - ca_FR.UTF-8/UTF-8 \ - ca_FR/ISO-8859-15 \ - ca_IT.UTF-8/UTF-8 \ -diff -durN glibc-2.13.orig/localedata/locales/ca_ES@valencia glibc-2.13/localedata/locales/ca_ES@valencia ---- glibc-2.13.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.13/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 -@@ -0,0 +1,96 @@ -+comment_char % -+escape_char / -+% -+% Valencian (southern Catalan) locale for Spain with Euro -+% -+% Note that this locale is almost the same as ca_ES@euro. The point of having -+% a separate locale is only for PO translations, which have a lot of social -+% support and are very appreciated by the Valencian-speaking community. -+% -+% Contact: Jordi Mallach -+% Email: jordi@gnu.org -+% Tel: -+% Fax: -+% Language: ca -+% Territory: ES -+% Option: euro -+% Revision: 1.0 -+% Date: 2006-04-06 -+% Application: general -+% Users: general -+% Repertoiremap: mnemonic,ds -+% Charset: ISO-8859-15 -+% Distribution and use is free, also -+% for commercial purposes. -+ -+LC_IDENTIFICATION -+title "Valencian (southern Catalan) locale for Spain with Euro" -+source "" -+address "" -+contact "Jordi Mallach" -+email "jordi@gnu.org" -+tel "" -+fax "" -+language "Catalan" -+territory "Spain" -+revision "1.0" -+date "2006-04-06" -+% -+category "ca_ES@valencia:2006";LC_IDENTIFICATION -+category "ca_ES@valencia:2006";LC_CTYPE -+category "ca_ES@valencia:2006";LC_COLLATE -+category "ca_ES@valencia:2006";LC_MONETARY -+category "ca_ES@valencia:2006";LC_NUMERIC -+category "ca_ES@valencia:2006";LC_TIME -+category "ca_ES@valencia:2006";LC_MESSAGES -+category "ca_ES@valencia:2006";LC_PAPER -+category "ca_ES@valencia:2006";LC_NAME -+category "ca_ES@valencia:2006";LC_ADDRESS -+category "ca_ES@valencia:2006";LC_TELEPHONE -+category "ca_ES@valencia:2006";LC_MEASUREMENT -+ -+END LC_IDENTIFICATION -+ -+LC_CTYPE -+copy "i18n" -+END LC_CTYPE -+ -+LC_COLLATE -+copy "ca_ES" -+END LC_COLLATE -+ -+LC_MONETARY -+copy "ca_ES" -+END LC_MONETARY -+ -+LC_NUMERIC -+copy "ca_ES" -+END LC_NUMERIC -+ -+LC_TIME -+copy "ca_ES" -+END LC_TIME -+ -+LC_MESSAGES -+copy "ca_ES" -+END LC_MESSAGES -+ -+LC_PAPER -+copy "ca_ES" -+END LC_PAPER -+ -+LC_NAME -+copy "ca_ES" -+END LC_NAME -+ -+LC_ADDRESS -+copy "ca_ES" -+END LC_ADDRESS -+ -+LC_TELEPHONE -+copy "ca_ES" -+END LC_TELEPHONE -+ -+LC_MEASUREMENT -+copy "ca_ES" -+END LC_MEASUREMENT diff --git a/packages/glibc-ports/2.14.1/300-nscd-one-fork.patch b/packages/glibc-ports/2.14.1/300-nscd-one-fork.patch deleted file mode 100644 index adc9b3f..0000000 --- a/packages/glibc-ports/2.14.1/300-nscd-one-fork.patch +++ /dev/null @@ -1,40 +0,0 @@ -only fork one to assist in stop-start-daemon assumptions about daemon behavior - -http://bugs.gentoo.org/190785 - -diff -durN glibc-2.13.orig/nscd/nscd.c glibc-2.13/nscd/nscd.c ---- glibc-2.13.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 -+++ glibc-2.13/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 -@@ -182,6 +182,9 @@ - if (pid != 0) - exit (0); - -+ if (write_pid (_PATH_NSCDPID) < 0) -+ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -+ - int nullfd = open (_PATH_DEVNULL, O_RDWR); - if (nullfd != -1) - { -@@ -231,12 +234,6 @@ - for (i = min_close_fd; i < getdtablesize (); i++) - close (i); - -- pid = fork (); -- if (pid == -1) -- error (EXIT_FAILURE, errno, _("cannot fork")); -- if (pid != 0) -- exit (0); -- - setsid (); - - if (chdir ("/") != 0) -@@ -245,9 +242,6 @@ - - openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); - -- if (write_pid (_PATH_NSCDPID) < 0) -- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -- - if (!init_logfile ()) - dbg_log (_("Could not create log file")); - diff --git a/packages/glibc-ports/2.14.1/310-hppa-nptl-carlos.patch b/packages/glibc-ports/2.14.1/310-hppa-nptl-carlos.patch deleted file mode 100644 index 4c028b2..0000000 --- a/packages/glibc-ports/2.14.1/310-hppa-nptl-carlos.patch +++ /dev/null @@ -1,246 +0,0 @@ - - -diff -durN glibc-2.13.orig/elf/rtld.c glibc-2.13/elf/rtld.c ---- glibc-2.13.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 -+++ glibc-2.13/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 -@@ -392,14 +392,14 @@ - know it is available. We do not have to clear the memory if we - do not have to use the temporary bootstrap_map. Global variables - are initialized to zero by default. */ --#ifndef DONT_USE_BOOTSTRAP_MAP -+#if !defined DONT_USE_BOOTSTRAP_MAP - # ifdef HAVE_BUILTIN_MEMSET - __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); - # else -- for (size_t cnt = 0; -- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); -- ++cnt) -- bootstrap_map.l_info[cnt] = 0; -+ /* Clear the whole bootstrap_map structure */ -+ for (char *cnt = (char *)&(bootstrap_map); -+ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); -+ *cnt++ = '\0'); - # endif - # if USE___THREAD - bootstrap_map.l_tls_modid = 0; -diff -durN glibc-2.13.orig/include/atomic.h glibc-2.13/include/atomic.h ---- glibc-2.13.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 -+++ glibc-2.13/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 -@@ -185,7 +185,7 @@ - __typeof (*(mem)) __atg5_value = (newvalue); \ - \ - do \ -- __atg5_oldval = *__atg5_memp; \ -+ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ - __atg5_oldval), 0)); \ -@@ -206,7 +206,7 @@ - __typeof (*(mem)) __atg6_value = (value); \ - \ - do \ -- __atg6_oldval = *__atg6_memp; \ -+ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ - __atg6_oldval \ -@@ -224,7 +224,7 @@ - __typeof (*(mem)) __atg7_value = (value); \ - \ - do \ -- __atg7_oldv = *__atg7_memp; \ -+ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ - __atg7_oldv \ -@@ -242,7 +242,7 @@ - __typeof (mem) __atg8_memp = (mem); \ - __typeof (*(mem)) __atg8_value = (value); \ - do { \ -- __atg8_oldval = *__atg8_memp; \ -+ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ - if (__atg8_oldval >= __atg8_value) \ - break; \ - } while (__builtin_expect \ -@@ -259,7 +259,7 @@ - __typeof (mem) __atg9_memp = (mem); \ - __typeof (*(mem)) __atg9_value = (value); \ - do { \ -- __atg9_oldv = *__atg9_memp; \ -+ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ - if (__atg9_oldv >= __atg9_value) \ - break; \ - } while (__builtin_expect \ -@@ -277,7 +277,7 @@ - __typeof (mem) __atg10_memp = (mem); \ - __typeof (*(mem)) __atg10_value = (value); \ - do { \ -- __atg10_oldval = *__atg10_memp; \ -+ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ - if (__atg10_oldval <= __atg10_value) \ - break; \ - } while (__builtin_expect \ -@@ -361,7 +361,7 @@ - \ - do \ - { \ -- __atg11_oldval = *__atg11_memp; \ -+ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ - if (__builtin_expect (__atg11_oldval <= 0, 0)) \ - break; \ - } \ -@@ -400,7 +400,7 @@ - __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ - \ - do \ -- __atg14_old = (*__atg14_memp); \ -+ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ - __atg14_old | __atg14_mask,\ -@@ -418,7 +418,7 @@ - __typeof (*(mem)) __atg15_mask = (mask); \ - \ - do \ -- __atg15_old = (*__atg15_memp); \ -+ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ - __atg15_old & __atg15_mask, \ -@@ -450,7 +450,7 @@ - __typeof (*(mem)) __atg16_mask = (mask); \ - \ - do \ -- __atg16_old = (*__atg16_memp); \ -+ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ - __atg16_old & __atg16_mask,\ -@@ -468,7 +468,7 @@ - __typeof (*(mem)) __atg17_mask = (mask); \ - \ - do \ -- __atg17_old = (*__atg17_memp); \ -+ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ - __atg17_old | __atg17_mask, \ -@@ -484,7 +484,7 @@ - __typeof (*(mem)) __atg18_mask = (mask); \ - \ - do \ -- __atg18_old = (*__atg18_memp); \ -+ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ - __atg18_old | __atg18_mask,\ -@@ -500,7 +500,7 @@ - __typeof (*(mem)) __atg19_mask = (mask); \ - \ - do \ -- __atg19_old = (*__atg19_memp); \ -+ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ - __atg19_old | __atg19_mask,\ -diff -durN glibc-2.13.orig/nptl/Makefile glibc-2.13/nptl/Makefile ---- glibc-2.13.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 -+++ glibc-2.13/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -265,9 +265,9 @@ - # Files which must not be linked with libpthread. - tests-nolibpthread = tst-unload - --# This sets the stack resource limit to 1023kb, which is not a multiple --# of the page size since every architecture's page size is > 1k. --tst-oddstacklimit-ENV = ; ulimit -s 1023; -+# This sets the stack resource limit to 8193kb, which is not a multiple -+# of the page size since every architecture's page size is 4096 bytes. -+tst-oddstacklimit-ENV = ; ulimit -s 8193; - - distribute = eintr.c tst-cleanup4aux.c - -@@ -426,6 +426,35 @@ - CFLAGS-tst-cleanupx4.c += -fexceptions - CFLAGS-tst-oncex3.c += -fexceptions - CFLAGS-tst-oncex4.c += -fexceptions -+ -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed -+LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) -+ - CFLAGS-tst-align.c += $(stack-align-test-flags) - CFLAGS-tst-align3.c += $(stack-align-test-flags) - CFLAGS-tst-initializers1.c = -W -Wall -Werror -diff -durN glibc-2.13.orig/nptl/pthread_barrier_wait.c glibc-2.13/nptl/pthread_barrier_wait.c ---- glibc-2.13.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 -+++ glibc-2.13/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 -@@ -64,7 +64,7 @@ - do - lll_futex_wait (&ibarrier->curr_event, event, - ibarrier->private ^ FUTEX_PRIVATE_FLAG); -- while (event == ibarrier->curr_event); -+ while (event == *(volatile unsigned int *)&ibarrier->curr_event); - } - - /* Make sure the init_count is stored locally or in a register. */ -diff -durN glibc-2.13.orig/nptl/sysdeps/pthread/Makefile glibc-2.13/nptl/sysdeps/pthread/Makefile ---- glibc-2.13.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 -+++ glibc-2.13/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -33,7 +33,9 @@ - - ifeq ($(have-forced-unwind),yes) - tests += tst-mqueue8x -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed - CFLAGS-tst-mqueue8x.c += -fexceptions -+LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) - endif - endif - -diff -durN glibc-2.13.orig/stdio-common/Makefile glibc-2.13/stdio-common/Makefile ---- glibc-2.13.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 -+++ glibc-2.13/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -82,7 +82,7 @@ - $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' - endif - --CFLAGS-vfprintf.c = -Wno-uninitialized -+CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch - CFLAGS-vfwprintf.c = -Wno-uninitialized - CFLAGS-tst-printf.c = -Wno-format - CFLAGS-tstdiomisc.c = -Wno-format -diff -durN glibc-2.13.orig/sunrpc/clnt_udp.c glibc-2.13/sunrpc/clnt_udp.c ---- glibc-2.13.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 -+++ glibc-2.13/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 -@@ -456,7 +456,7 @@ - while (inlen < 0 && errno == EINTR); - if (inlen < 0) - { -- if (errno == EWOULDBLOCK) -+ if (errno == EWOULDBLOCK || errno == EAGAIN) - continue; - cu->cu_error.re_errno = errno; - return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/packages/glibc-ports/2.14.1/330-m68k-sys-user.patch b/packages/glibc-ports/2.14.1/330-m68k-sys-user.patch index 8fbe2e5..6476b5c 100644 --- a/packages/glibc-ports/2.14.1/330-m68k-sys-user.patch +++ b/packages/glibc-ports/2.14.1/330-m68k-sys-user.patch @@ -1,8 +1,8 @@ copied from kernel as it is sanitized now -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys/user.h ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 +diff -durN glibc-ports-2.14.1.orig/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys/user.h +--- glibc-ports-2.14.1.orig/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 @@ -1,3 +1,90 @@ +#ifndef _SYS_USER_H +#define _SYS_USER_H @@ -94,4 +94,3 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/m68k/sys /* Copyright (C) 2008, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. -diff -durN glibc-2.14.1.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.14.1/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h diff --git a/packages/glibc-ports/2.14.1/340-dl_execstack-PaX-support.patch b/packages/glibc-ports/2.14.1/340-dl_execstack-PaX-support.patch deleted file mode 100644 index 2402af0..0000000 --- a/packages/glibc-ports/2.14.1/340-dl_execstack-PaX-support.patch +++ /dev/null @@ -1,66 +0,0 @@ - With latest versions of glibc, a lot of apps failed on a PaX enabled - system with: - cannot enable executable stack as shared object requires: Permission denied - - This is due to PaX 'exec-protecting' the stack, and ld.so then trying - to make the stack executable due to some libraries not containing the - PT_GNU_STACK section. Bug #32960. (12 Nov 2003). - - Patch also NPTL. Bug #116086. (20 Dec 2005). - -diff -durN glibc-2.13.orig/nptl/allocatestack.c glibc-2.13/nptl/allocatestack.c ---- glibc-2.13.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 -+++ glibc-2.13/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -329,7 +329,8 @@ - # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" - #endif - if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) -- return errno; -+ if (errno != EACCES) /* PAX is enabled */ -+ return errno; - - return 0; - } -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -63,7 +63,10 @@ - else - # endif - { -- result = errno; -+ if (errno == EACCES) /* PAX is enabled */ -+ result = 0; -+ else -+ result = errno; - goto out; - } - } -@@ -89,7 +92,12 @@ - page -= size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; -@@ -115,7 +123,12 @@ - page += size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; diff --git a/packages/glibc-ports/2.14.1/350-pre20040117-pt_pax.patch b/packages/glibc-ports/2.14.1/350-pre20040117-pt_pax.patch deleted file mode 100644 index f8f6b83..0000000 --- a/packages/glibc-ports/2.14.1/350-pre20040117-pt_pax.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.13.orig/elf/elf.h glibc-2.13/elf/elf.h ---- glibc-2.13.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 -+++ glibc-2.13/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 -@@ -580,6 +580,7 @@ - #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ - #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ - #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ -+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ - #define PT_LOSUNW 0x6ffffffa - #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ - #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ -@@ -593,6 +594,18 @@ - #define PF_X (1 << 0) /* Segment is executable */ - #define PF_W (1 << 1) /* Segment is writable */ - #define PF_R (1 << 2) /* Segment is readable */ -+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ -+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ -+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ -+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ -+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ -+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ -+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ -+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ -+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ -+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ -+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ -+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ - #define PF_MASKOS 0x0ff00000 /* OS-specific */ - #define PF_MASKPROC 0xf0000000 /* Processor-specific */ - diff --git a/packages/glibc-ports/2.14.1/360-tests-sandbox-libdl-paths.patch b/packages/glibc-ports/2.14.1/360-tests-sandbox-libdl-paths.patch deleted file mode 100644 index 9f78c52..0000000 --- a/packages/glibc-ports/2.14.1/360-tests-sandbox-libdl-paths.patch +++ /dev/null @@ -1,193 +0,0 @@ -when glibc runs its tests, it does so by invoking the local library loader. -in Gentoo, we build/run inside of our "sandbox" which itself is linked against -libdl (so that it can load libraries and pull out symbols). the trouble -is that when you upgrade from an older glibc to the new one, often times -internal symbols change name or abi. this is normally OK as you cannot use -libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so -we always say "keep all of the glibc libraries from the same build". but -when glibc runs its tests, it uses dynamic paths to point to its new local -copies of libraries. if the test doesnt use libdl, then glibc doesnt add -its path, and when sandbox triggers the loading of libdl, glibc does so -from the host system system. this gets us into the case of all libraries -are from the locally compiled version of glibc except for libdl.so. - -Fix by Wormo - -http://bugs.gentoo.org/56898 - -diff -durN glibc-2.13.orig/grp/tst_fgetgrent.sh glibc-2.13/grp/tst_fgetgrent.sh ---- glibc-2.13.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 -+++ glibc-2.13/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,7 +24,8 @@ - rtld_installed_name=$1; shift - - testout=${common_objpfx}/grp/tst_fgetgrent.out --library_path=${common_objpfx} -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn - - result=0 - -diff -durN glibc-2.13.orig/iconvdata/run-iconv-test.sh glibc-2.13/iconvdata/run-iconv-test.sh ---- glibc-2.13.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 -+++ glibc-2.13/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -34,7 +34,7 @@ - export GCONV_PATH - - # We have to have some directories in the library path. --LIBPATH=$codir:$codir/iconvdata -+LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn - - # How the start the iconv(1) program. - ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ -diff -durN glibc-2.13.orig/iconvdata/tst-table.sh glibc-2.13/iconvdata/tst-table.sh ---- glibc-2.13.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 -+++ glibc-2.13/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -59,8 +59,11 @@ - irreversible=${charset}.irreversible - fi - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # iconv in one direction. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-table-from ${charset} \ - > ${objpfx}tst-${charset}.table - -diff -durN glibc-2.13.orig/intl/tst-codeset.sh glibc-2.13/intl/tst-codeset.sh ---- glibc-2.13.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 -+++ glibc-2.13/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -37,6 +37,9 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - ${common_objpfx}elf/ld.so --library-path $common_objpfx \ - ${objpfx}tst-codeset > ${objpfx}tst-codeset.out - -diff -durN glibc-2.13.orig/intl/tst-gettext.sh glibc-2.13/intl/tst-gettext.sh ---- glibc-2.13.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 -+++ glibc-2.13/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -51,9 +51,12 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. - MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.13.orig/intl/tst-gettext2.sh glibc-2.13/intl/tst-gettext2.sh ---- glibc-2.13.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 -+++ glibc-2.13/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -65,8 +65,11 @@ - LOCPATH=${objpfx}domaindir - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && - cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.13.orig/malloc/tst-mtrace.sh glibc-2.13/malloc/tst-mtrace.sh ---- glibc-2.13.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 -+++ glibc-2.13/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,9 +24,12 @@ - status=0 - trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ - LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${common_objpfx}malloc/tst-mtrace || status=1 - - if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then -diff -durN glibc-2.13.orig/nptl/tst-tls6.sh glibc-2.13/nptl/tst-tls6.sh ---- glibc-2.13.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 -+++ glibc-2.13/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -5,8 +5,8 @@ - rtld_installed_name=$1; shift - logfile=$common_objpfx/nptl/tst-tls6.out - --# We have to find libc and nptl --library_path=${common_objpfx}:${common_objpfx}nptl -+# We have to find libc and nptl (also libdl in case sandbox is in use) -+library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn - tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}/nptl/tst-tls5" - -diff -durN glibc-2.13.orig/posix/globtest.sh glibc-2.13/posix/globtest.sh ---- glibc-2.13.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 -+++ glibc-2.13/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -18,7 +18,7 @@ - esac - - # We have to find the libc and the NSS modules. --library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod -+library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn - - # Since we use `sort' we must make sure to use the same locale everywhere. - LC_ALL=C -diff -durN glibc-2.13.orig/posix/tst-getconf.sh glibc-2.13/posix/tst-getconf.sh ---- glibc-2.13.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 -+++ glibc-2.13/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -10,7 +10,10 @@ - else - rtld_installed_name=$1; shift - runit() { -- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" -+ -+ # make sure libdl is also in path in case sandbox is in use -+ library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" - } - fi - -diff -durN glibc-2.13.orig/posix/wordexp-tst.sh glibc-2.13/posix/wordexp-tst.sh ---- glibc-2.13.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 -+++ glibc-2.13/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -19,8 +19,11 @@ - " - export IFS - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - failed=0 --${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ -+${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 - cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 - wordexp returned 0 diff --git a/packages/glibc-ports/2.14.1/380-dont-build-timezone.patch b/packages/glibc-ports/2.14.1/380-dont-build-timezone.patch deleted file mode 100644 index 11c358e..0000000 --- a/packages/glibc-ports/2.14.1/380-dont-build-timezone.patch +++ /dev/null @@ -1,14 +0,0 @@ -timezone data has been split into the package sys-libs/timezone-data - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 -+++ glibc-2.13/Makeconfig 2009-11-13 00:50:41.000000000 +0100 -@@ -944,7 +944,7 @@ - stdlib stdio-common libio malloc string wcsmbs time dirent \ - grp pwd posix io termios resource misc socket sysvipc gmon \ - gnulib iconv iconvdata wctype manual shadow gshadow po argp \ -- crypt nss localedata timezone rt conform debug \ -+ crypt nss localedata rt conform debug \ - $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) - - ifndef avoid-generated diff --git a/packages/glibc-ports/2.14.1/400-alpha-xstat.patch b/packages/glibc-ports/2.14.1/400-alpha-xstat.patch deleted file mode 100644 index 6e4ab8f..0000000 --- a/packages/glibc-ports/2.14.1/400-alpha-xstat.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -@@ -386,6 +386,11 @@ - # define __ASSUME_GETDENTS32_D_TYPE 1 - #endif - -+/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ -+#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ -+# define __ASSUME_STAT64_SYSCALL 1 -+#endif -+ - /* Starting with version 2.5.3, the initial location returned by `brk' - after exec is always rounded up to the next page. */ - #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/packages/glibc-ports/2.14.1/430-alpha-creat.patch b/packages/glibc-ports/2.14.1/430-alpha-creat.patch deleted file mode 100644 index da6ddda..0000000 --- a/packages/glibc-ports/2.14.1/430-alpha-creat.patch +++ /dev/null @@ -1,14 +0,0 @@ -alpha does not have a __NR_creat - -http://bugs.gentoo.org/227275 -http://sourceware.org/bugzilla/show_bug.cgi?id=6650 - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 -@@ -1 +1,5 @@ - /* Defined as alias for the syscall. */ -+#include -+#ifndef __NR_creat -+#include "../../../../../io/creat64.c" -+#endif diff --git a/packages/glibc-ports/2.14.1/440-alpha-cache-shape.patch b/packages/glibc-ports/2.14.1/440-alpha-cache-shape.patch index 8ca0bd6..989bfd7 100644 --- a/packages/glibc-ports/2.14.1/440-alpha-cache-shape.patch +++ b/packages/glibc-ports/2.14.1/440-alpha-cache-shape.patch @@ -5,9 +5,9 @@ duplication for static builds with dl-sysdep and dl-support. since dl-sysdep is both shared/static, there is no point in hooking dl-support anymore, so we can punt it. -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/dl-support.c ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 +diff -durN glibc-ports-2.14.1.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/dl-support.c +--- glibc-ports-2.14.1.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 @@ -1,2 +1,1 @@ -#include "dl-auxv.h" #include diff --git a/packages/glibc-ports/2.14.1/460-alpha-fix-gcc-4.1-warnings.patch b/packages/glibc-ports/2.14.1/460-alpha-fix-gcc-4.1-warnings.patch index c3e59f4..2ed4118 100644 --- a/packages/glibc-ports/2.14.1/460-alpha-fix-gcc-4.1-warnings.patch +++ b/packages/glibc-ports/2.14.1/460-alpha-fix-gcc-4.1-warnings.patch @@ -16,9 +16,9 @@ I cannot really think of anything better than ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/ioperm.c ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 +diff -durN glibc-ports-2.14.1.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/ioperm.c +--- glibc-ports-2.14.1.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 @@ -178,13 +178,13 @@ static inline void stb_mb(unsigned char val, unsigned long addr) @@ -53,4 +53,3 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/alpha/io return r; } -diff -durN glibc-2.14.1.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.14.1/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c diff --git a/packages/glibc-ports/2.14.1/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc-ports/2.14.1/490-alpha_alpha-add-fdatasync-support.patch deleted file mode 100644 index 372f34c..0000000 --- a/packages/glibc-ports/2.14.1/490-alpha_alpha-add-fdatasync-support.patch +++ /dev/null @@ -1,126 +0,0 @@ -2009-07-25 Aurelien Jarno - - * sysdeps/unix/sysv/linux/kernel-features.h: define - __ASSUME_FDATASYNC. - * sysdeps/unix/sysv/linux/fdatasync.c: New file. - * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with - -fexceptions. - * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. - - sysdeps/unix/sysv/linux/Makefile | 1 - sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ - sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ - sysdeps/unix/sysv/linux/syscalls.list | 1 - 4 files changed, 76 insertions(+), 1 deletion(-) - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.13/sysdeps/unix/sysv/linux/Makefile ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 -@@ -20,6 +20,7 @@ - setfsuid setfsgid makedev epoll_pwait signalfd \ - eventfd eventfd_read eventfd_write prlimit - -+CFLAGS-fdatasync.c = -fexceptions - CFLAGS-gethostid.c = -fexceptions - - sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 -@@ -0,0 +1,69 @@ -+/* fdatasync -- synchronize at least the data part of a file with -+ the underlying media. Linux version. -+ -+ Copyright (C) 2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+ -+#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC -+static int __have_no_fdatasync; -+#endif -+ -+static int -+do_fdatasync (int fd) -+{ -+#ifdef __ASSUME_FDATASYNC -+ return INLINE_SYSCALL (fdatasync, 1, fd); -+#elif defined __NR_fdatasync -+ if (!__builtin_expect (__have_no_fdatasync, 0)) -+ { -+ int result = INLINE_SYSCALL (fdatasync, 1, fd); -+ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) -+ return result; -+ -+ __have_no_fdatasync = 1; -+ } -+#endif -+ return INLINE_SYSCALL (fsync, 1, fd); -+} -+ -+int -+__fdatasync (int fd) -+{ -+ if (SINGLE_THREAD_P) -+ return do_fdatasync (fd); -+ -+ int oldtype = LIBC_CANCEL_ASYNC (); -+ -+ int result = do_fdatasync (fd); -+ -+ LIBC_CANCEL_RESET (oldtype); -+ -+ return result; -+} -+ -+weak_alias (__fdatasync, fdatasync) -+ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 -@@ -459,6 +459,12 @@ - # define __ASSUME_FUTEX_LOCK_PI 1 - #endif - -+/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it -+ was already present in 2.0 kernels on other architectures. */ -+#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) -+# define __ASSUME_FDATASYNC 1 -+#endif -+ - /* Support for utimensat syscall was added in 2.6.22, on SH - only after 2.6.22-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020616 \ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 -@@ -11,7 +11,6 @@ - epoll_create1 EXTRA epoll_create1 i:i epoll_create1 - epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl - epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait --fdatasync - fdatasync Ci:i fdatasync - flock - flock i:ii __flock flock - fork - fork i: __libc_fork __fork fork - get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/packages/glibc-ports/2.14.1/530-alpha-fix-rtld-fPIC.patch b/packages/glibc-ports/2.14.1/530-alpha-fix-rtld-fPIC.patch index 2691a99..56bc532 100644 --- a/packages/glibc-ports/2.14.1/530-alpha-fix-rtld-fPIC.patch +++ b/packages/glibc-ports/2.14.1/530-alpha-fix-rtld-fPIC.patch @@ -5,9 +5,9 @@ ports/sysdeps/alpha/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/alpha/Makefile glibc-2.14.1/glibc-ports-2.14.1/sysdeps/alpha/Makefile ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 +diff -durN glibc-ports-2.14.1.orig/sysdeps/alpha/Makefile glibc-ports-2.14.1/sysdeps/alpha/Makefile +--- glibc-ports-2.14.1.orig/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14.1/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 @@ -35,7 +35,8 @@ ifeq ($(subdir),elf) @@ -18,4 +18,3 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/alpha/Makefile glibc-2.1 endif # Build everything with full IEEE math support, and with dynamic rounding; -diff -durN glibc-2.14.1.orig/ports/sysdeps/alpha/Makefile glibc-2.14.1/ports/sysdeps/alpha/Makefile diff --git a/packages/glibc-ports/2.14.1/560-ppc-atomic.patch b/packages/glibc-ports/2.14.1/560-ppc-atomic.patch deleted file mode 100644 index ee1cb90..0000000 --- a/packages/glibc-ports/2.14.1/560-ppc-atomic.patch +++ /dev/null @@ -1,415 +0,0 @@ -sniped from suse - -Index: sysdeps/powerpc/bits/atomic.h -=================================================================== -RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v -retrieving revision 1.17 -diff -u -a -p -r1.17 atomic.h - -diff -durN glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h glibc-2.13/sysdeps/powerpc/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -85,14 +85,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -102,14 +102,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -118,12 +118,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -132,11 +132,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -144,12 +144,12 @@ - #define __arch_atomic_exchange_and_add_32(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stwcx. %1,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -157,12 +157,12 @@ - #define __arch_atomic_increment_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -170,27 +170,27 @@ - #define __arch_atomic_decrement_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_32(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ - " cmpwi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stwcx. %1,0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -60,14 +60,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp, __tmp2; \ - __asm __volatile (" clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -61,14 +61,14 @@ - unsigned int __tmp, __tmp2; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ - " clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -82,14 +82,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -98,14 +98,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -115,14 +115,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -132,14 +132,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -148,12 +148,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -162,11 +162,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -174,12 +174,12 @@ - #define __arch_atomic_exchange_and_add_64(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stdcx. %1,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -187,12 +187,12 @@ - #define __arch_atomic_increment_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -200,27 +200,27 @@ - #define __arch_atomic_decrement_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_64(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ - " cmpdi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stdcx. %1,0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) diff --git a/packages/glibc-ports/2.14.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/packages/glibc-ports/2.14.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch index 5e45682..80032ed 100644 --- a/packages/glibc-ports/2.14.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch +++ b/packages/glibc-ports/2.14.1/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch @@ -1,9 +1,9 @@ http://yann.poupet.free.fr/ep93xx/ Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/bits/endian.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/bits/endian.h ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/bits/endian.h glibc-ports-2.14.1/sysdeps/arm/bits/endian.h +--- glibc-ports-2.14.1.orig/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14.1/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100 @@ -12,7 +12,7 @@ /* FPA floating point units are always big-endian, irrespective of the CPU endianness. VFP floating point units use the same endianness @@ -13,9 +13,9 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/bits/endian.h glibc- #define __FLOAT_WORD_ORDER __BYTE_ORDER #else #define __FLOAT_WORD_ORDER __BIG_ENDIAN -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/fpu/__longjmp.S glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S +--- glibc-ports-2.14.1.orig/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100 @@ -30,7 +30,33 @@ movs r0, r1 /* get the return value in place */ moveq r0, #1 /* can't let setjmp() return zero! */ @@ -50,9 +50,9 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/__longjmp.S glib LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) END (__longjmp) -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/fpu/bits/fenv.h glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h +--- glibc-ports-2.14.1.orig/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100 @@ -20,6 +20,45 @@ # error "Never use directly; include instead." #endif @@ -108,9 +108,9 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/fenv.h glib /* Type representing exception flags. */ typedef unsigned long int fexcept_t; -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/fpu/bits/setjmp.h glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h +--- glibc-ports-2.14.1.orig/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100 @@ -28,7 +28,11 @@ #ifndef _ASM /* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not @@ -123,9 +123,9 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/bits/setjmp.h gl +#endif #endif -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/fpu/fegetround.c glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c +--- glibc-ports-2.14.1.orig/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100 @@ -18,9 +18,21 @@ 02111-1307 USA. */ @@ -148,9 +148,9 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fegetround.c gli + +#endif } -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/fpu/fesetround.c glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c +--- glibc-ports-2.14.1.orig/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100 @@ -18,12 +18,28 @@ 02111-1307 USA. */ @@ -180,9 +180,9 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fesetround.c gli } libm_hidden_def (fesetround) -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/fpu/fpu_control.h glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h +--- glibc-ports-2.14.1.orig/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100 @@ -1,5 +1,6 @@ /* FPU control word definitions. ARM version. - Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. @@ -278,9 +278,9 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/fpu_control.h gl +#endif + #endif /* _FPU_CONTROL_H */ -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h +--- glibc-ports-2.14.1.orig/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100 @@ -17,4 +17,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ @@ -290,9 +290,9 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/jmpbuf-offsets.h +#else #define __JMP_BUF_SP 20 +#endif -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/fpu/setjmp.S glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S +--- glibc-ports-2.14.1.orig/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100 @@ -24,11 +24,41 @@ ENTRY (__sigsetjmp) @@ -335,9 +335,9 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/fpu/setjmp.S glibc-2 /* Make a tail call to __sigjmp_save; it takes the same args. */ B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/gccframe.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/gccframe.h ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/gccframe.h glibc-ports-2.14.1/sysdeps/arm/gccframe.h +--- glibc-ports-2.14.1.orig/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14.1/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100 @@ -17,6 +17,10 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ @@ -349,9 +349,9 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/gccframe.h glibc-2.1 +#endif #include -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.1.orig/sysdeps/arm/gmp-mparam.h glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h +--- glibc-ports-2.14.1.orig/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100 @@ -29,7 +29,7 @@ #if defined(__ARMEB__) # define IEEE_DOUBLE_MIXED_ENDIAN 0 @@ -361,14 +361,3 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/arm/gmp-mparam.h glibc-2 # define IEEE_DOUBLE_MIXED_ENDIAN 0 # define IEEE_DOUBLE_BIG_ENDIAN 0 #else -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/bits/endian.h glibc-2.14.1/ports/sysdeps/arm/bits/endian.h -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/__longjmp.S glibc-2.14.1/ports/sysdeps/arm/fpu/__longjmp.S -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/bits/fenv.h glibc-2.14.1/ports/sysdeps/arm/fpu/bits/fenv.h -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/bits/setjmp.h glibc-2.14.1/ports/sysdeps/arm/fpu/bits/setjmp.h -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/fegetround.c glibc-2.14.1/ports/sysdeps/arm/fpu/fegetround.c -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/fesetround.c glibc-2.14.1/ports/sysdeps/arm/fpu/fesetround.c -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/fpu_control.h glibc-2.14.1/ports/sysdeps/arm/fpu/fpu_control.h -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.14.1/ports/sysdeps/arm/fpu/jmpbuf-offsets.h -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/fpu/setjmp.S glibc-2.14.1/ports/sysdeps/arm/fpu/setjmp.S -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/gccframe.h glibc-2.14.1/ports/sysdeps/arm/gccframe.h -diff -durN glibc-2.14.1.orig/ports/sysdeps/arm/gmp-mparam.h glibc-2.14.1/ports/sysdeps/arm/gmp-mparam.h diff --git a/packages/glibc-ports/2.14.1/580-nptl-lowlevellock.patch b/packages/glibc-ports/2.14.1/580-nptl-lowlevellock.patch index 6bf5250..62b74d8 100644 --- a/packages/glibc-ports/2.14.1/580-nptl-lowlevellock.patch +++ b/packages/glibc-ports/2.14.1/580-nptl-lowlevellock.patch @@ -9,9 +9,9 @@ In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: ../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.) ../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function) -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 +diff -durN glibc-ports-2.14.1.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +--- glibc-ports-2.14.1.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 @@ -25,6 +25,7 @@ #include #include @@ -20,4 +20,3 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/unix/sysv/linux/arm/nptl #define FUTEX_WAIT 0 #define FUTEX_WAKE 1 -diff -durN glibc-2.14.1.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.14.1/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h diff --git a/packages/glibc-ports/2.14.1/610-fpu-cw-mips.patch b/packages/glibc-ports/2.14.1/610-fpu-cw-mips.patch index e53ac78..4b8365a 100644 --- a/packages/glibc-ports/2.14.1/610-fpu-cw-mips.patch +++ b/packages/glibc-ports/2.14.1/610-fpu-cw-mips.patch @@ -1,8 +1,8 @@ http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html -diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/mips/fpu_control.h glibc-2.14.1/glibc-ports-2.14.1/sysdeps/mips/fpu_control.h ---- glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14.1/glibc-ports-2.14.1/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 +diff -durN glibc-ports-2.14.1.orig/sysdeps/mips/fpu_control.h glibc-ports-2.14.1/sysdeps/mips/fpu_control.h +--- glibc-ports-2.14.1.orig/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14.1/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 @@ -86,7 +86,7 @@ #define _FPU_RC_UP 0x2 #define _FPU_RC_DOWN 0x3 @@ -12,4 +12,3 @@ diff -durN glibc-2.14.1.orig/glibc-ports-2.14.1/sysdeps/mips/fpu_control.h glibc /* The fdlibm code requires strict IEEE double precision arithmetic, -diff -durN glibc-2.14.1.orig/ports/sysdeps/mips/fpu_control.h glibc-2.14.1/ports/sysdeps/mips/fpu_control.h diff --git a/packages/glibc-ports/2.14.1/630-mips_shn_undef-hack.patch b/packages/glibc-ports/2.14.1/630-mips_shn_undef-hack.patch deleted file mode 100644 index 791d76c..0000000 --- a/packages/glibc-ports/2.14.1/630-mips_shn_undef-hack.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -durN glibc-2.13.orig/elf/dl-lookup.c glibc-2.13/elf/dl-lookup.c ---- glibc-2.13.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 -+++ glibc-2.13/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 -@@ -301,6 +301,12 @@ - /* FALLTHROUGH */ - case STB_GLOBAL: - success: -+#ifdef __mips__ -+ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF -+ symbols, we skip them. */ -+ if (sym->st_shndx == SHN_UNDEF) -+ break; -+#endif - /* Global definition. Just what we need. */ - result->s = sym; - result->m = (struct link_map *) map; diff --git a/packages/glibc-ports/2.14.1/640-alpha-atfcts.patch b/packages/glibc-ports/2.14.1/640-alpha-atfcts.patch deleted file mode 100644 index 7a8a94a..0000000 --- a/packages/glibc-ports/2.14.1/640-alpha-atfcts.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 -@@ -437,7 +437,8 @@ - the code. On PPC they were introduced in 2.6.17-rc1, - on SH in 2.6.19-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020611 \ -- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) -+ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ -+ && (!defined __alpha__) - # define __ASSUME_ATFCTS 1 - #endif - diff --git a/packages/glibc-ports/2.14.1/650-syslog.patch b/packages/glibc-ports/2.14.1/650-syslog.patch deleted file mode 100644 index c20cafc..0000000 --- a/packages/glibc-ports/2.14.1/650-syslog.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c ---- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 -+++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 -@@ -152,7 +152,7 @@ - #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID - /* Check for invalid bits. */ - if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { -- syslog(INTERNALLOG, -+ __syslog(INTERNALLOG, - "syslog: unknown facility/priority: %x", pri); - pri &= LOG_PRIMASK|LOG_FACMASK; - } diff --git a/packages/glibc-ports/2.14.1/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc-ports/2.14.1/660-debug-readlink_chk-readklinkat_chk.patch deleted file mode 100644 index a5a7052..0000000 --- a/packages/glibc-ports/2.14.1/660-debug-readlink_chk-readklinkat_chk.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c ---- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 -+++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 -@@ -25,7 +25,7 @@ - - - ssize_t --__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) -+__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) - { - if (len > buflen) - __chk_fail (); -diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c ---- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 -+++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 -@@ -21,7 +21,7 @@ - - - ssize_t --__readlinkat_chk (int fd, const char *path, void *buf, size_t len, -+__readlinkat_chk (int fd, const char *path, char *buf, size_t len, - size_t buflen) - { - if (len > buflen) diff --git a/packages/glibc-ports/2.14/090-Fix-ARM-build-with-GCC-trunk.patch b/packages/glibc-ports/2.14/090-Fix-ARM-build-with-GCC-trunk.patch index 1a632fe..259b285 100644 --- a/packages/glibc-ports/2.14/090-Fix-ARM-build-with-GCC-trunk.patch +++ b/packages/glibc-ports/2.14/090-Fix-ARM-build-with-GCC-trunk.patch @@ -20,8 +20,8 @@ Tested that this fixes the build for ARM. sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c ++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c @@ -23,7 +23,8 @@ #include @@ -35,8 +35,8 @@ Tested that this fixes the build for ARM. static _Unwind_Reason_Code (*libgcc_s_forcedunwind) diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c index bff3e2b..1f1eb71 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c +--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c ++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c @@ -21,7 +21,8 @@ #include #include @@ -47,8 +47,8 @@ index bff3e2b..1f1eb71 100644 static _Unwind_Reason_Code (*libgcc_s_personality) (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, struct _Unwind_Context *); ---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c +--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c ++++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c @@ -23,7 +23,8 @@ #include @@ -59,8 +59,8 @@ index bff3e2b..1f1eb71 100644 static _Unwind_Reason_Code (*libgcc_s_personality) (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); static _Unwind_Reason_Code (*libgcc_s_forcedunwind) ---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c +--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c ++++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c @@ -21,7 +21,8 @@ #include #include diff --git a/packages/glibc-ports/2.14/100-respect-env-CPPFLAGS.patch b/packages/glibc-ports/2.14/100-respect-env-CPPFLAGS.patch deleted file mode 100644 index 3798cb2..0000000 --- a/packages/glibc-ports/2.14/100-respect-env-CPPFLAGS.patch +++ /dev/null @@ -1,14 +0,0 @@ -Respect environment CPPFLAGS when we run ./configure so we can inject -random -D things without having to set CFLAGS/ASFLAGS - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 -+++ glibc-2.13/Makeconfig 2009-11-13 00:49:41.000000000 +0100 -@@ -697,6 +697,7 @@ - $(foreach lib,$(libof-$(basename $(@F))) \ - $(libof-$(field.le_next)) - -+#define LIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = LIST_FIRST((head)); \ -+ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - /* - * List access methods. - */ -@@ -197,6 +202,16 @@ - #define SLIST_FOREACH(var, head, field) \ - for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) - -+#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = SLIST_FIRST((head)); \ -+ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ -+#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ -+ for ((varp) = &SLIST_FIRST((head)); \ -+ ((var) = *(varp)) != NULL; \ -+ (varp) = &SLIST_NEXT((var), field)) -+ - /* - * Singly-linked List access methods. - */ -@@ -242,6 +257,12 @@ - (head)->stqh_last = &(elm)->field.stqe_next; \ - } while (/*CONSTCOND*/0) - -+#define STAILQ_LAST(head, type, field) \ -+ (STAILQ_EMPTY((head)) ? \ -+ NULL : \ -+ ((struct type *)(void *) \ -+ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) -+ - #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ - (head)->stqh_last = &(elm)->field.stqe_next; \ -@@ -271,6 +292,11 @@ - (var); \ - (var) = ((var)->field.stqe_next)) - -+#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = STAILQ_FIRST((head)); \ -+ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define STAILQ_CONCAT(head1, head2) do { \ - if (!STAILQ_EMPTY((head2))) { \ - *(head1)->stqh_last = (head2)->stqh_first; \ -@@ -437,11 +463,21 @@ - (var); \ - (var) = ((var)->field.tqe_next)) - -+#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = TAILQ_FIRST((head)); \ -+ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ - for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ - (var); \ - (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) - -+#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ -+ for ((var) = TAILQ_LAST((head), headname); \ -+ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_CONCAT(head1, head2, field) do { \ - if (!TAILQ_EMPTY(head2)) { \ - *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/packages/glibc-ports/2.14/160-manual-no-perl.patch b/packages/glibc-ports/2.14/160-manual-no-perl.patch deleted file mode 100644 index 5e2b807..0000000 --- a/packages/glibc-ports/2.14/160-manual-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.13.orig/manual/Makefile glibc-2.13/manual/Makefile ---- glibc-2.13.orig/manual/Makefile 2006-01-08 07:43:47.000000000 +0100 -+++ glibc-2.13/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/packages/glibc-ports/2.14/170-localedef-fix-trampoline.patch b/packages/glibc-ports/2.14/170-localedef-fix-trampoline.patch deleted file mode 100644 index 3cc6559..0000000 --- a/packages/glibc-ports/2.14/170-localedef-fix-trampoline.patch +++ /dev/null @@ -1,53 +0,0 @@ -# DP: Description: Fix localedef segfault when run under exec-shield, -# PaX or similar. (#231438, #198099) -# DP: Dpatch Author: James Troup -# DP: Patch Author: (probably) Jakub Jelinek -# DP: Upstream status: Unknown -# DP: Status Details: Unknown -# DP: Date: 2004-03-16 -diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h ---- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 -+++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 -@@ -203,6 +203,42 @@ - } - } - } -+ -+/* GCC ATM seems to do a poor job with pointers to nested functions passed -+ to inlined functions. Help it a little bit with this hack. */ -+#define wchead_table_iterate(tp, fn) \ -+do \ -+ { \ -+ struct wchead_table *t = (tp); \ -+ uint32_t index1; \ -+ for (index1 = 0; index1 < t->level1_size; index1++) \ -+ { \ -+ uint32_t lookup1 = t->level1[index1]; \ -+ if (lookup1 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup1_shifted = lookup1 << t->q; \ -+ uint32_t index2; \ -+ for (index2 = 0; index2 < (1 << t->q); index2++) \ -+ { \ -+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ -+ if (lookup2 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup2_shifted = lookup2 << t->p; \ -+ uint32_t index3; \ -+ for (index3 = 0; index3 < (1 << t->p); index3++) \ -+ { \ -+ struct element_t *lookup3 \ -+ = t->level3[index3 + lookup2_shifted]; \ -+ if (lookup3 != NULL) \ -+ fn ((((index1 << t->q) + index2) << t->p) + index3, \ -+ lookup3); \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } while (0) -+ - #endif - - #ifndef NO_FINALIZE diff --git a/packages/glibc-ports/2.14/180-resolv-dynamic.patch b/packages/glibc-ports/2.14/180-resolv-dynamic.patch deleted file mode 100644 index e916bce..0000000 --- a/packages/glibc-ports/2.14/180-resolv-dynamic.patch +++ /dev/null @@ -1,39 +0,0 @@ -ripped from SuSE - -if /etc/resolv.conf is updated, then make sure applications -already running get the updated information. - -http://bugs.gentoo.org/177416 - -diff -durN glibc-2.13.orig/resolv/res_libc.c glibc-2.13/resolv/res_libc.c ---- glibc-2.13.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 -+++ glibc-2.13/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - - /* The following bit is copied from res_data.c (where it is #ifdef'ed -@@ -95,6 +96,20 @@ - __res_maybe_init (res_state resp, int preinit) - { - if (resp->options & RES_INIT) { -+ static time_t last_mtime, last_check; -+ time_t now; -+ struct stat statbuf; -+ -+ time (&now); -+ if (now != last_check) { -+ last_check = now; -+ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { -+ last_mtime = statbuf.st_mtime; -+ atomicinclock (lock); -+ atomicinc (__res_initstamp); -+ atomicincunlock (lock); -+ } -+ } - if (__res_initstamp != resp->_u._ext.initstamp) { - if (resp->nscount > 0) - __res_iclose (resp, true); diff --git a/packages/glibc-ports/2.14/190-localedef-mmap.patch b/packages/glibc-ports/2.14/190-localedef-mmap.patch deleted file mode 100644 index f3914cd..0000000 --- a/packages/glibc-ports/2.14/190-localedef-mmap.patch +++ /dev/null @@ -1,39 +0,0 @@ -sniped from Debian -http://bugs.gentoo.org/289615 - -2009-10-27 Aurelien Jarno - - * locale/programs/locarchive.c: use MMAP_SHARED to reserve memory - used later with MMAP_FIXED | MMAP_SHARED to cope with different - alignment restrictions. - -diff -durN glibc-2.13.orig/locale/programs/locarchive.c glibc-2.13/locale/programs/locarchive.c ---- glibc-2.13.orig/locale/programs/locarchive.c 2009-04-27 16:07:47.000000000 +0200 -+++ glibc-2.13/locale/programs/locarchive.c 2009-11-13 00:50:01.000000000 +0100 -@@ -134,7 +134,7 @@ - size_t reserved = RESERVE_MMAP_SIZE; - int xflags = 0; - if (total < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else -@@ -396,7 +396,7 @@ - size_t reserved = RESERVE_MMAP_SIZE; - int xflags = 0; - if (total < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else -@@ -614,7 +614,7 @@ - int xflags = 0; - void *p; - if (st.st_size < reserved -- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, -+ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, - -1, 0)) != MAP_FAILED)) - xflags = MAP_FIXED; - else diff --git a/packages/glibc-ports/2.14/200-fadvise64_64.patch b/packages/glibc-ports/2.14/200-fadvise64_64.patch deleted file mode 100644 index 71bca38..0000000 --- a/packages/glibc-ports/2.14/200-fadvise64_64.patch +++ /dev/null @@ -1,28 +0,0 @@ -ripped from Debian - - sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 -@@ -35,6 +35,19 @@ - return INTERNAL_SYSCALL_ERRNO (ret, err); - return 0; - #else -+# ifdef __NR_fadvise64_64 -+ INTERNAL_SYSCALL_DECL (err); -+ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, -+ __LONG_LONG_PAIR ((long) (offset >> 31), -+ (long) offset), -+ __LONG_LONG_PAIR ((long) (len >> 31), -+ (long) len), -+ advise); -+ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) -+ return INTERNAL_SYSCALL_ERRNO (ret, err); -+ return 0; -+# else - return ENOSYS; -+# endif - #endif - } diff --git a/packages/glibc-ports/2.14/220-section-comments.patch b/packages/glibc-ports/2.14/220-section-comments.patch deleted file mode 100644 index d717829..0000000 --- a/packages/glibc-ports/2.14/220-section-comments.patch +++ /dev/null @@ -1,24 +0,0 @@ -http://sources.redhat.com/ml/binutils/2004-04/msg00665.html - -fixes building on some architectures (like m68k/arm/cris/etc...) because -it does the right thing - -diff -durN glibc-2.13.orig/include/libc-symbols.h glibc-2.13/include/libc-symbols.h ---- glibc-2.13.orig/include/libc-symbols.h 2009-03-14 00:51:46.000000000 +0100 -+++ glibc-2.13/include/libc-symbols.h 2009-11-13 00:50:07.000000000 +0100 -@@ -239,12 +239,12 @@ - # define __make_section_unallocated(section_string) - # endif - --/* Tacking on "\n\t#" to the section name makes gcc put it's bogus -+/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus - section attributes on what looks like a comment to the assembler. */ - # ifdef HAVE_SECTION_QUOTES --# define __sec_comment "\"\n\t#\"" -+# define __sec_comment "\"\n#APP\n\t#\"" - # else --# define __sec_comment "\n\t#" -+# define __sec_comment "\n#APP\n\t#" - # endif - # define link_warning(symbol, msg) \ - __make_section_unallocated (".gnu.warning." #symbol) \ diff --git a/packages/glibc-ports/2.14/230-no-inline-gmon.patch b/packages/glibc-ports/2.14/230-no-inline-gmon.patch deleted file mode 100644 index fa33c2b..0000000 --- a/packages/glibc-ports/2.14/230-no-inline-gmon.patch +++ /dev/null @@ -1,36 +0,0 @@ -http://bugs.gentoo.org/196245 -http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html - -Attached is a patch to add __attribute__ ((noinline)) to -call_gmon_start. - -Without this patch, the sec script that processed initfini.s removes a -part of inlined call_gmon_start, causing undefined label errors. - -This patch solves the problem by forcing gcc not to inline -call_gmon_start with __attribute__ ((noinline)). - -Tested by building for arm-none-lixux-gnueabi. OK to apply? - -Kazu Hirata - -2006-05-07 Kazu Hirata <kazu@codesourcery.com> - - * sysdeps/generic/initfini.c (call_gmon_start): Add - __attribute__ ((noinline)). - -Index: sysdeps/generic/initfini.c -=================================================================== - -diff -durN glibc-2.13.orig/sysdeps/generic/initfini.c glibc-2.13/sysdeps/generic/initfini.c ---- glibc-2.13.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200 -+++ glibc-2.13/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100 -@@ -70,7 +70,7 @@ - /* The beginning of _init: */ - asm ("\n/*@_init_PROLOG_BEGINS*/"); - --static void -+static void __attribute__ ((noinline)) - call_gmon_start(void) - { - extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ diff --git a/packages/glibc-ports/2.14/240-check_native-headers.patch b/packages/glibc-ports/2.14/240-check_native-headers.patch deleted file mode 100644 index c936f71..0000000 --- a/packages/glibc-ports/2.14/240-check_native-headers.patch +++ /dev/null @@ -1,17 +0,0 @@ -many ports hit this warning: -../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' -../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' - -snipped from suse - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/check_native.c glibc-2.13/sysdeps/unix/sysv/linux/check_native.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/check_native.c 2007-11-24 04:12:17.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/check_native.c 2009-11-13 00:50:11.000000000 +0100 -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - #include - #include - #include diff --git a/packages/glibc-ports/2.14/260-assume-pipe2.patch b/packages/glibc-ports/2.14/260-assume-pipe2.patch deleted file mode 100644 index 42e8f4e..0000000 --- a/packages/glibc-ports/2.14/260-assume-pipe2.patch +++ /dev/null @@ -1,40 +0,0 @@ -http://bugs.gentoo.org/250342 -http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 - -we cant assume sock_cloexec and pipe2 are bound together as the former defines -are found in glibc only while the latter are a combo of kernel headers and -glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub -inside of glibc, we hit a problem. for example: - -#include -#include -main() -{ - getgrnam("portage"); - if (!popen("ls", "r")) - perror("popen()"); -} - -getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both -__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against -older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS -stub for it. so popen() will always fail as glibc assumes pipe2() works. - -diff -durN glibc-2.13.orig/socket/have_sock_cloexec.c glibc-2.13/socket/have_sock_cloexec.c ---- glibc-2.13.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 -+++ glibc-2.13/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 -@@ -16,9 +16,14 @@ - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -+#include - #include - #include - - #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC - int __have_sock_cloexec; - #endif -+ -+#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 -+int __have_pipe2; -+#endif diff --git a/packages/glibc-ports/2.14/270-china.patch b/packages/glibc-ports/2.14/270-china.patch deleted file mode 100644 index 41d7759..0000000 --- a/packages/glibc-ports/2.14/270-china.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.13.orig/localedata/locales/zh_TW glibc-2.13/localedata/locales/zh_TW ---- glibc-2.13.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 -+++ glibc-2.13/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 -@@ -1,7 +1,7 @@ - comment_char % - escape_char / - % --% Chinese language locale for Taiwan R.O.C. -+% Chinese language locale for Taiwan - % charmap: BIG5-CP950 - % - % Original Author: -@@ -17,7 +17,7 @@ - % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf - - LC_IDENTIFICATION --title "Chinese locale for Taiwan R.O.C." -+title "Chinese locale for Taiwan" - source "" - address "" - contact "" -@@ -25,7 +25,7 @@ - tel "" - fax "" - language "Chinese" --territory "Taiwan R.O.C." -+territory "Taiwan" - revision "0.2" - date "2000-08-02" - % diff --git a/packages/glibc-ports/2.14/280-new-valencian-locale.patch b/packages/glibc-ports/2.14/280-new-valencian-locale.patch deleted file mode 100644 index 4cdd108..0000000 --- a/packages/glibc-ports/2.14/280-new-valencian-locale.patch +++ /dev/null @@ -1,115 +0,0 @@ -http://bugs.gentoo.org/show_bug.cgi?id=131815 -http://sourceware.org/bugzilla/show_bug.cgi?id=2522 - -diff -durN glibc-2.13.orig/localedata/SUPPORTED glibc-2.13/localedata/SUPPORTED ---- glibc-2.13.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 -+++ glibc-2.13/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 -@@ -72,6 +72,8 @@ - ca_ES.UTF-8/UTF-8 \ - ca_ES/ISO-8859-1 \ - ca_ES@euro/ISO-8859-15 \ -+ca_ES.UTF-8@valencia/UTF-8 \ -+ca_ES@valencia/ISO-8859-15 \ - ca_FR.UTF-8/UTF-8 \ - ca_FR/ISO-8859-15 \ - ca_IT.UTF-8/UTF-8 \ -diff -durN glibc-2.13.orig/localedata/locales/ca_ES@valencia glibc-2.13/localedata/locales/ca_ES@valencia ---- glibc-2.13.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.13/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 -@@ -0,0 +1,96 @@ -+comment_char % -+escape_char / -+% -+% Valencian (southern Catalan) locale for Spain with Euro -+% -+% Note that this locale is almost the same as ca_ES@euro. The point of having -+% a separate locale is only for PO translations, which have a lot of social -+% support and are very appreciated by the Valencian-speaking community. -+% -+% Contact: Jordi Mallach -+% Email: jordi@gnu.org -+% Tel: -+% Fax: -+% Language: ca -+% Territory: ES -+% Option: euro -+% Revision: 1.0 -+% Date: 2006-04-06 -+% Application: general -+% Users: general -+% Repertoiremap: mnemonic,ds -+% Charset: ISO-8859-15 -+% Distribution and use is free, also -+% for commercial purposes. -+ -+LC_IDENTIFICATION -+title "Valencian (southern Catalan) locale for Spain with Euro" -+source "" -+address "" -+contact "Jordi Mallach" -+email "jordi@gnu.org" -+tel "" -+fax "" -+language "Catalan" -+territory "Spain" -+revision "1.0" -+date "2006-04-06" -+% -+category "ca_ES@valencia:2006";LC_IDENTIFICATION -+category "ca_ES@valencia:2006";LC_CTYPE -+category "ca_ES@valencia:2006";LC_COLLATE -+category "ca_ES@valencia:2006";LC_MONETARY -+category "ca_ES@valencia:2006";LC_NUMERIC -+category "ca_ES@valencia:2006";LC_TIME -+category "ca_ES@valencia:2006";LC_MESSAGES -+category "ca_ES@valencia:2006";LC_PAPER -+category "ca_ES@valencia:2006";LC_NAME -+category "ca_ES@valencia:2006";LC_ADDRESS -+category "ca_ES@valencia:2006";LC_TELEPHONE -+category "ca_ES@valencia:2006";LC_MEASUREMENT -+ -+END LC_IDENTIFICATION -+ -+LC_CTYPE -+copy "i18n" -+END LC_CTYPE -+ -+LC_COLLATE -+copy "ca_ES" -+END LC_COLLATE -+ -+LC_MONETARY -+copy "ca_ES" -+END LC_MONETARY -+ -+LC_NUMERIC -+copy "ca_ES" -+END LC_NUMERIC -+ -+LC_TIME -+copy "ca_ES" -+END LC_TIME -+ -+LC_MESSAGES -+copy "ca_ES" -+END LC_MESSAGES -+ -+LC_PAPER -+copy "ca_ES" -+END LC_PAPER -+ -+LC_NAME -+copy "ca_ES" -+END LC_NAME -+ -+LC_ADDRESS -+copy "ca_ES" -+END LC_ADDRESS -+ -+LC_TELEPHONE -+copy "ca_ES" -+END LC_TELEPHONE -+ -+LC_MEASUREMENT -+copy "ca_ES" -+END LC_MEASUREMENT diff --git a/packages/glibc-ports/2.14/300-nscd-one-fork.patch b/packages/glibc-ports/2.14/300-nscd-one-fork.patch deleted file mode 100644 index adc9b3f..0000000 --- a/packages/glibc-ports/2.14/300-nscd-one-fork.patch +++ /dev/null @@ -1,40 +0,0 @@ -only fork one to assist in stop-start-daemon assumptions about daemon behavior - -http://bugs.gentoo.org/190785 - -diff -durN glibc-2.13.orig/nscd/nscd.c glibc-2.13/nscd/nscd.c ---- glibc-2.13.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 -+++ glibc-2.13/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 -@@ -182,6 +182,9 @@ - if (pid != 0) - exit (0); - -+ if (write_pid (_PATH_NSCDPID) < 0) -+ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -+ - int nullfd = open (_PATH_DEVNULL, O_RDWR); - if (nullfd != -1) - { -@@ -231,12 +234,6 @@ - for (i = min_close_fd; i < getdtablesize (); i++) - close (i); - -- pid = fork (); -- if (pid == -1) -- error (EXIT_FAILURE, errno, _("cannot fork")); -- if (pid != 0) -- exit (0); -- - setsid (); - - if (chdir ("/") != 0) -@@ -245,9 +242,6 @@ - - openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); - -- if (write_pid (_PATH_NSCDPID) < 0) -- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -- - if (!init_logfile ()) - dbg_log (_("Could not create log file")); - diff --git a/packages/glibc-ports/2.14/310-hppa-nptl-carlos.patch b/packages/glibc-ports/2.14/310-hppa-nptl-carlos.patch deleted file mode 100644 index 4c028b2..0000000 --- a/packages/glibc-ports/2.14/310-hppa-nptl-carlos.patch +++ /dev/null @@ -1,246 +0,0 @@ - - -diff -durN glibc-2.13.orig/elf/rtld.c glibc-2.13/elf/rtld.c ---- glibc-2.13.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 -+++ glibc-2.13/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 -@@ -392,14 +392,14 @@ - know it is available. We do not have to clear the memory if we - do not have to use the temporary bootstrap_map. Global variables - are initialized to zero by default. */ --#ifndef DONT_USE_BOOTSTRAP_MAP -+#if !defined DONT_USE_BOOTSTRAP_MAP - # ifdef HAVE_BUILTIN_MEMSET - __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); - # else -- for (size_t cnt = 0; -- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); -- ++cnt) -- bootstrap_map.l_info[cnt] = 0; -+ /* Clear the whole bootstrap_map structure */ -+ for (char *cnt = (char *)&(bootstrap_map); -+ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); -+ *cnt++ = '\0'); - # endif - # if USE___THREAD - bootstrap_map.l_tls_modid = 0; -diff -durN glibc-2.13.orig/include/atomic.h glibc-2.13/include/atomic.h ---- glibc-2.13.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 -+++ glibc-2.13/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 -@@ -185,7 +185,7 @@ - __typeof (*(mem)) __atg5_value = (newvalue); \ - \ - do \ -- __atg5_oldval = *__atg5_memp; \ -+ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ - __atg5_oldval), 0)); \ -@@ -206,7 +206,7 @@ - __typeof (*(mem)) __atg6_value = (value); \ - \ - do \ -- __atg6_oldval = *__atg6_memp; \ -+ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ - __atg6_oldval \ -@@ -224,7 +224,7 @@ - __typeof (*(mem)) __atg7_value = (value); \ - \ - do \ -- __atg7_oldv = *__atg7_memp; \ -+ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ - __atg7_oldv \ -@@ -242,7 +242,7 @@ - __typeof (mem) __atg8_memp = (mem); \ - __typeof (*(mem)) __atg8_value = (value); \ - do { \ -- __atg8_oldval = *__atg8_memp; \ -+ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ - if (__atg8_oldval >= __atg8_value) \ - break; \ - } while (__builtin_expect \ -@@ -259,7 +259,7 @@ - __typeof (mem) __atg9_memp = (mem); \ - __typeof (*(mem)) __atg9_value = (value); \ - do { \ -- __atg9_oldv = *__atg9_memp; \ -+ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ - if (__atg9_oldv >= __atg9_value) \ - break; \ - } while (__builtin_expect \ -@@ -277,7 +277,7 @@ - __typeof (mem) __atg10_memp = (mem); \ - __typeof (*(mem)) __atg10_value = (value); \ - do { \ -- __atg10_oldval = *__atg10_memp; \ -+ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ - if (__atg10_oldval <= __atg10_value) \ - break; \ - } while (__builtin_expect \ -@@ -361,7 +361,7 @@ - \ - do \ - { \ -- __atg11_oldval = *__atg11_memp; \ -+ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ - if (__builtin_expect (__atg11_oldval <= 0, 0)) \ - break; \ - } \ -@@ -400,7 +400,7 @@ - __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ - \ - do \ -- __atg14_old = (*__atg14_memp); \ -+ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ - __atg14_old | __atg14_mask,\ -@@ -418,7 +418,7 @@ - __typeof (*(mem)) __atg15_mask = (mask); \ - \ - do \ -- __atg15_old = (*__atg15_memp); \ -+ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ - __atg15_old & __atg15_mask, \ -@@ -450,7 +450,7 @@ - __typeof (*(mem)) __atg16_mask = (mask); \ - \ - do \ -- __atg16_old = (*__atg16_memp); \ -+ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ - __atg16_old & __atg16_mask,\ -@@ -468,7 +468,7 @@ - __typeof (*(mem)) __atg17_mask = (mask); \ - \ - do \ -- __atg17_old = (*__atg17_memp); \ -+ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ - __atg17_old | __atg17_mask, \ -@@ -484,7 +484,7 @@ - __typeof (*(mem)) __atg18_mask = (mask); \ - \ - do \ -- __atg18_old = (*__atg18_memp); \ -+ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ - __atg18_old | __atg18_mask,\ -@@ -500,7 +500,7 @@ - __typeof (*(mem)) __atg19_mask = (mask); \ - \ - do \ -- __atg19_old = (*__atg19_memp); \ -+ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ - __atg19_old | __atg19_mask,\ -diff -durN glibc-2.13.orig/nptl/Makefile glibc-2.13/nptl/Makefile ---- glibc-2.13.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 -+++ glibc-2.13/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -265,9 +265,9 @@ - # Files which must not be linked with libpthread. - tests-nolibpthread = tst-unload - --# This sets the stack resource limit to 1023kb, which is not a multiple --# of the page size since every architecture's page size is > 1k. --tst-oddstacklimit-ENV = ; ulimit -s 1023; -+# This sets the stack resource limit to 8193kb, which is not a multiple -+# of the page size since every architecture's page size is 4096 bytes. -+tst-oddstacklimit-ENV = ; ulimit -s 8193; - - distribute = eintr.c tst-cleanup4aux.c - -@@ -426,6 +426,35 @@ - CFLAGS-tst-cleanupx4.c += -fexceptions - CFLAGS-tst-oncex3.c += -fexceptions - CFLAGS-tst-oncex4.c += -fexceptions -+ -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed -+LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) -+ - CFLAGS-tst-align.c += $(stack-align-test-flags) - CFLAGS-tst-align3.c += $(stack-align-test-flags) - CFLAGS-tst-initializers1.c = -W -Wall -Werror -diff -durN glibc-2.13.orig/nptl/pthread_barrier_wait.c glibc-2.13/nptl/pthread_barrier_wait.c ---- glibc-2.13.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 -+++ glibc-2.13/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 -@@ -64,7 +64,7 @@ - do - lll_futex_wait (&ibarrier->curr_event, event, - ibarrier->private ^ FUTEX_PRIVATE_FLAG); -- while (event == ibarrier->curr_event); -+ while (event == *(volatile unsigned int *)&ibarrier->curr_event); - } - - /* Make sure the init_count is stored locally or in a register. */ -diff -durN glibc-2.13.orig/nptl/sysdeps/pthread/Makefile glibc-2.13/nptl/sysdeps/pthread/Makefile ---- glibc-2.13.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 -+++ glibc-2.13/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -33,7 +33,9 @@ - - ifeq ($(have-forced-unwind),yes) - tests += tst-mqueue8x -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed - CFLAGS-tst-mqueue8x.c += -fexceptions -+LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) - endif - endif - -diff -durN glibc-2.13.orig/stdio-common/Makefile glibc-2.13/stdio-common/Makefile ---- glibc-2.13.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 -+++ glibc-2.13/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -82,7 +82,7 @@ - $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' - endif - --CFLAGS-vfprintf.c = -Wno-uninitialized -+CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch - CFLAGS-vfwprintf.c = -Wno-uninitialized - CFLAGS-tst-printf.c = -Wno-format - CFLAGS-tstdiomisc.c = -Wno-format -diff -durN glibc-2.13.orig/sunrpc/clnt_udp.c glibc-2.13/sunrpc/clnt_udp.c ---- glibc-2.13.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 -+++ glibc-2.13/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 -@@ -456,7 +456,7 @@ - while (inlen < 0 && errno == EINTR); - if (inlen < 0) - { -- if (errno == EWOULDBLOCK) -+ if (errno == EWOULDBLOCK || errno == EAGAIN) - continue; - cu->cu_error.re_errno = errno; - return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/packages/glibc-ports/2.14/330-m68k-sys-user.patch b/packages/glibc-ports/2.14/330-m68k-sys-user.patch index 28bcb11..fbc96d9 100644 --- a/packages/glibc-ports/2.14/330-m68k-sys-user.patch +++ b/packages/glibc-ports/2.14/330-m68k-sys-user.patch @@ -1,8 +1,8 @@ copied from kernel as it is sanitized now -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/m68k/sys/user.h ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 +diff -durN glibc-ports-2.14.orig/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-ports-2.14/sysdeps/unix/sysv/linux/m68k/sys/user.h +--- glibc-ports-2.14.orig/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 @@ -1,3 +1,90 @@ +#ifndef _SYS_USER_H +#define _SYS_USER_H @@ -94,4 +94,3 @@ diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/m68k/sys/use /* Copyright (C) 2008, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. -diff -durN glibc-2.14.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.14/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h diff --git a/packages/glibc-ports/2.14/340-dl_execstack-PaX-support.patch b/packages/glibc-ports/2.14/340-dl_execstack-PaX-support.patch deleted file mode 100644 index 2402af0..0000000 --- a/packages/glibc-ports/2.14/340-dl_execstack-PaX-support.patch +++ /dev/null @@ -1,66 +0,0 @@ - With latest versions of glibc, a lot of apps failed on a PaX enabled - system with: - cannot enable executable stack as shared object requires: Permission denied - - This is due to PaX 'exec-protecting' the stack, and ld.so then trying - to make the stack executable due to some libraries not containing the - PT_GNU_STACK section. Bug #32960. (12 Nov 2003). - - Patch also NPTL. Bug #116086. (20 Dec 2005). - -diff -durN glibc-2.13.orig/nptl/allocatestack.c glibc-2.13/nptl/allocatestack.c ---- glibc-2.13.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 -+++ glibc-2.13/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -329,7 +329,8 @@ - # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" - #endif - if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) -- return errno; -+ if (errno != EACCES) /* PAX is enabled */ -+ return errno; - - return 0; - } -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -63,7 +63,10 @@ - else - # endif - { -- result = errno; -+ if (errno == EACCES) /* PAX is enabled */ -+ result = 0; -+ else -+ result = errno; - goto out; - } - } -@@ -89,7 +92,12 @@ - page -= size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; -@@ -115,7 +123,12 @@ - page += size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; diff --git a/packages/glibc-ports/2.14/350-pre20040117-pt_pax.patch b/packages/glibc-ports/2.14/350-pre20040117-pt_pax.patch deleted file mode 100644 index f8f6b83..0000000 --- a/packages/glibc-ports/2.14/350-pre20040117-pt_pax.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.13.orig/elf/elf.h glibc-2.13/elf/elf.h ---- glibc-2.13.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 -+++ glibc-2.13/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 -@@ -580,6 +580,7 @@ - #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ - #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ - #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ -+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ - #define PT_LOSUNW 0x6ffffffa - #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ - #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ -@@ -593,6 +594,18 @@ - #define PF_X (1 << 0) /* Segment is executable */ - #define PF_W (1 << 1) /* Segment is writable */ - #define PF_R (1 << 2) /* Segment is readable */ -+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ -+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ -+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ -+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ -+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ -+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ -+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ -+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ -+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ -+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ -+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ -+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ - #define PF_MASKOS 0x0ff00000 /* OS-specific */ - #define PF_MASKPROC 0xf0000000 /* Processor-specific */ - diff --git a/packages/glibc-ports/2.14/360-tests-sandbox-libdl-paths.patch b/packages/glibc-ports/2.14/360-tests-sandbox-libdl-paths.patch deleted file mode 100644 index 9f78c52..0000000 --- a/packages/glibc-ports/2.14/360-tests-sandbox-libdl-paths.patch +++ /dev/null @@ -1,193 +0,0 @@ -when glibc runs its tests, it does so by invoking the local library loader. -in Gentoo, we build/run inside of our "sandbox" which itself is linked against -libdl (so that it can load libraries and pull out symbols). the trouble -is that when you upgrade from an older glibc to the new one, often times -internal symbols change name or abi. this is normally OK as you cannot use -libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so -we always say "keep all of the glibc libraries from the same build". but -when glibc runs its tests, it uses dynamic paths to point to its new local -copies of libraries. if the test doesnt use libdl, then glibc doesnt add -its path, and when sandbox triggers the loading of libdl, glibc does so -from the host system system. this gets us into the case of all libraries -are from the locally compiled version of glibc except for libdl.so. - -Fix by Wormo - -http://bugs.gentoo.org/56898 - -diff -durN glibc-2.13.orig/grp/tst_fgetgrent.sh glibc-2.13/grp/tst_fgetgrent.sh ---- glibc-2.13.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 -+++ glibc-2.13/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,7 +24,8 @@ - rtld_installed_name=$1; shift - - testout=${common_objpfx}/grp/tst_fgetgrent.out --library_path=${common_objpfx} -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn - - result=0 - -diff -durN glibc-2.13.orig/iconvdata/run-iconv-test.sh glibc-2.13/iconvdata/run-iconv-test.sh ---- glibc-2.13.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 -+++ glibc-2.13/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -34,7 +34,7 @@ - export GCONV_PATH - - # We have to have some directories in the library path. --LIBPATH=$codir:$codir/iconvdata -+LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn - - # How the start the iconv(1) program. - ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ -diff -durN glibc-2.13.orig/iconvdata/tst-table.sh glibc-2.13/iconvdata/tst-table.sh ---- glibc-2.13.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 -+++ glibc-2.13/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -59,8 +59,11 @@ - irreversible=${charset}.irreversible - fi - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # iconv in one direction. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-table-from ${charset} \ - > ${objpfx}tst-${charset}.table - -diff -durN glibc-2.13.orig/intl/tst-codeset.sh glibc-2.13/intl/tst-codeset.sh ---- glibc-2.13.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 -+++ glibc-2.13/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -37,6 +37,9 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - ${common_objpfx}elf/ld.so --library-path $common_objpfx \ - ${objpfx}tst-codeset > ${objpfx}tst-codeset.out - -diff -durN glibc-2.13.orig/intl/tst-gettext.sh glibc-2.13/intl/tst-gettext.sh ---- glibc-2.13.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 -+++ glibc-2.13/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -51,9 +51,12 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. - MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.13.orig/intl/tst-gettext2.sh glibc-2.13/intl/tst-gettext2.sh ---- glibc-2.13.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 -+++ glibc-2.13/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -65,8 +65,11 @@ - LOCPATH=${objpfx}domaindir - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && - cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.13.orig/malloc/tst-mtrace.sh glibc-2.13/malloc/tst-mtrace.sh ---- glibc-2.13.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 -+++ glibc-2.13/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,9 +24,12 @@ - status=0 - trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ - LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${common_objpfx}malloc/tst-mtrace || status=1 - - if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then -diff -durN glibc-2.13.orig/nptl/tst-tls6.sh glibc-2.13/nptl/tst-tls6.sh ---- glibc-2.13.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 -+++ glibc-2.13/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -5,8 +5,8 @@ - rtld_installed_name=$1; shift - logfile=$common_objpfx/nptl/tst-tls6.out - --# We have to find libc and nptl --library_path=${common_objpfx}:${common_objpfx}nptl -+# We have to find libc and nptl (also libdl in case sandbox is in use) -+library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn - tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}/nptl/tst-tls5" - -diff -durN glibc-2.13.orig/posix/globtest.sh glibc-2.13/posix/globtest.sh ---- glibc-2.13.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 -+++ glibc-2.13/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -18,7 +18,7 @@ - esac - - # We have to find the libc and the NSS modules. --library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod -+library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn - - # Since we use `sort' we must make sure to use the same locale everywhere. - LC_ALL=C -diff -durN glibc-2.13.orig/posix/tst-getconf.sh glibc-2.13/posix/tst-getconf.sh ---- glibc-2.13.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 -+++ glibc-2.13/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -10,7 +10,10 @@ - else - rtld_installed_name=$1; shift - runit() { -- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" -+ -+ # make sure libdl is also in path in case sandbox is in use -+ library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" - } - fi - -diff -durN glibc-2.13.orig/posix/wordexp-tst.sh glibc-2.13/posix/wordexp-tst.sh ---- glibc-2.13.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 -+++ glibc-2.13/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -19,8 +19,11 @@ - " - export IFS - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - failed=0 --${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ -+${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 - cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 - wordexp returned 0 diff --git a/packages/glibc-ports/2.14/380-dont-build-timezone.patch b/packages/glibc-ports/2.14/380-dont-build-timezone.patch deleted file mode 100644 index 11c358e..0000000 --- a/packages/glibc-ports/2.14/380-dont-build-timezone.patch +++ /dev/null @@ -1,14 +0,0 @@ -timezone data has been split into the package sys-libs/timezone-data - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 -+++ glibc-2.13/Makeconfig 2009-11-13 00:50:41.000000000 +0100 -@@ -944,7 +944,7 @@ - stdlib stdio-common libio malloc string wcsmbs time dirent \ - grp pwd posix io termios resource misc socket sysvipc gmon \ - gnulib iconv iconvdata wctype manual shadow gshadow po argp \ -- crypt nss localedata timezone rt conform debug \ -+ crypt nss localedata rt conform debug \ - $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) - - ifndef avoid-generated diff --git a/packages/glibc-ports/2.14/400-alpha-xstat.patch b/packages/glibc-ports/2.14/400-alpha-xstat.patch deleted file mode 100644 index 6e4ab8f..0000000 --- a/packages/glibc-ports/2.14/400-alpha-xstat.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -@@ -386,6 +386,11 @@ - # define __ASSUME_GETDENTS32_D_TYPE 1 - #endif - -+/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ -+#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ -+# define __ASSUME_STAT64_SYSCALL 1 -+#endif -+ - /* Starting with version 2.5.3, the initial location returned by `brk' - after exec is always rounded up to the next page. */ - #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/packages/glibc-ports/2.14/430-alpha-creat.patch b/packages/glibc-ports/2.14/430-alpha-creat.patch deleted file mode 100644 index da6ddda..0000000 --- a/packages/glibc-ports/2.14/430-alpha-creat.patch +++ /dev/null @@ -1,14 +0,0 @@ -alpha does not have a __NR_creat - -http://bugs.gentoo.org/227275 -http://sourceware.org/bugzilla/show_bug.cgi?id=6650 - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 -@@ -1 +1,5 @@ - /* Defined as alias for the syscall. */ -+#include -+#ifndef __NR_creat -+#include "../../../../../io/creat64.c" -+#endif diff --git a/packages/glibc-ports/2.14/440-alpha-cache-shape.patch b/packages/glibc-ports/2.14/440-alpha-cache-shape.patch index def0181..0c24a0d 100644 --- a/packages/glibc-ports/2.14/440-alpha-cache-shape.patch +++ b/packages/glibc-ports/2.14/440-alpha-cache-shape.patch @@ -5,9 +5,9 @@ duplication for static builds with dl-sysdep and dl-support. since dl-sysdep is both shared/static, there is no point in hooking dl-support anymore, so we can punt it. -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/dl-support.c ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 +diff -durN glibc-ports-2.14.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/dl-support.c +--- glibc-ports-2.14.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 @@ -1,2 +1,1 @@ -#include "dl-auxv.h" #include diff --git a/packages/glibc-ports/2.14/460-alpha-fix-gcc-4.1-warnings.patch b/packages/glibc-ports/2.14/460-alpha-fix-gcc-4.1-warnings.patch index 1569ce4..c757f44 100644 --- a/packages/glibc-ports/2.14/460-alpha-fix-gcc-4.1-warnings.patch +++ b/packages/glibc-ports/2.14/460-alpha-fix-gcc-4.1-warnings.patch @@ -16,9 +16,9 @@ I cannot really think of anything better than ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/ioperm.c ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 +diff -durN glibc-ports-2.14.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/ioperm.c +--- glibc-ports-2.14.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 @@ -178,13 +178,13 @@ static inline void stb_mb(unsigned char val, unsigned long addr) @@ -53,4 +53,3 @@ diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/alpha/ioperm return r; } -diff -durN glibc-2.14.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.14/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c diff --git a/packages/glibc-ports/2.14/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc-ports/2.14/490-alpha_alpha-add-fdatasync-support.patch deleted file mode 100644 index 372f34c..0000000 --- a/packages/glibc-ports/2.14/490-alpha_alpha-add-fdatasync-support.patch +++ /dev/null @@ -1,126 +0,0 @@ -2009-07-25 Aurelien Jarno - - * sysdeps/unix/sysv/linux/kernel-features.h: define - __ASSUME_FDATASYNC. - * sysdeps/unix/sysv/linux/fdatasync.c: New file. - * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with - -fexceptions. - * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. - - sysdeps/unix/sysv/linux/Makefile | 1 - sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ - sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ - sysdeps/unix/sysv/linux/syscalls.list | 1 - 4 files changed, 76 insertions(+), 1 deletion(-) - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.13/sysdeps/unix/sysv/linux/Makefile ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 -@@ -20,6 +20,7 @@ - setfsuid setfsgid makedev epoll_pwait signalfd \ - eventfd eventfd_read eventfd_write prlimit - -+CFLAGS-fdatasync.c = -fexceptions - CFLAGS-gethostid.c = -fexceptions - - sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 -@@ -0,0 +1,69 @@ -+/* fdatasync -- synchronize at least the data part of a file with -+ the underlying media. Linux version. -+ -+ Copyright (C) 2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+ -+#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC -+static int __have_no_fdatasync; -+#endif -+ -+static int -+do_fdatasync (int fd) -+{ -+#ifdef __ASSUME_FDATASYNC -+ return INLINE_SYSCALL (fdatasync, 1, fd); -+#elif defined __NR_fdatasync -+ if (!__builtin_expect (__have_no_fdatasync, 0)) -+ { -+ int result = INLINE_SYSCALL (fdatasync, 1, fd); -+ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) -+ return result; -+ -+ __have_no_fdatasync = 1; -+ } -+#endif -+ return INLINE_SYSCALL (fsync, 1, fd); -+} -+ -+int -+__fdatasync (int fd) -+{ -+ if (SINGLE_THREAD_P) -+ return do_fdatasync (fd); -+ -+ int oldtype = LIBC_CANCEL_ASYNC (); -+ -+ int result = do_fdatasync (fd); -+ -+ LIBC_CANCEL_RESET (oldtype); -+ -+ return result; -+} -+ -+weak_alias (__fdatasync, fdatasync) -+ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 -@@ -459,6 +459,12 @@ - # define __ASSUME_FUTEX_LOCK_PI 1 - #endif - -+/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it -+ was already present in 2.0 kernels on other architectures. */ -+#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) -+# define __ASSUME_FDATASYNC 1 -+#endif -+ - /* Support for utimensat syscall was added in 2.6.22, on SH - only after 2.6.22-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020616 \ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 -@@ -11,7 +11,6 @@ - epoll_create1 EXTRA epoll_create1 i:i epoll_create1 - epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl - epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait --fdatasync - fdatasync Ci:i fdatasync - flock - flock i:ii __flock flock - fork - fork i: __libc_fork __fork fork - get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/packages/glibc-ports/2.14/530-alpha-fix-rtld-fPIC.patch b/packages/glibc-ports/2.14/530-alpha-fix-rtld-fPIC.patch index 3560e2a..6f8eb31 100644 --- a/packages/glibc-ports/2.14/530-alpha-fix-rtld-fPIC.patch +++ b/packages/glibc-ports/2.14/530-alpha-fix-rtld-fPIC.patch @@ -5,9 +5,9 @@ ports/sysdeps/alpha/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/alpha/Makefile glibc-2.14/glibc-ports-2.14/sysdeps/alpha/Makefile ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 +diff -durN glibc-ports-2.14.orig/sysdeps/alpha/Makefile glibc-ports-2.14/sysdeps/alpha/Makefile +--- glibc-ports-2.14.orig/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 @@ -35,7 +35,8 @@ ifeq ($(subdir),elf) @@ -18,4 +18,3 @@ diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/alpha/Makefile glibc-2.14/gl endif # Build everything with full IEEE math support, and with dynamic rounding; -diff -durN glibc-2.14.orig/ports/sysdeps/alpha/Makefile glibc-2.14/ports/sysdeps/alpha/Makefile diff --git a/packages/glibc-ports/2.14/560-ppc-atomic.patch b/packages/glibc-ports/2.14/560-ppc-atomic.patch deleted file mode 100644 index ee1cb90..0000000 --- a/packages/glibc-ports/2.14/560-ppc-atomic.patch +++ /dev/null @@ -1,415 +0,0 @@ -sniped from suse - -Index: sysdeps/powerpc/bits/atomic.h -=================================================================== -RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v -retrieving revision 1.17 -diff -u -a -p -r1.17 atomic.h - -diff -durN glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h glibc-2.13/sysdeps/powerpc/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -85,14 +85,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -102,14 +102,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -118,12 +118,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -132,11 +132,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -144,12 +144,12 @@ - #define __arch_atomic_exchange_and_add_32(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stwcx. %1,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -157,12 +157,12 @@ - #define __arch_atomic_increment_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -170,27 +170,27 @@ - #define __arch_atomic_decrement_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_32(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ - " cmpwi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stwcx. %1,0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -60,14 +60,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp, __tmp2; \ - __asm __volatile (" clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -61,14 +61,14 @@ - unsigned int __tmp, __tmp2; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ - " clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -82,14 +82,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -98,14 +98,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -115,14 +115,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -132,14 +132,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -148,12 +148,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -162,11 +162,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -174,12 +174,12 @@ - #define __arch_atomic_exchange_and_add_64(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stdcx. %1,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -187,12 +187,12 @@ - #define __arch_atomic_increment_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -200,27 +200,27 @@ - #define __arch_atomic_decrement_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_64(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ - " cmpdi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stdcx. %1,0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) diff --git a/packages/glibc-ports/2.14/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/packages/glibc-ports/2.14/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch index b297ff0..8cd9539 100644 --- a/packages/glibc-ports/2.14/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch +++ b/packages/glibc-ports/2.14/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch @@ -1,9 +1,9 @@ http://yann.poupet.free.fr/ep93xx/ Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/bits/endian.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/bits/endian.h ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.orig/sysdeps/arm/bits/endian.h glibc-ports-2.14/sysdeps/arm/bits/endian.h +--- glibc-ports-2.14.orig/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100 @@ -12,7 +12,7 @@ /* FPA floating point units are always big-endian, irrespective of the CPU endianness. VFP floating point units use the same endianness @@ -13,9 +13,9 @@ diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/bits/endian.h glibc-2.14 #define __FLOAT_WORD_ORDER __BYTE_ORDER #else #define __FLOAT_WORD_ORDER __BIG_ENDIAN -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/__longjmp.S glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/__longjmp.S ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.orig/sysdeps/arm/fpu/__longjmp.S glibc-ports-2.14/sysdeps/arm/fpu/__longjmp.S +--- glibc-ports-2.14.orig/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100 @@ -30,7 +30,33 @@ movs r0, r1 /* get the return value in place */ moveq r0, #1 /* can't let setjmp() return zero! */ @@ -50,9 +50,9 @@ diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/__longjmp.S glibc-2. LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) END (__longjmp) -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/bits/fenv.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/bits/fenv.h ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.orig/sysdeps/arm/fpu/bits/fenv.h glibc-ports-2.14/sysdeps/arm/fpu/bits/fenv.h +--- glibc-ports-2.14.orig/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100 @@ -20,6 +20,45 @@ # error "Never use directly; include instead." #endif @@ -108,9 +108,9 @@ diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/bits/fenv.h glibc-2. /* Type representing exception flags. */ typedef unsigned long int fexcept_t; -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/bits/setjmp.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/bits/setjmp.h ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.orig/sysdeps/arm/fpu/bits/setjmp.h glibc-ports-2.14/sysdeps/arm/fpu/bits/setjmp.h +--- glibc-ports-2.14.orig/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100 @@ -28,7 +28,11 @@ #ifndef _ASM /* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not @@ -123,9 +123,9 @@ diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/bits/setjmp.h glibc- +#endif #endif -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fegetround.c glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fegetround.c ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.orig/sysdeps/arm/fpu/fegetround.c glibc-ports-2.14/sysdeps/arm/fpu/fegetround.c +--- glibc-ports-2.14.orig/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100 @@ -18,9 +18,21 @@ 02111-1307 USA. */ @@ -148,9 +148,9 @@ diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fegetround.c glibc-2 + +#endif } -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fesetround.c glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fesetround.c ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.orig/sysdeps/arm/fpu/fesetround.c glibc-ports-2.14/sysdeps/arm/fpu/fesetround.c +--- glibc-ports-2.14.orig/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100 @@ -18,12 +18,28 @@ 02111-1307 USA. */ @@ -180,9 +180,9 @@ diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fesetround.c glibc-2 } libm_hidden_def (fesetround) -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fpu_control.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fpu_control.h ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.orig/sysdeps/arm/fpu/fpu_control.h glibc-ports-2.14/sysdeps/arm/fpu/fpu_control.h +--- glibc-ports-2.14.orig/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100 @@ -1,5 +1,6 @@ /* FPU control word definitions. ARM version. - Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. @@ -278,9 +278,9 @@ diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/fpu_control.h glibc- +#endif + #endif /* _FPU_CONTROL_H */ -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/jmpbuf-offsets.h ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.orig/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-ports-2.14/sysdeps/arm/fpu/jmpbuf-offsets.h +--- glibc-ports-2.14.orig/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100 @@ -17,4 +17,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ @@ -290,9 +290,9 @@ diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/jmpbuf-offsets.h gli +#else #define __JMP_BUF_SP 20 +#endif -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/setjmp.S glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/setjmp.S ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.orig/sysdeps/arm/fpu/setjmp.S glibc-ports-2.14/sysdeps/arm/fpu/setjmp.S +--- glibc-ports-2.14.orig/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100 @@ -24,11 +24,41 @@ ENTRY (__sigsetjmp) @@ -335,9 +335,9 @@ diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/fpu/setjmp.S glibc-2.14/ /* Make a tail call to __sigjmp_save; it takes the same args. */ B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/gccframe.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/gccframe.h ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.orig/sysdeps/arm/gccframe.h glibc-ports-2.14/sysdeps/arm/gccframe.h +--- glibc-ports-2.14.orig/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100 @@ -17,6 +17,10 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ @@ -349,9 +349,9 @@ diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/gccframe.h glibc-2.14/gl +#endif #include -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/gmp-mparam.h glibc-2.14/glibc-ports-2.14/sysdeps/arm/gmp-mparam.h ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.14.orig/sysdeps/arm/gmp-mparam.h glibc-ports-2.14/sysdeps/arm/gmp-mparam.h +--- glibc-ports-2.14.orig/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100 @@ -29,7 +29,7 @@ #if defined(__ARMEB__) # define IEEE_DOUBLE_MIXED_ENDIAN 0 @@ -361,14 +361,3 @@ diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/arm/gmp-mparam.h glibc-2.14/ # define IEEE_DOUBLE_MIXED_ENDIAN 0 # define IEEE_DOUBLE_BIG_ENDIAN 0 #else -diff -durN glibc-2.14.orig/ports/sysdeps/arm/bits/endian.h glibc-2.14/ports/sysdeps/arm/bits/endian.h -diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/__longjmp.S glibc-2.14/ports/sysdeps/arm/fpu/__longjmp.S -diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/bits/fenv.h glibc-2.14/ports/sysdeps/arm/fpu/bits/fenv.h -diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/bits/setjmp.h glibc-2.14/ports/sysdeps/arm/fpu/bits/setjmp.h -diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/fegetround.c glibc-2.14/ports/sysdeps/arm/fpu/fegetround.c -diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/fesetround.c glibc-2.14/ports/sysdeps/arm/fpu/fesetround.c -diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/fpu_control.h glibc-2.14/ports/sysdeps/arm/fpu/fpu_control.h -diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.14/ports/sysdeps/arm/fpu/jmpbuf-offsets.h -diff -durN glibc-2.14.orig/ports/sysdeps/arm/fpu/setjmp.S glibc-2.14/ports/sysdeps/arm/fpu/setjmp.S -diff -durN glibc-2.14.orig/ports/sysdeps/arm/gccframe.h glibc-2.14/ports/sysdeps/arm/gccframe.h -diff -durN glibc-2.14.orig/ports/sysdeps/arm/gmp-mparam.h glibc-2.14/ports/sysdeps/arm/gmp-mparam.h diff --git a/packages/glibc-ports/2.14/580-nptl-lowlevellock.patch b/packages/glibc-ports/2.14/580-nptl-lowlevellock.patch index a2a141c..103727a 100644 --- a/packages/glibc-ports/2.14/580-nptl-lowlevellock.patch +++ b/packages/glibc-ports/2.14/580-nptl-lowlevellock.patch @@ -9,9 +9,9 @@ In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: ../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.) ../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function) -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 +diff -durN glibc-ports-2.14.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-ports-2.14/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +--- glibc-ports-2.14.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 @@ -25,6 +25,7 @@ #include #include @@ -20,4 +20,3 @@ diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/unix/sysv/linux/arm/nptl/low #define FUTEX_WAIT 0 #define FUTEX_WAKE 1 -diff -durN glibc-2.14.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.14/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h diff --git a/packages/glibc-ports/2.14/610-fpu-cw-mips.patch b/packages/glibc-ports/2.14/610-fpu-cw-mips.patch index c624565..549fc5b 100644 --- a/packages/glibc-ports/2.14/610-fpu-cw-mips.patch +++ b/packages/glibc-ports/2.14/610-fpu-cw-mips.patch @@ -1,8 +1,8 @@ http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html -diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/mips/fpu_control.h glibc-2.14/glibc-ports-2.14/sysdeps/mips/fpu_control.h ---- glibc-2.14.orig/glibc-ports-2.14/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.14/glibc-ports-2.14/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 +diff -durN glibc-ports-2.14.orig/sysdeps/mips/fpu_control.h glibc-ports-2.14/sysdeps/mips/fpu_control.h +--- glibc-ports-2.14.orig/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.14/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 @@ -86,7 +86,7 @@ #define _FPU_RC_UP 0x2 #define _FPU_RC_DOWN 0x3 @@ -12,4 +12,3 @@ diff -durN glibc-2.14.orig/glibc-ports-2.14/sysdeps/mips/fpu_control.h glibc-2.1 /* The fdlibm code requires strict IEEE double precision arithmetic, -diff -durN glibc-2.14.orig/ports/sysdeps/mips/fpu_control.h glibc-2.14/ports/sysdeps/mips/fpu_control.h diff --git a/packages/glibc-ports/2.14/630-mips_shn_undef-hack.patch b/packages/glibc-ports/2.14/630-mips_shn_undef-hack.patch deleted file mode 100644 index 791d76c..0000000 --- a/packages/glibc-ports/2.14/630-mips_shn_undef-hack.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -durN glibc-2.13.orig/elf/dl-lookup.c glibc-2.13/elf/dl-lookup.c ---- glibc-2.13.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 -+++ glibc-2.13/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 -@@ -301,6 +301,12 @@ - /* FALLTHROUGH */ - case STB_GLOBAL: - success: -+#ifdef __mips__ -+ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF -+ symbols, we skip them. */ -+ if (sym->st_shndx == SHN_UNDEF) -+ break; -+#endif - /* Global definition. Just what we need. */ - result->s = sym; - result->m = (struct link_map *) map; diff --git a/packages/glibc-ports/2.14/640-alpha-atfcts.patch b/packages/glibc-ports/2.14/640-alpha-atfcts.patch deleted file mode 100644 index 7a8a94a..0000000 --- a/packages/glibc-ports/2.14/640-alpha-atfcts.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 -@@ -437,7 +437,8 @@ - the code. On PPC they were introduced in 2.6.17-rc1, - on SH in 2.6.19-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020611 \ -- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) -+ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ -+ && (!defined __alpha__) - # define __ASSUME_ATFCTS 1 - #endif - diff --git a/packages/glibc-ports/2.14/650-syslog.patch b/packages/glibc-ports/2.14/650-syslog.patch deleted file mode 100644 index c20cafc..0000000 --- a/packages/glibc-ports/2.14/650-syslog.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c ---- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 -+++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 -@@ -152,7 +152,7 @@ - #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID - /* Check for invalid bits. */ - if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { -- syslog(INTERNALLOG, -+ __syslog(INTERNALLOG, - "syslog: unknown facility/priority: %x", pri); - pri &= LOG_PRIMASK|LOG_FACMASK; - } diff --git a/packages/glibc-ports/2.14/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc-ports/2.14/660-debug-readlink_chk-readklinkat_chk.patch deleted file mode 100644 index a5a7052..0000000 --- a/packages/glibc-ports/2.14/660-debug-readlink_chk-readklinkat_chk.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c ---- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 -+++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 -@@ -25,7 +25,7 @@ - - - ssize_t --__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) -+__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) - { - if (len > buflen) - __chk_fail (); -diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c ---- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 -+++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 -@@ -21,7 +21,7 @@ - - - ssize_t --__readlinkat_chk (int fd, const char *path, void *buf, size_t len, -+__readlinkat_chk (int fd, const char *path, char *buf, size_t len, - size_t buflen) - { - if (len > buflen) diff --git a/packages/glibc-ports/2.15/090-Fix-ARM-build-with-GCC-trunk.patch b/packages/glibc-ports/2.15/090-Fix-ARM-build-with-GCC-trunk.patch index 1a632fe..259b285 100644 --- a/packages/glibc-ports/2.15/090-Fix-ARM-build-with-GCC-trunk.patch +++ b/packages/glibc-ports/2.15/090-Fix-ARM-build-with-GCC-trunk.patch @@ -20,8 +20,8 @@ Tested that this fixes the build for ARM. sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c ++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c @@ -23,7 +23,8 @@ #include @@ -35,8 +35,8 @@ Tested that this fixes the build for ARM. static _Unwind_Reason_Code (*libgcc_s_forcedunwind) diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c index bff3e2b..1f1eb71 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c +--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c ++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c @@ -21,7 +21,8 @@ #include #include @@ -47,8 +47,8 @@ index bff3e2b..1f1eb71 100644 static _Unwind_Reason_Code (*libgcc_s_personality) (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, struct _Unwind_Context *); ---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c +--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c ++++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-forcedunwind.c @@ -23,7 +23,8 @@ #include @@ -59,8 +59,8 @@ index bff3e2b..1f1eb71 100644 static _Unwind_Reason_Code (*libgcc_s_personality) (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); static _Unwind_Reason_Code (*libgcc_s_forcedunwind) ---- a/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c +--- a/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c ++++ b/sysdeps/unix/sysv/linux/arm/eabi/nptl/unwind-resume.c @@ -21,7 +21,8 @@ #include #include diff --git a/packages/glibc-ports/2.15/091-libmemusage-link-failure.patch b/packages/glibc-ports/2.15/091-libmemusage-link-failure.patch index 9f9887c..23d8813 100644 --- a/packages/glibc-ports/2.15/091-libmemusage-link-failure.patch +++ b/packages/glibc-ports/2.15/091-libmemusage-link-failure.patch @@ -4,10 +4,10 @@ Date: Fri Jan 6 20:14:44 2012 +0000 Add ARM dependency of libmemusage.so on libc_nonshared.a. -diff --git a/ports/sysdeps/arm/Makefile b/ports/sysdeps/arm/Makefile +diff --git a/sysdeps/arm/Makefile b/sysdeps/arm/Makefile index 5651161..1a88430 100644 ---- a/ports/sysdeps/arm/Makefile -+++ b/ports/sysdeps/arm/Makefile +--- a/sysdeps/arm/Makefile ++++ b/sysdeps/arm/Makefile @@ -7,3 +7,8 @@ endif ifeq ($(subdir),csu) gen-as-const-headers += tlsdesc.sym diff --git a/packages/glibc-ports/2.15/100-respect-env-CPPFLAGS.patch b/packages/glibc-ports/2.15/100-respect-env-CPPFLAGS.patch deleted file mode 100644 index 3798cb2..0000000 --- a/packages/glibc-ports/2.15/100-respect-env-CPPFLAGS.patch +++ /dev/null @@ -1,14 +0,0 @@ -Respect environment CPPFLAGS when we run ./configure so we can inject -random -D things without having to set CFLAGS/ASFLAGS - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 -+++ glibc-2.13/Makeconfig 2009-11-13 00:49:41.000000000 +0100 -@@ -697,6 +697,7 @@ - $(foreach lib,$(libof-$(basename $(@F))) \ - $(libof-$(field.le_next)) - -+#define LIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = LIST_FIRST((head)); \ -+ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - /* - * List access methods. - */ -@@ -197,6 +202,16 @@ - #define SLIST_FOREACH(var, head, field) \ - for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) - -+#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = SLIST_FIRST((head)); \ -+ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ -+#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ -+ for ((varp) = &SLIST_FIRST((head)); \ -+ ((var) = *(varp)) != NULL; \ -+ (varp) = &SLIST_NEXT((var), field)) -+ - /* - * Singly-linked List access methods. - */ -@@ -242,6 +257,12 @@ - (head)->stqh_last = &(elm)->field.stqe_next; \ - } while (/*CONSTCOND*/0) - -+#define STAILQ_LAST(head, type, field) \ -+ (STAILQ_EMPTY((head)) ? \ -+ NULL : \ -+ ((struct type *)(void *) \ -+ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) -+ - #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ - (head)->stqh_last = &(elm)->field.stqe_next; \ -@@ -271,6 +292,11 @@ - (var); \ - (var) = ((var)->field.stqe_next)) - -+#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = STAILQ_FIRST((head)); \ -+ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define STAILQ_CONCAT(head1, head2) do { \ - if (!STAILQ_EMPTY((head2))) { \ - *(head1)->stqh_last = (head2)->stqh_first; \ -@@ -437,11 +463,21 @@ - (var); \ - (var) = ((var)->field.tqe_next)) - -+#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = TAILQ_FIRST((head)); \ -+ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ - for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ - (var); \ - (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) - -+#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ -+ for ((var) = TAILQ_LAST((head), headname); \ -+ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_CONCAT(head1, head2, field) do { \ - if (!TAILQ_EMPTY(head2)) { \ - *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/packages/glibc-ports/2.15/160-manual-no-perl.patch b/packages/glibc-ports/2.15/160-manual-no-perl.patch deleted file mode 100644 index 5e2b807..0000000 --- a/packages/glibc-ports/2.15/160-manual-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.13.orig/manual/Makefile glibc-2.13/manual/Makefile ---- glibc-2.13.orig/manual/Makefile 2006-01-08 07:43:47.000000000 +0100 -+++ glibc-2.13/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/packages/glibc-ports/2.15/170-localedef-fix-trampoline.patch b/packages/glibc-ports/2.15/170-localedef-fix-trampoline.patch deleted file mode 100644 index 3cc6559..0000000 --- a/packages/glibc-ports/2.15/170-localedef-fix-trampoline.patch +++ /dev/null @@ -1,53 +0,0 @@ -# DP: Description: Fix localedef segfault when run under exec-shield, -# PaX or similar. (#231438, #198099) -# DP: Dpatch Author: James Troup -# DP: Patch Author: (probably) Jakub Jelinek -# DP: Upstream status: Unknown -# DP: Status Details: Unknown -# DP: Date: 2004-03-16 -diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h ---- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 -+++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 -@@ -203,6 +203,42 @@ - } - } - } -+ -+/* GCC ATM seems to do a poor job with pointers to nested functions passed -+ to inlined functions. Help it a little bit with this hack. */ -+#define wchead_table_iterate(tp, fn) \ -+do \ -+ { \ -+ struct wchead_table *t = (tp); \ -+ uint32_t index1; \ -+ for (index1 = 0; index1 < t->level1_size; index1++) \ -+ { \ -+ uint32_t lookup1 = t->level1[index1]; \ -+ if (lookup1 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup1_shifted = lookup1 << t->q; \ -+ uint32_t index2; \ -+ for (index2 = 0; index2 < (1 << t->q); index2++) \ -+ { \ -+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ -+ if (lookup2 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup2_shifted = lookup2 << t->p; \ -+ uint32_t index3; \ -+ for (index3 = 0; index3 < (1 << t->p); index3++) \ -+ { \ -+ struct element_t *lookup3 \ -+ = t->level3[index3 + lookup2_shifted]; \ -+ if (lookup3 != NULL) \ -+ fn ((((index1 << t->q) + index2) << t->p) + index3, \ -+ lookup3); \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } while (0) -+ - #endif - - #ifndef NO_FINALIZE diff --git a/packages/glibc-ports/2.15/180-resolv-dynamic.patch b/packages/glibc-ports/2.15/180-resolv-dynamic.patch deleted file mode 100644 index e916bce..0000000 --- a/packages/glibc-ports/2.15/180-resolv-dynamic.patch +++ /dev/null @@ -1,39 +0,0 @@ -ripped from SuSE - -if /etc/resolv.conf is updated, then make sure applications -already running get the updated information. - -http://bugs.gentoo.org/177416 - -diff -durN glibc-2.13.orig/resolv/res_libc.c glibc-2.13/resolv/res_libc.c ---- glibc-2.13.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 -+++ glibc-2.13/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - - /* The following bit is copied from res_data.c (where it is #ifdef'ed -@@ -95,6 +96,20 @@ - __res_maybe_init (res_state resp, int preinit) - { - if (resp->options & RES_INIT) { -+ static time_t last_mtime, last_check; -+ time_t now; -+ struct stat statbuf; -+ -+ time (&now); -+ if (now != last_check) { -+ last_check = now; -+ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { -+ last_mtime = statbuf.st_mtime; -+ atomicinclock (lock); -+ atomicinc (__res_initstamp); -+ atomicincunlock (lock); -+ } -+ } - if (__res_initstamp != resp->_u._ext.initstamp) { - if (resp->nscount > 0) - __res_iclose (resp, true); diff --git a/packages/glibc-ports/2.15/200-fadvise64_64.patch b/packages/glibc-ports/2.15/200-fadvise64_64.patch deleted file mode 100644 index 71bca38..0000000 --- a/packages/glibc-ports/2.15/200-fadvise64_64.patch +++ /dev/null @@ -1,28 +0,0 @@ -ripped from Debian - - sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 -@@ -35,6 +35,19 @@ - return INTERNAL_SYSCALL_ERRNO (ret, err); - return 0; - #else -+# ifdef __NR_fadvise64_64 -+ INTERNAL_SYSCALL_DECL (err); -+ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, -+ __LONG_LONG_PAIR ((long) (offset >> 31), -+ (long) offset), -+ __LONG_LONG_PAIR ((long) (len >> 31), -+ (long) len), -+ advise); -+ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) -+ return INTERNAL_SYSCALL_ERRNO (ret, err); -+ return 0; -+# else - return ENOSYS; -+# endif - #endif - } diff --git a/packages/glibc-ports/2.15/220-section-comments.patch b/packages/glibc-ports/2.15/220-section-comments.patch deleted file mode 100644 index d717829..0000000 --- a/packages/glibc-ports/2.15/220-section-comments.patch +++ /dev/null @@ -1,24 +0,0 @@ -http://sources.redhat.com/ml/binutils/2004-04/msg00665.html - -fixes building on some architectures (like m68k/arm/cris/etc...) because -it does the right thing - -diff -durN glibc-2.13.orig/include/libc-symbols.h glibc-2.13/include/libc-symbols.h ---- glibc-2.13.orig/include/libc-symbols.h 2009-03-14 00:51:46.000000000 +0100 -+++ glibc-2.13/include/libc-symbols.h 2009-11-13 00:50:07.000000000 +0100 -@@ -239,12 +239,12 @@ - # define __make_section_unallocated(section_string) - # endif - --/* Tacking on "\n\t#" to the section name makes gcc put it's bogus -+/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus - section attributes on what looks like a comment to the assembler. */ - # ifdef HAVE_SECTION_QUOTES --# define __sec_comment "\"\n\t#\"" -+# define __sec_comment "\"\n#APP\n\t#\"" - # else --# define __sec_comment "\n\t#" -+# define __sec_comment "\n#APP\n\t#" - # endif - # define link_warning(symbol, msg) \ - __make_section_unallocated (".gnu.warning." #symbol) \ diff --git a/packages/glibc-ports/2.15/230-no-inline-gmon.patch b/packages/glibc-ports/2.15/230-no-inline-gmon.patch deleted file mode 100644 index fa33c2b..0000000 --- a/packages/glibc-ports/2.15/230-no-inline-gmon.patch +++ /dev/null @@ -1,36 +0,0 @@ -http://bugs.gentoo.org/196245 -http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html - -Attached is a patch to add __attribute__ ((noinline)) to -call_gmon_start. - -Without this patch, the sec script that processed initfini.s removes a -part of inlined call_gmon_start, causing undefined label errors. - -This patch solves the problem by forcing gcc not to inline -call_gmon_start with __attribute__ ((noinline)). - -Tested by building for arm-none-lixux-gnueabi. OK to apply? - -Kazu Hirata - -2006-05-07 Kazu Hirata <kazu@codesourcery.com> - - * sysdeps/generic/initfini.c (call_gmon_start): Add - __attribute__ ((noinline)). - -Index: sysdeps/generic/initfini.c -=================================================================== - -diff -durN glibc-2.13.orig/sysdeps/generic/initfini.c glibc-2.13/sysdeps/generic/initfini.c ---- glibc-2.13.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200 -+++ glibc-2.13/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100 -@@ -70,7 +70,7 @@ - /* The beginning of _init: */ - asm ("\n/*@_init_PROLOG_BEGINS*/"); - --static void -+static void __attribute__ ((noinline)) - call_gmon_start(void) - { - extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ diff --git a/packages/glibc-ports/2.15/260-assume-pipe2.patch b/packages/glibc-ports/2.15/260-assume-pipe2.patch deleted file mode 100644 index 42e8f4e..0000000 --- a/packages/glibc-ports/2.15/260-assume-pipe2.patch +++ /dev/null @@ -1,40 +0,0 @@ -http://bugs.gentoo.org/250342 -http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 - -we cant assume sock_cloexec and pipe2 are bound together as the former defines -are found in glibc only while the latter are a combo of kernel headers and -glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub -inside of glibc, we hit a problem. for example: - -#include -#include -main() -{ - getgrnam("portage"); - if (!popen("ls", "r")) - perror("popen()"); -} - -getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both -__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against -older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS -stub for it. so popen() will always fail as glibc assumes pipe2() works. - -diff -durN glibc-2.13.orig/socket/have_sock_cloexec.c glibc-2.13/socket/have_sock_cloexec.c ---- glibc-2.13.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 -+++ glibc-2.13/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 -@@ -16,9 +16,14 @@ - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -+#include - #include - #include - - #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC - int __have_sock_cloexec; - #endif -+ -+#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 -+int __have_pipe2; -+#endif diff --git a/packages/glibc-ports/2.15/270-china.patch b/packages/glibc-ports/2.15/270-china.patch deleted file mode 100644 index 41d7759..0000000 --- a/packages/glibc-ports/2.15/270-china.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.13.orig/localedata/locales/zh_TW glibc-2.13/localedata/locales/zh_TW ---- glibc-2.13.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 -+++ glibc-2.13/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 -@@ -1,7 +1,7 @@ - comment_char % - escape_char / - % --% Chinese language locale for Taiwan R.O.C. -+% Chinese language locale for Taiwan - % charmap: BIG5-CP950 - % - % Original Author: -@@ -17,7 +17,7 @@ - % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf - - LC_IDENTIFICATION --title "Chinese locale for Taiwan R.O.C." -+title "Chinese locale for Taiwan" - source "" - address "" - contact "" -@@ -25,7 +25,7 @@ - tel "" - fax "" - language "Chinese" --territory "Taiwan R.O.C." -+territory "Taiwan" - revision "0.2" - date "2000-08-02" - % diff --git a/packages/glibc-ports/2.15/280-new-valencian-locale.patch b/packages/glibc-ports/2.15/280-new-valencian-locale.patch deleted file mode 100644 index 4cdd108..0000000 --- a/packages/glibc-ports/2.15/280-new-valencian-locale.patch +++ /dev/null @@ -1,115 +0,0 @@ -http://bugs.gentoo.org/show_bug.cgi?id=131815 -http://sourceware.org/bugzilla/show_bug.cgi?id=2522 - -diff -durN glibc-2.13.orig/localedata/SUPPORTED glibc-2.13/localedata/SUPPORTED ---- glibc-2.13.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 -+++ glibc-2.13/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 -@@ -72,6 +72,8 @@ - ca_ES.UTF-8/UTF-8 \ - ca_ES/ISO-8859-1 \ - ca_ES@euro/ISO-8859-15 \ -+ca_ES.UTF-8@valencia/UTF-8 \ -+ca_ES@valencia/ISO-8859-15 \ - ca_FR.UTF-8/UTF-8 \ - ca_FR/ISO-8859-15 \ - ca_IT.UTF-8/UTF-8 \ -diff -durN glibc-2.13.orig/localedata/locales/ca_ES@valencia glibc-2.13/localedata/locales/ca_ES@valencia ---- glibc-2.13.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.13/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 -@@ -0,0 +1,96 @@ -+comment_char % -+escape_char / -+% -+% Valencian (southern Catalan) locale for Spain with Euro -+% -+% Note that this locale is almost the same as ca_ES@euro. The point of having -+% a separate locale is only for PO translations, which have a lot of social -+% support and are very appreciated by the Valencian-speaking community. -+% -+% Contact: Jordi Mallach -+% Email: jordi@gnu.org -+% Tel: -+% Fax: -+% Language: ca -+% Territory: ES -+% Option: euro -+% Revision: 1.0 -+% Date: 2006-04-06 -+% Application: general -+% Users: general -+% Repertoiremap: mnemonic,ds -+% Charset: ISO-8859-15 -+% Distribution and use is free, also -+% for commercial purposes. -+ -+LC_IDENTIFICATION -+title "Valencian (southern Catalan) locale for Spain with Euro" -+source "" -+address "" -+contact "Jordi Mallach" -+email "jordi@gnu.org" -+tel "" -+fax "" -+language "Catalan" -+territory "Spain" -+revision "1.0" -+date "2006-04-06" -+% -+category "ca_ES@valencia:2006";LC_IDENTIFICATION -+category "ca_ES@valencia:2006";LC_CTYPE -+category "ca_ES@valencia:2006";LC_COLLATE -+category "ca_ES@valencia:2006";LC_MONETARY -+category "ca_ES@valencia:2006";LC_NUMERIC -+category "ca_ES@valencia:2006";LC_TIME -+category "ca_ES@valencia:2006";LC_MESSAGES -+category "ca_ES@valencia:2006";LC_PAPER -+category "ca_ES@valencia:2006";LC_NAME -+category "ca_ES@valencia:2006";LC_ADDRESS -+category "ca_ES@valencia:2006";LC_TELEPHONE -+category "ca_ES@valencia:2006";LC_MEASUREMENT -+ -+END LC_IDENTIFICATION -+ -+LC_CTYPE -+copy "i18n" -+END LC_CTYPE -+ -+LC_COLLATE -+copy "ca_ES" -+END LC_COLLATE -+ -+LC_MONETARY -+copy "ca_ES" -+END LC_MONETARY -+ -+LC_NUMERIC -+copy "ca_ES" -+END LC_NUMERIC -+ -+LC_TIME -+copy "ca_ES" -+END LC_TIME -+ -+LC_MESSAGES -+copy "ca_ES" -+END LC_MESSAGES -+ -+LC_PAPER -+copy "ca_ES" -+END LC_PAPER -+ -+LC_NAME -+copy "ca_ES" -+END LC_NAME -+ -+LC_ADDRESS -+copy "ca_ES" -+END LC_ADDRESS -+ -+LC_TELEPHONE -+copy "ca_ES" -+END LC_TELEPHONE -+ -+LC_MEASUREMENT -+copy "ca_ES" -+END LC_MEASUREMENT diff --git a/packages/glibc-ports/2.15/300-nscd-one-fork.patch b/packages/glibc-ports/2.15/300-nscd-one-fork.patch deleted file mode 100644 index adc9b3f..0000000 --- a/packages/glibc-ports/2.15/300-nscd-one-fork.patch +++ /dev/null @@ -1,40 +0,0 @@ -only fork one to assist in stop-start-daemon assumptions about daemon behavior - -http://bugs.gentoo.org/190785 - -diff -durN glibc-2.13.orig/nscd/nscd.c glibc-2.13/nscd/nscd.c ---- glibc-2.13.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 -+++ glibc-2.13/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 -@@ -182,6 +182,9 @@ - if (pid != 0) - exit (0); - -+ if (write_pid (_PATH_NSCDPID) < 0) -+ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -+ - int nullfd = open (_PATH_DEVNULL, O_RDWR); - if (nullfd != -1) - { -@@ -231,12 +234,6 @@ - for (i = min_close_fd; i < getdtablesize (); i++) - close (i); - -- pid = fork (); -- if (pid == -1) -- error (EXIT_FAILURE, errno, _("cannot fork")); -- if (pid != 0) -- exit (0); -- - setsid (); - - if (chdir ("/") != 0) -@@ -245,9 +242,6 @@ - - openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); - -- if (write_pid (_PATH_NSCDPID) < 0) -- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -- - if (!init_logfile ()) - dbg_log (_("Could not create log file")); - diff --git a/packages/glibc-ports/2.15/310-hppa-nptl-carlos.patch b/packages/glibc-ports/2.15/310-hppa-nptl-carlos.patch deleted file mode 100644 index 4c028b2..0000000 --- a/packages/glibc-ports/2.15/310-hppa-nptl-carlos.patch +++ /dev/null @@ -1,246 +0,0 @@ - - -diff -durN glibc-2.13.orig/elf/rtld.c glibc-2.13/elf/rtld.c ---- glibc-2.13.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 -+++ glibc-2.13/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 -@@ -392,14 +392,14 @@ - know it is available. We do not have to clear the memory if we - do not have to use the temporary bootstrap_map. Global variables - are initialized to zero by default. */ --#ifndef DONT_USE_BOOTSTRAP_MAP -+#if !defined DONT_USE_BOOTSTRAP_MAP - # ifdef HAVE_BUILTIN_MEMSET - __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); - # else -- for (size_t cnt = 0; -- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); -- ++cnt) -- bootstrap_map.l_info[cnt] = 0; -+ /* Clear the whole bootstrap_map structure */ -+ for (char *cnt = (char *)&(bootstrap_map); -+ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); -+ *cnt++ = '\0'); - # endif - # if USE___THREAD - bootstrap_map.l_tls_modid = 0; -diff -durN glibc-2.13.orig/include/atomic.h glibc-2.13/include/atomic.h ---- glibc-2.13.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 -+++ glibc-2.13/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 -@@ -185,7 +185,7 @@ - __typeof (*(mem)) __atg5_value = (newvalue); \ - \ - do \ -- __atg5_oldval = *__atg5_memp; \ -+ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ - __atg5_oldval), 0)); \ -@@ -206,7 +206,7 @@ - __typeof (*(mem)) __atg6_value = (value); \ - \ - do \ -- __atg6_oldval = *__atg6_memp; \ -+ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ - __atg6_oldval \ -@@ -224,7 +224,7 @@ - __typeof (*(mem)) __atg7_value = (value); \ - \ - do \ -- __atg7_oldv = *__atg7_memp; \ -+ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ - __atg7_oldv \ -@@ -242,7 +242,7 @@ - __typeof (mem) __atg8_memp = (mem); \ - __typeof (*(mem)) __atg8_value = (value); \ - do { \ -- __atg8_oldval = *__atg8_memp; \ -+ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ - if (__atg8_oldval >= __atg8_value) \ - break; \ - } while (__builtin_expect \ -@@ -259,7 +259,7 @@ - __typeof (mem) __atg9_memp = (mem); \ - __typeof (*(mem)) __atg9_value = (value); \ - do { \ -- __atg9_oldv = *__atg9_memp; \ -+ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ - if (__atg9_oldv >= __atg9_value) \ - break; \ - } while (__builtin_expect \ -@@ -277,7 +277,7 @@ - __typeof (mem) __atg10_memp = (mem); \ - __typeof (*(mem)) __atg10_value = (value); \ - do { \ -- __atg10_oldval = *__atg10_memp; \ -+ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ - if (__atg10_oldval <= __atg10_value) \ - break; \ - } while (__builtin_expect \ -@@ -361,7 +361,7 @@ - \ - do \ - { \ -- __atg11_oldval = *__atg11_memp; \ -+ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ - if (__builtin_expect (__atg11_oldval <= 0, 0)) \ - break; \ - } \ -@@ -400,7 +400,7 @@ - __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ - \ - do \ -- __atg14_old = (*__atg14_memp); \ -+ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ - __atg14_old | __atg14_mask,\ -@@ -418,7 +418,7 @@ - __typeof (*(mem)) __atg15_mask = (mask); \ - \ - do \ -- __atg15_old = (*__atg15_memp); \ -+ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ - __atg15_old & __atg15_mask, \ -@@ -450,7 +450,7 @@ - __typeof (*(mem)) __atg16_mask = (mask); \ - \ - do \ -- __atg16_old = (*__atg16_memp); \ -+ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ - __atg16_old & __atg16_mask,\ -@@ -468,7 +468,7 @@ - __typeof (*(mem)) __atg17_mask = (mask); \ - \ - do \ -- __atg17_old = (*__atg17_memp); \ -+ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ - __atg17_old | __atg17_mask, \ -@@ -484,7 +484,7 @@ - __typeof (*(mem)) __atg18_mask = (mask); \ - \ - do \ -- __atg18_old = (*__atg18_memp); \ -+ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ - __atg18_old | __atg18_mask,\ -@@ -500,7 +500,7 @@ - __typeof (*(mem)) __atg19_mask = (mask); \ - \ - do \ -- __atg19_old = (*__atg19_memp); \ -+ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ - __atg19_old | __atg19_mask,\ -diff -durN glibc-2.13.orig/nptl/Makefile glibc-2.13/nptl/Makefile ---- glibc-2.13.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 -+++ glibc-2.13/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -265,9 +265,9 @@ - # Files which must not be linked with libpthread. - tests-nolibpthread = tst-unload - --# This sets the stack resource limit to 1023kb, which is not a multiple --# of the page size since every architecture's page size is > 1k. --tst-oddstacklimit-ENV = ; ulimit -s 1023; -+# This sets the stack resource limit to 8193kb, which is not a multiple -+# of the page size since every architecture's page size is 4096 bytes. -+tst-oddstacklimit-ENV = ; ulimit -s 8193; - - distribute = eintr.c tst-cleanup4aux.c - -@@ -426,6 +426,35 @@ - CFLAGS-tst-cleanupx4.c += -fexceptions - CFLAGS-tst-oncex3.c += -fexceptions - CFLAGS-tst-oncex4.c += -fexceptions -+ -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed -+LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) -+ - CFLAGS-tst-align.c += $(stack-align-test-flags) - CFLAGS-tst-align3.c += $(stack-align-test-flags) - CFLAGS-tst-initializers1.c = -W -Wall -Werror -diff -durN glibc-2.13.orig/nptl/pthread_barrier_wait.c glibc-2.13/nptl/pthread_barrier_wait.c ---- glibc-2.13.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 -+++ glibc-2.13/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 -@@ -64,7 +64,7 @@ - do - lll_futex_wait (&ibarrier->curr_event, event, - ibarrier->private ^ FUTEX_PRIVATE_FLAG); -- while (event == ibarrier->curr_event); -+ while (event == *(volatile unsigned int *)&ibarrier->curr_event); - } - - /* Make sure the init_count is stored locally or in a register. */ -diff -durN glibc-2.13.orig/nptl/sysdeps/pthread/Makefile glibc-2.13/nptl/sysdeps/pthread/Makefile ---- glibc-2.13.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 -+++ glibc-2.13/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -33,7 +33,9 @@ - - ifeq ($(have-forced-unwind),yes) - tests += tst-mqueue8x -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed - CFLAGS-tst-mqueue8x.c += -fexceptions -+LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) - endif - endif - -diff -durN glibc-2.13.orig/stdio-common/Makefile glibc-2.13/stdio-common/Makefile ---- glibc-2.13.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 -+++ glibc-2.13/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -82,7 +82,7 @@ - $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' - endif - --CFLAGS-vfprintf.c = -Wno-uninitialized -+CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch - CFLAGS-vfwprintf.c = -Wno-uninitialized - CFLAGS-tst-printf.c = -Wno-format - CFLAGS-tstdiomisc.c = -Wno-format -diff -durN glibc-2.13.orig/sunrpc/clnt_udp.c glibc-2.13/sunrpc/clnt_udp.c ---- glibc-2.13.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 -+++ glibc-2.13/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 -@@ -456,7 +456,7 @@ - while (inlen < 0 && errno == EINTR); - if (inlen < 0) - { -- if (errno == EWOULDBLOCK) -+ if (errno == EWOULDBLOCK || errno == EAGAIN) - continue; - cu->cu_error.re_errno = errno; - return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/packages/glibc-ports/2.15/330-m68k-sys-user.patch b/packages/glibc-ports/2.15/330-m68k-sys-user.patch index faee18f..388bc62 100644 --- a/packages/glibc-ports/2.15/330-m68k-sys-user.patch +++ b/packages/glibc-ports/2.15/330-m68k-sys-user.patch @@ -1,8 +1,8 @@ copied from kernel as it is sanitized now -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/user.h ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 +diff -durN glibc-ports-2.15.orig/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/user.h +--- glibc-ports-2.15.orig/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 @@ -1,3 +1,90 @@ +#ifndef _SYS_USER_H +#define _SYS_USER_H @@ -94,4 +94,3 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/m68k/sys/use /* Copyright (C) 2008, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. -diff -durN glibc-2.15.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.15/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h diff --git a/packages/glibc-ports/2.15/340-dl_execstack-PaX-support.patch b/packages/glibc-ports/2.15/340-dl_execstack-PaX-support.patch deleted file mode 100644 index 2402af0..0000000 --- a/packages/glibc-ports/2.15/340-dl_execstack-PaX-support.patch +++ /dev/null @@ -1,66 +0,0 @@ - With latest versions of glibc, a lot of apps failed on a PaX enabled - system with: - cannot enable executable stack as shared object requires: Permission denied - - This is due to PaX 'exec-protecting' the stack, and ld.so then trying - to make the stack executable due to some libraries not containing the - PT_GNU_STACK section. Bug #32960. (12 Nov 2003). - - Patch also NPTL. Bug #116086. (20 Dec 2005). - -diff -durN glibc-2.13.orig/nptl/allocatestack.c glibc-2.13/nptl/allocatestack.c ---- glibc-2.13.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 -+++ glibc-2.13/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -329,7 +329,8 @@ - # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" - #endif - if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) -- return errno; -+ if (errno != EACCES) /* PAX is enabled */ -+ return errno; - - return 0; - } -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -63,7 +63,10 @@ - else - # endif - { -- result = errno; -+ if (errno == EACCES) /* PAX is enabled */ -+ result = 0; -+ else -+ result = errno; - goto out; - } - } -@@ -89,7 +92,12 @@ - page -= size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; -@@ -115,7 +123,12 @@ - page += size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; diff --git a/packages/glibc-ports/2.15/350-pre20040117-pt_pax.patch b/packages/glibc-ports/2.15/350-pre20040117-pt_pax.patch deleted file mode 100644 index f8f6b83..0000000 --- a/packages/glibc-ports/2.15/350-pre20040117-pt_pax.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.13.orig/elf/elf.h glibc-2.13/elf/elf.h ---- glibc-2.13.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 -+++ glibc-2.13/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 -@@ -580,6 +580,7 @@ - #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ - #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ - #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ -+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ - #define PT_LOSUNW 0x6ffffffa - #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ - #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ -@@ -593,6 +594,18 @@ - #define PF_X (1 << 0) /* Segment is executable */ - #define PF_W (1 << 1) /* Segment is writable */ - #define PF_R (1 << 2) /* Segment is readable */ -+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ -+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ -+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ -+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ -+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ -+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ -+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ -+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ -+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ -+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ -+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ -+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ - #define PF_MASKOS 0x0ff00000 /* OS-specific */ - #define PF_MASKPROC 0xf0000000 /* Processor-specific */ - diff --git a/packages/glibc-ports/2.15/360-tests-sandbox-libdl-paths.patch b/packages/glibc-ports/2.15/360-tests-sandbox-libdl-paths.patch deleted file mode 100644 index 9f78c52..0000000 --- a/packages/glibc-ports/2.15/360-tests-sandbox-libdl-paths.patch +++ /dev/null @@ -1,193 +0,0 @@ -when glibc runs its tests, it does so by invoking the local library loader. -in Gentoo, we build/run inside of our "sandbox" which itself is linked against -libdl (so that it can load libraries and pull out symbols). the trouble -is that when you upgrade from an older glibc to the new one, often times -internal symbols change name or abi. this is normally OK as you cannot use -libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so -we always say "keep all of the glibc libraries from the same build". but -when glibc runs its tests, it uses dynamic paths to point to its new local -copies of libraries. if the test doesnt use libdl, then glibc doesnt add -its path, and when sandbox triggers the loading of libdl, glibc does so -from the host system system. this gets us into the case of all libraries -are from the locally compiled version of glibc except for libdl.so. - -Fix by Wormo - -http://bugs.gentoo.org/56898 - -diff -durN glibc-2.13.orig/grp/tst_fgetgrent.sh glibc-2.13/grp/tst_fgetgrent.sh ---- glibc-2.13.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 -+++ glibc-2.13/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,7 +24,8 @@ - rtld_installed_name=$1; shift - - testout=${common_objpfx}/grp/tst_fgetgrent.out --library_path=${common_objpfx} -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn - - result=0 - -diff -durN glibc-2.13.orig/iconvdata/run-iconv-test.sh glibc-2.13/iconvdata/run-iconv-test.sh ---- glibc-2.13.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 -+++ glibc-2.13/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -34,7 +34,7 @@ - export GCONV_PATH - - # We have to have some directories in the library path. --LIBPATH=$codir:$codir/iconvdata -+LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn - - # How the start the iconv(1) program. - ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ -diff -durN glibc-2.13.orig/iconvdata/tst-table.sh glibc-2.13/iconvdata/tst-table.sh ---- glibc-2.13.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 -+++ glibc-2.13/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -59,8 +59,11 @@ - irreversible=${charset}.irreversible - fi - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # iconv in one direction. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-table-from ${charset} \ - > ${objpfx}tst-${charset}.table - -diff -durN glibc-2.13.orig/intl/tst-codeset.sh glibc-2.13/intl/tst-codeset.sh ---- glibc-2.13.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 -+++ glibc-2.13/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -37,6 +37,9 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - ${common_objpfx}elf/ld.so --library-path $common_objpfx \ - ${objpfx}tst-codeset > ${objpfx}tst-codeset.out - -diff -durN glibc-2.13.orig/intl/tst-gettext.sh glibc-2.13/intl/tst-gettext.sh ---- glibc-2.13.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 -+++ glibc-2.13/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -51,9 +51,12 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. - MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.13.orig/intl/tst-gettext2.sh glibc-2.13/intl/tst-gettext2.sh ---- glibc-2.13.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 -+++ glibc-2.13/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -65,8 +65,11 @@ - LOCPATH=${objpfx}domaindir - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && - cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.13.orig/malloc/tst-mtrace.sh glibc-2.13/malloc/tst-mtrace.sh ---- glibc-2.13.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 -+++ glibc-2.13/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,9 +24,12 @@ - status=0 - trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ - LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${common_objpfx}malloc/tst-mtrace || status=1 - - if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then -diff -durN glibc-2.13.orig/nptl/tst-tls6.sh glibc-2.13/nptl/tst-tls6.sh ---- glibc-2.13.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 -+++ glibc-2.13/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -5,8 +5,8 @@ - rtld_installed_name=$1; shift - logfile=$common_objpfx/nptl/tst-tls6.out - --# We have to find libc and nptl --library_path=${common_objpfx}:${common_objpfx}nptl -+# We have to find libc and nptl (also libdl in case sandbox is in use) -+library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn - tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}/nptl/tst-tls5" - -diff -durN glibc-2.13.orig/posix/globtest.sh glibc-2.13/posix/globtest.sh ---- glibc-2.13.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 -+++ glibc-2.13/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -18,7 +18,7 @@ - esac - - # We have to find the libc and the NSS modules. --library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod -+library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn - - # Since we use `sort' we must make sure to use the same locale everywhere. - LC_ALL=C -diff -durN glibc-2.13.orig/posix/tst-getconf.sh glibc-2.13/posix/tst-getconf.sh ---- glibc-2.13.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 -+++ glibc-2.13/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -10,7 +10,10 @@ - else - rtld_installed_name=$1; shift - runit() { -- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" -+ -+ # make sure libdl is also in path in case sandbox is in use -+ library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" - } - fi - -diff -durN glibc-2.13.orig/posix/wordexp-tst.sh glibc-2.13/posix/wordexp-tst.sh ---- glibc-2.13.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 -+++ glibc-2.13/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -19,8 +19,11 @@ - " - export IFS - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - failed=0 --${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ -+${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 - cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 - wordexp returned 0 diff --git a/packages/glibc-ports/2.15/380-dont-build-timezone.patch b/packages/glibc-ports/2.15/380-dont-build-timezone.patch deleted file mode 100644 index 11c358e..0000000 --- a/packages/glibc-ports/2.15/380-dont-build-timezone.patch +++ /dev/null @@ -1,14 +0,0 @@ -timezone data has been split into the package sys-libs/timezone-data - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 -+++ glibc-2.13/Makeconfig 2009-11-13 00:50:41.000000000 +0100 -@@ -944,7 +944,7 @@ - stdlib stdio-common libio malloc string wcsmbs time dirent \ - grp pwd posix io termios resource misc socket sysvipc gmon \ - gnulib iconv iconvdata wctype manual shadow gshadow po argp \ -- crypt nss localedata timezone rt conform debug \ -+ crypt nss localedata rt conform debug \ - $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) - - ifndef avoid-generated diff --git a/packages/glibc-ports/2.15/400-alpha-xstat.patch b/packages/glibc-ports/2.15/400-alpha-xstat.patch deleted file mode 100644 index 6e4ab8f..0000000 --- a/packages/glibc-ports/2.15/400-alpha-xstat.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -@@ -386,6 +386,11 @@ - # define __ASSUME_GETDENTS32_D_TYPE 1 - #endif - -+/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ -+#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ -+# define __ASSUME_STAT64_SYSCALL 1 -+#endif -+ - /* Starting with version 2.5.3, the initial location returned by `brk' - after exec is always rounded up to the next page. */ - #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/packages/glibc-ports/2.15/430-alpha-creat.patch b/packages/glibc-ports/2.15/430-alpha-creat.patch deleted file mode 100644 index da6ddda..0000000 --- a/packages/glibc-ports/2.15/430-alpha-creat.patch +++ /dev/null @@ -1,14 +0,0 @@ -alpha does not have a __NR_creat - -http://bugs.gentoo.org/227275 -http://sourceware.org/bugzilla/show_bug.cgi?id=6650 - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 -@@ -1 +1,5 @@ - /* Defined as alias for the syscall. */ -+#include -+#ifndef __NR_creat -+#include "../../../../../io/creat64.c" -+#endif diff --git a/packages/glibc-ports/2.15/440-alpha-cache-shape.patch b/packages/glibc-ports/2.15/440-alpha-cache-shape.patch index b3158da..a9c9db0 100644 --- a/packages/glibc-ports/2.15/440-alpha-cache-shape.patch +++ b/packages/glibc-ports/2.15/440-alpha-cache-shape.patch @@ -5,9 +5,9 @@ duplication for static builds with dl-sysdep and dl-support. since dl-sysdep is both shared/static, there is no point in hooking dl-support anymore, so we can punt it. -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/dl-support.c ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 +diff -durN glibc-ports-2.15.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/dl-support.c +--- glibc-ports-2.15.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 @@ -1,2 +1,1 @@ -#include "dl-auxv.h" #include diff --git a/packages/glibc-ports/2.15/460-alpha-fix-gcc-4.1-warnings.patch b/packages/glibc-ports/2.15/460-alpha-fix-gcc-4.1-warnings.patch index a54d823..05a197e 100644 --- a/packages/glibc-ports/2.15/460-alpha-fix-gcc-4.1-warnings.patch +++ b/packages/glibc-ports/2.15/460-alpha-fix-gcc-4.1-warnings.patch @@ -16,9 +16,9 @@ I cannot really think of anything better than ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm.c ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 +diff -durN glibc-ports-2.15.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm.c +--- glibc-ports-2.15.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 @@ -178,13 +178,13 @@ static inline void stb_mb(unsigned char val, unsigned long addr) @@ -53,4 +53,3 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/alpha/ioperm return r; } -diff -durN glibc-2.15.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.15/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c diff --git a/packages/glibc-ports/2.15/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc-ports/2.15/490-alpha_alpha-add-fdatasync-support.patch deleted file mode 100644 index acf250d..0000000 --- a/packages/glibc-ports/2.15/490-alpha_alpha-add-fdatasync-support.patch +++ /dev/null @@ -1,126 +0,0 @@ -2009-07-25 Aurelien Jarno - - * sysdeps/unix/sysv/linux/kernel-features.h: define - __ASSUME_FDATASYNC. - * sysdeps/unix/sysv/linux/fdatasync.c: New file. - * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with - -fexceptions. - * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. - - sysdeps/unix/sysv/linux/Makefile | 1 - sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ - sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ - sysdeps/unix/sysv/linux/syscalls.list | 1 - 4 files changed, 76 insertions(+), 1 deletion(-) - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.13/sysdeps/unix/sysv/linux/Makefile ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 -@@ -21,6 +21,7 @@ - setfsuid setfsgid makedev epoll_pwait signalfd \ - eventfd eventfd_read eventfd_write prlimit - -+CFLAGS-fdatasync.c = -fexceptions - CFLAGS-gethostid.c = -fexceptions - CFLAGS-tst-writev.c += "-DARTIFICIAL_LIMIT=0x80000000-__getpagesize()" - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 -@@ -0,0 +1,69 @@ -+/* fdatasync -- synchronize at least the data part of a file with -+ the underlying media. Linux version. -+ -+ Copyright (C) 2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+ -+#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC -+static int __have_no_fdatasync; -+#endif -+ -+static int -+do_fdatasync (int fd) -+{ -+#ifdef __ASSUME_FDATASYNC -+ return INLINE_SYSCALL (fdatasync, 1, fd); -+#elif defined __NR_fdatasync -+ if (!__builtin_expect (__have_no_fdatasync, 0)) -+ { -+ int result = INLINE_SYSCALL (fdatasync, 1, fd); -+ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) -+ return result; -+ -+ __have_no_fdatasync = 1; -+ } -+#endif -+ return INLINE_SYSCALL (fsync, 1, fd); -+} -+ -+int -+__fdatasync (int fd) -+{ -+ if (SINGLE_THREAD_P) -+ return do_fdatasync (fd); -+ -+ int oldtype = LIBC_CANCEL_ASYNC (); -+ -+ int result = do_fdatasync (fd); -+ -+ LIBC_CANCEL_RESET (oldtype); -+ -+ return result; -+} -+ -+weak_alias (__fdatasync, fdatasync) -+ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 -@@ -459,6 +459,12 @@ - # define __ASSUME_FUTEX_LOCK_PI 1 - #endif - -+/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it -+ was already present in 2.0 kernels on other architectures. */ -+#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) -+# define __ASSUME_FDATASYNC 1 -+#endif -+ - /* Support for utimensat syscall was added in 2.6.22, on SH - only after 2.6.22-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020616 \ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 -@@ -11,7 +11,6 @@ - epoll_create1 EXTRA epoll_create1 i:i epoll_create1 - epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl - epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait --fdatasync - fdatasync Ci:i fdatasync - flock - flock i:ii __flock flock - fork - fork i: __libc_fork __fork fork - get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/packages/glibc-ports/2.15/530-alpha-fix-rtld-fPIC.patch b/packages/glibc-ports/2.15/530-alpha-fix-rtld-fPIC.patch index 800a789..8f9ce0d 100644 --- a/packages/glibc-ports/2.15/530-alpha-fix-rtld-fPIC.patch +++ b/packages/glibc-ports/2.15/530-alpha-fix-rtld-fPIC.patch @@ -5,9 +5,9 @@ ports/sysdeps/alpha/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/alpha/Makefile glibc-2.15/glibc-ports-2.15/sysdeps/alpha/Makefile ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 +diff -durN glibc-ports-2.15.orig/sysdeps/alpha/Makefile glibc-ports-2.15/sysdeps/alpha/Makefile +--- glibc-ports-2.15.orig/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.15/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 @@ -35,7 +35,8 @@ ifeq ($(subdir),elf) @@ -18,4 +18,3 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/alpha/Makefile glibc-2.15/gl endif # Build everything with full IEEE math support, and with dynamic rounding; -diff -durN glibc-2.15.orig/ports/sysdeps/alpha/Makefile glibc-2.15/ports/sysdeps/alpha/Makefile diff --git a/packages/glibc-ports/2.15/560-ppc-atomic.patch b/packages/glibc-ports/2.15/560-ppc-atomic.patch deleted file mode 100644 index ee1cb90..0000000 --- a/packages/glibc-ports/2.15/560-ppc-atomic.patch +++ /dev/null @@ -1,415 +0,0 @@ -sniped from suse - -Index: sysdeps/powerpc/bits/atomic.h -=================================================================== -RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v -retrieving revision 1.17 -diff -u -a -p -r1.17 atomic.h - -diff -durN glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h glibc-2.13/sysdeps/powerpc/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -85,14 +85,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -102,14 +102,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -118,12 +118,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -132,11 +132,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -144,12 +144,12 @@ - #define __arch_atomic_exchange_and_add_32(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stwcx. %1,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -157,12 +157,12 @@ - #define __arch_atomic_increment_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -170,27 +170,27 @@ - #define __arch_atomic_decrement_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_32(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ - " cmpwi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stwcx. %1,0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -60,14 +60,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp, __tmp2; \ - __asm __volatile (" clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -61,14 +61,14 @@ - unsigned int __tmp, __tmp2; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ - " clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -82,14 +82,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -98,14 +98,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -115,14 +115,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -132,14 +132,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -148,12 +148,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -162,11 +162,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -174,12 +174,12 @@ - #define __arch_atomic_exchange_and_add_64(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stdcx. %1,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -187,12 +187,12 @@ - #define __arch_atomic_increment_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -200,27 +200,27 @@ - #define __arch_atomic_decrement_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_64(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ - " cmpdi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stdcx. %1,0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) diff --git a/packages/glibc-ports/2.15/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch b/packages/glibc-ports/2.15/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch index 8a05574..427fb03 100644 --- a/packages/glibc-ports/2.15/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch +++ b/packages/glibc-ports/2.15/570-arm-cirrus-ep93xx-maverick-crunch-fpu.patch @@ -1,9 +1,9 @@ http://yann.poupet.free.fr/ep93xx/ Add support for the Maverick Crunch FPU on Cirrus EP93XX processor series -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/bits/endian.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/bits/endian.h ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.15.orig/sysdeps/arm/bits/endian.h glibc-ports-2.15/sysdeps/arm/bits/endian.h +--- glibc-ports-2.15.orig/sysdeps/arm/bits/endian.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.15/sysdeps/arm/bits/endian.h 2009-11-13 00:51:22.000000000 +0100 @@ -12,7 +12,7 @@ /* FPA floating point units are always big-endian, irrespective of the CPU endianness. VFP floating point units use the same endianness @@ -13,9 +13,9 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/bits/endian.h glibc-2.15 #define __FLOAT_WORD_ORDER __BYTE_ORDER #else #define __FLOAT_WORD_ORDER __BIG_ENDIAN -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.15.orig/sysdeps/arm/fpu/__longjmp.S glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S +--- glibc-ports-2.15.orig/sysdeps/arm/fpu/__longjmp.S 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S 2009-11-13 00:51:22.000000000 +0100 @@ -30,7 +30,33 @@ movs r0, r1 /* get the return value in place */ moveq r0, #1 /* can't let setjmp() return zero! */ @@ -50,9 +50,9 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/__longjmp.S glibc-2. LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) END (__longjmp) -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.15.orig/sysdeps/arm/fpu/bits/fenv.h glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h +--- glibc-ports-2.15.orig/sysdeps/arm/fpu/bits/fenv.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h 2009-11-13 00:51:22.000000000 +0100 @@ -20,6 +20,45 @@ # error "Never use directly; include instead." #endif @@ -108,9 +108,9 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/bits/fenv.h glibc-2. /* Type representing exception flags. */ typedef unsigned long int fexcept_t; -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.15.orig/sysdeps/arm/fpu/bits/setjmp.h glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h +--- glibc-ports-2.15.orig/sysdeps/arm/fpu/bits/setjmp.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h 2009-11-13 00:51:22.000000000 +0100 @@ -28,7 +28,11 @@ #ifndef _ASM /* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not @@ -123,9 +123,9 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/bits/setjmp.h glibc- +#endif #endif -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.15.orig/sysdeps/arm/fpu/fegetround.c glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c +--- glibc-ports-2.15.orig/sysdeps/arm/fpu/fegetround.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c 2009-11-13 00:51:22.000000000 +0100 @@ -18,9 +18,21 @@ 02111-1307 USA. */ @@ -148,9 +148,9 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fegetround.c glibc-2 + +#endif } -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.15.orig/sysdeps/arm/fpu/fesetround.c glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c +--- glibc-ports-2.15.orig/sysdeps/arm/fpu/fesetround.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c 2009-11-13 00:51:22.000000000 +0100 @@ -18,12 +18,28 @@ 02111-1307 USA. */ @@ -180,9 +180,9 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fesetround.c glibc-2 } libm_hidden_def (fesetround) -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.15.orig/sysdeps/arm/fpu/fpu_control.h glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h +--- glibc-ports-2.15.orig/sysdeps/arm/fpu/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h 2009-11-13 00:51:22.000000000 +0100 @@ -1,5 +1,6 @@ /* FPU control word definitions. ARM version. - Copyright (C) 1996, 1997, 1998, 2000 Free Software Foundation, Inc. @@ -278,9 +278,9 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/fpu_control.h glibc- +#endif + #endif /* _FPU_CONTROL_H */ -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.15.orig/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h +--- glibc-ports-2.15.orig/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h 2009-11-13 00:51:22.000000000 +0100 @@ -17,4 +17,8 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ @@ -290,9 +290,9 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/jmpbuf-offsets.h gli +#else #define __JMP_BUF_SP 20 +#endif -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.15.orig/sysdeps/arm/fpu/setjmp.S glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S +--- glibc-ports-2.15.orig/sysdeps/arm/fpu/setjmp.S 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S 2009-11-13 00:51:22.000000000 +0100 @@ -24,11 +24,41 @@ ENTRY (__sigsetjmp) @@ -335,9 +335,9 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/fpu/setjmp.S glibc-2.15/ /* Make a tail call to __sigjmp_save; it takes the same args. */ B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/gccframe.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/gccframe.h ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.15.orig/sysdeps/arm/gccframe.h glibc-ports-2.15/sysdeps/arm/gccframe.h +--- glibc-ports-2.15.orig/sysdeps/arm/gccframe.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.15/sysdeps/arm/gccframe.h 2009-11-13 00:51:22.000000000 +0100 @@ -17,6 +17,10 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ @@ -349,9 +349,9 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/gccframe.h glibc-2.15/gl +#endif #include -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/gmp-mparam.h glibc-2.15/glibc-ports-2.15/sysdeps/arm/gmp-mparam.h ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100 +diff -durN glibc-ports-2.15.orig/sysdeps/arm/gmp-mparam.h glibc-ports-2.15/sysdeps/arm/gmp-mparam.h +--- glibc-ports-2.15.orig/sysdeps/arm/gmp-mparam.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.15/sysdeps/arm/gmp-mparam.h 2009-11-13 00:51:22.000000000 +0100 @@ -29,7 +29,7 @@ #if defined(__ARMEB__) # define IEEE_DOUBLE_MIXED_ENDIAN 0 @@ -361,14 +361,3 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/arm/gmp-mparam.h glibc-2.15/ # define IEEE_DOUBLE_MIXED_ENDIAN 0 # define IEEE_DOUBLE_BIG_ENDIAN 0 #else -diff -durN glibc-2.15.orig/ports/sysdeps/arm/bits/endian.h glibc-2.15/ports/sysdeps/arm/bits/endian.h -diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/__longjmp.S glibc-2.15/ports/sysdeps/arm/fpu/__longjmp.S -diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/bits/fenv.h glibc-2.15/ports/sysdeps/arm/fpu/bits/fenv.h -diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/bits/setjmp.h glibc-2.15/ports/sysdeps/arm/fpu/bits/setjmp.h -diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/fegetround.c glibc-2.15/ports/sysdeps/arm/fpu/fegetround.c -diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/fesetround.c glibc-2.15/ports/sysdeps/arm/fpu/fesetround.c -diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/fpu_control.h glibc-2.15/ports/sysdeps/arm/fpu/fpu_control.h -diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/jmpbuf-offsets.h glibc-2.15/ports/sysdeps/arm/fpu/jmpbuf-offsets.h -diff -durN glibc-2.15.orig/ports/sysdeps/arm/fpu/setjmp.S glibc-2.15/ports/sysdeps/arm/fpu/setjmp.S -diff -durN glibc-2.15.orig/ports/sysdeps/arm/gccframe.h glibc-2.15/ports/sysdeps/arm/gccframe.h -diff -durN glibc-2.15.orig/ports/sysdeps/arm/gmp-mparam.h glibc-2.15/ports/sysdeps/arm/gmp-mparam.h diff --git a/packages/glibc-ports/2.15/580-nptl-lowlevellock.patch b/packages/glibc-ports/2.15/580-nptl-lowlevellock.patch index a39e463..8a841be 100644 --- a/packages/glibc-ports/2.15/580-nptl-lowlevellock.patch +++ b/packages/glibc-ports/2.15/580-nptl-lowlevellock.patch @@ -9,9 +9,9 @@ In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: ../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.) ../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function) -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 +diff -durN glibc-ports-2.15.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +--- glibc-ports-2.15.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 @@ -25,6 +25,7 @@ #include #include @@ -20,4 +20,3 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/unix/sysv/linux/arm/nptl/low #define FUTEX_WAIT 0 #define FUTEX_WAKE 1 -diff -durN glibc-2.15.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.15/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h diff --git a/packages/glibc-ports/2.15/610-fpu-cw-mips.patch b/packages/glibc-ports/2.15/610-fpu-cw-mips.patch index 8692a1f..388e4d6 100644 --- a/packages/glibc-ports/2.15/610-fpu-cw-mips.patch +++ b/packages/glibc-ports/2.15/610-fpu-cw-mips.patch @@ -1,8 +1,8 @@ http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html -diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/mips/fpu_control.h glibc-2.15/glibc-ports-2.15/sysdeps/mips/fpu_control.h ---- glibc-2.15.orig/glibc-ports-2.15/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.15/glibc-ports-2.15/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 +diff -durN glibc-ports-2.15.orig/sysdeps/mips/fpu_control.h glibc-ports-2.15/sysdeps/mips/fpu_control.h +--- glibc-ports-2.15.orig/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.15/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 @@ -86,7 +86,7 @@ #define _FPU_RC_UP 0x2 #define _FPU_RC_DOWN 0x3 @@ -12,4 +12,3 @@ diff -durN glibc-2.15.orig/glibc-ports-2.15/sysdeps/mips/fpu_control.h glibc-2.1 /* The fdlibm code requires strict IEEE double precision arithmetic, -diff -durN glibc-2.15.orig/ports/sysdeps/mips/fpu_control.h glibc-2.15/ports/sysdeps/mips/fpu_control.h diff --git a/packages/glibc-ports/2.15/630-mips_shn_undef-hack.patch b/packages/glibc-ports/2.15/630-mips_shn_undef-hack.patch deleted file mode 100644 index 791d76c..0000000 --- a/packages/glibc-ports/2.15/630-mips_shn_undef-hack.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -durN glibc-2.13.orig/elf/dl-lookup.c glibc-2.13/elf/dl-lookup.c ---- glibc-2.13.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 -+++ glibc-2.13/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 -@@ -301,6 +301,12 @@ - /* FALLTHROUGH */ - case STB_GLOBAL: - success: -+#ifdef __mips__ -+ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF -+ symbols, we skip them. */ -+ if (sym->st_shndx == SHN_UNDEF) -+ break; -+#endif - /* Global definition. Just what we need. */ - result->s = sym; - result->m = (struct link_map *) map; diff --git a/packages/glibc-ports/2.15/640-alpha-atfcts.patch b/packages/glibc-ports/2.15/640-alpha-atfcts.patch deleted file mode 100644 index 7a8a94a..0000000 --- a/packages/glibc-ports/2.15/640-alpha-atfcts.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 -@@ -437,7 +437,8 @@ - the code. On PPC they were introduced in 2.6.17-rc1, - on SH in 2.6.19-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020611 \ -- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) -+ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ -+ && (!defined __alpha__) - # define __ASSUME_ATFCTS 1 - #endif - diff --git a/packages/glibc-ports/2.15/650-syslog.patch b/packages/glibc-ports/2.15/650-syslog.patch deleted file mode 100644 index c20cafc..0000000 --- a/packages/glibc-ports/2.15/650-syslog.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c ---- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 -+++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 -@@ -152,7 +152,7 @@ - #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID - /* Check for invalid bits. */ - if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { -- syslog(INTERNALLOG, -+ __syslog(INTERNALLOG, - "syslog: unknown facility/priority: %x", pri); - pri &= LOG_PRIMASK|LOG_FACMASK; - } diff --git a/packages/glibc-ports/2.15/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc-ports/2.15/660-debug-readlink_chk-readklinkat_chk.patch deleted file mode 100644 index a5a7052..0000000 --- a/packages/glibc-ports/2.15/660-debug-readlink_chk-readklinkat_chk.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c ---- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 -+++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 -@@ -25,7 +25,7 @@ - - - ssize_t --__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) -+__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) - { - if (len > buflen) - __chk_fail (); -diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c ---- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 -+++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 -@@ -21,7 +21,7 @@ - - - ssize_t --__readlinkat_chk (int fd, const char *path, void *buf, size_t len, -+__readlinkat_chk (int fd, const char *path, char *buf, size_t len, - size_t buflen) - { - if (len > buflen) diff --git a/packages/glibc-ports/2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch b/packages/glibc-ports/2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch index 59f95aa..1f08ba1 100644 --- a/packages/glibc-ports/2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch +++ b/packages/glibc-ports/2.16.0/090-Fix-ARM-build-with-GCC-trunk.patch @@ -23,8 +23,8 @@ Tested that this fixes the build for ARM. diff --git a/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c index 6ccd9b4..660d148 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c ++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c @@ -22,7 +22,8 @@ #include @@ -37,8 +37,8 @@ index 6ccd9b4..660d148 100644 static _Unwind_Reason_Code (*libgcc_s_forcedunwind) diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c index bff3e2b..1f1eb71 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c +--- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c ++++ b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c @@ -20,7 +20,8 @@ #include #include diff --git a/packages/glibc-ports/2.16.0/100-respect-env-CPPFLAGS.patch b/packages/glibc-ports/2.16.0/100-respect-env-CPPFLAGS.patch deleted file mode 100644 index dce491c..0000000 --- a/packages/glibc-ports/2.16.0/100-respect-env-CPPFLAGS.patch +++ /dev/null @@ -1,14 +0,0 @@ -Respect environment CPPFLAGS when we run ./configure so we can inject -random -D things without having to set CFLAGS/ASFLAGS - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 -+++ glibc-2.13/Makeconfig 2009-11-13 00:49:41.000000000 +0100 -@@ -668,6 +668,7 @@ - $(foreach lib,$(libof-$(basename $(@F))) \ - $(libof-$(field.le_next)) - -+#define LIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = LIST_FIRST((head)); \ -+ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - /* - * List access methods. - */ -@@ -197,6 +202,16 @@ - #define SLIST_FOREACH(var, head, field) \ - for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) - -+#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = SLIST_FIRST((head)); \ -+ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ -+#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ -+ for ((varp) = &SLIST_FIRST((head)); \ -+ ((var) = *(varp)) != NULL; \ -+ (varp) = &SLIST_NEXT((var), field)) -+ - /* - * Singly-linked List access methods. - */ -@@ -242,6 +257,12 @@ - (head)->stqh_last = &(elm)->field.stqe_next; \ - } while (/*CONSTCOND*/0) - -+#define STAILQ_LAST(head, type, field) \ -+ (STAILQ_EMPTY((head)) ? \ -+ NULL : \ -+ ((struct type *)(void *) \ -+ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) -+ - #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ - if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ - (head)->stqh_last = &(elm)->field.stqe_next; \ -@@ -271,6 +292,11 @@ - (var); \ - (var) = ((var)->field.stqe_next)) - -+#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = STAILQ_FIRST((head)); \ -+ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define STAILQ_CONCAT(head1, head2) do { \ - if (!STAILQ_EMPTY((head2))) { \ - *(head1)->stqh_last = (head2)->stqh_first; \ -@@ -437,11 +463,21 @@ - (var); \ - (var) = ((var)->field.tqe_next)) - -+#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ -+ for ((var) = TAILQ_FIRST((head)); \ -+ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ - for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ - (var); \ - (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) - -+#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ -+ for ((var) = TAILQ_LAST((head), headname); \ -+ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ -+ (var) = (tvar)) -+ - #define TAILQ_CONCAT(head1, head2, field) do { \ - if (!TAILQ_EMPTY(head2)) { \ - *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/packages/glibc-ports/2.16.0/170-localedef-fix-trampoline.patch b/packages/glibc-ports/2.16.0/170-localedef-fix-trampoline.patch deleted file mode 100644 index 3cc6559..0000000 --- a/packages/glibc-ports/2.16.0/170-localedef-fix-trampoline.patch +++ /dev/null @@ -1,53 +0,0 @@ -# DP: Description: Fix localedef segfault when run under exec-shield, -# PaX or similar. (#231438, #198099) -# DP: Dpatch Author: James Troup -# DP: Patch Author: (probably) Jakub Jelinek -# DP: Upstream status: Unknown -# DP: Status Details: Unknown -# DP: Date: 2004-03-16 -diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h ---- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 -+++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 -@@ -203,6 +203,42 @@ - } - } - } -+ -+/* GCC ATM seems to do a poor job with pointers to nested functions passed -+ to inlined functions. Help it a little bit with this hack. */ -+#define wchead_table_iterate(tp, fn) \ -+do \ -+ { \ -+ struct wchead_table *t = (tp); \ -+ uint32_t index1; \ -+ for (index1 = 0; index1 < t->level1_size; index1++) \ -+ { \ -+ uint32_t lookup1 = t->level1[index1]; \ -+ if (lookup1 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup1_shifted = lookup1 << t->q; \ -+ uint32_t index2; \ -+ for (index2 = 0; index2 < (1 << t->q); index2++) \ -+ { \ -+ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ -+ if (lookup2 != ((uint32_t) ~0)) \ -+ { \ -+ uint32_t lookup2_shifted = lookup2 << t->p; \ -+ uint32_t index3; \ -+ for (index3 = 0; index3 < (1 << t->p); index3++) \ -+ { \ -+ struct element_t *lookup3 \ -+ = t->level3[index3 + lookup2_shifted]; \ -+ if (lookup3 != NULL) \ -+ fn ((((index1 << t->q) + index2) << t->p) + index3, \ -+ lookup3); \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } \ -+ } while (0) -+ - #endif - - #ifndef NO_FINALIZE diff --git a/packages/glibc-ports/2.16.0/180-resolv-dynamic.patch b/packages/glibc-ports/2.16.0/180-resolv-dynamic.patch deleted file mode 100644 index e916bce..0000000 --- a/packages/glibc-ports/2.16.0/180-resolv-dynamic.patch +++ /dev/null @@ -1,39 +0,0 @@ -ripped from SuSE - -if /etc/resolv.conf is updated, then make sure applications -already running get the updated information. - -http://bugs.gentoo.org/177416 - -diff -durN glibc-2.13.orig/resolv/res_libc.c glibc-2.13/resolv/res_libc.c ---- glibc-2.13.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 -+++ glibc-2.13/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 -@@ -22,6 +22,7 @@ - #include - #include - #include -+#include - - - /* The following bit is copied from res_data.c (where it is #ifdef'ed -@@ -95,6 +96,20 @@ - __res_maybe_init (res_state resp, int preinit) - { - if (resp->options & RES_INIT) { -+ static time_t last_mtime, last_check; -+ time_t now; -+ struct stat statbuf; -+ -+ time (&now); -+ if (now != last_check) { -+ last_check = now; -+ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { -+ last_mtime = statbuf.st_mtime; -+ atomicinclock (lock); -+ atomicinc (__res_initstamp); -+ atomicincunlock (lock); -+ } -+ } - if (__res_initstamp != resp->_u._ext.initstamp) { - if (resp->nscount > 0) - __res_iclose (resp, true); diff --git a/packages/glibc-ports/2.16.0/200-fadvise64_64.patch b/packages/glibc-ports/2.16.0/200-fadvise64_64.patch deleted file mode 100644 index 71bca38..0000000 --- a/packages/glibc-ports/2.16.0/200-fadvise64_64.patch +++ /dev/null @@ -1,28 +0,0 @@ -ripped from Debian - - sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 -@@ -35,6 +35,19 @@ - return INTERNAL_SYSCALL_ERRNO (ret, err); - return 0; - #else -+# ifdef __NR_fadvise64_64 -+ INTERNAL_SYSCALL_DECL (err); -+ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, -+ __LONG_LONG_PAIR ((long) (offset >> 31), -+ (long) offset), -+ __LONG_LONG_PAIR ((long) (len >> 31), -+ (long) len), -+ advise); -+ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) -+ return INTERNAL_SYSCALL_ERRNO (ret, err); -+ return 0; -+# else - return ENOSYS; -+# endif - #endif - } diff --git a/packages/glibc-ports/2.16.0/260-assume-pipe2.patch b/packages/glibc-ports/2.16.0/260-assume-pipe2.patch deleted file mode 100644 index 54f0382..0000000 --- a/packages/glibc-ports/2.16.0/260-assume-pipe2.patch +++ /dev/null @@ -1,40 +0,0 @@ -http://bugs.gentoo.org/250342 -http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 - -we cant assume sock_cloexec and pipe2 are bound together as the former defines -are found in glibc only while the latter are a combo of kernel headers and -glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub -inside of glibc, we hit a problem. for example: - -#include -#include -main() -{ - getgrnam("portage"); - if (!popen("ls", "r")) - perror("popen()"); -} - -getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both -__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against -older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS -stub for it. so popen() will always fail as glibc assumes pipe2() works. - -diff -durN glibc-2.16.0.orig/socket/have_sock_cloexec.c glibc-2.16.0/socket/have_sock_cloexec.c ---- glibc-2.16.0.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 -+++ glibc-2.16.0/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 -@@ -15,9 +15,14 @@ - License along with the GNU C Library; if not, see - . */ - -+#include - #include - #include - - #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC - int __have_sock_cloexec; - #endif -+ -+#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 -+int __have_pipe2; -+#endif diff --git a/packages/glibc-ports/2.16.0/270-china.patch b/packages/glibc-ports/2.16.0/270-china.patch deleted file mode 100644 index 41d7759..0000000 --- a/packages/glibc-ports/2.16.0/270-china.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.13.orig/localedata/locales/zh_TW glibc-2.13/localedata/locales/zh_TW ---- glibc-2.13.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 -+++ glibc-2.13/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 -@@ -1,7 +1,7 @@ - comment_char % - escape_char / - % --% Chinese language locale for Taiwan R.O.C. -+% Chinese language locale for Taiwan - % charmap: BIG5-CP950 - % - % Original Author: -@@ -17,7 +17,7 @@ - % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf - - LC_IDENTIFICATION --title "Chinese locale for Taiwan R.O.C." -+title "Chinese locale for Taiwan" - source "" - address "" - contact "" -@@ -25,7 +25,7 @@ - tel "" - fax "" - language "Chinese" --territory "Taiwan R.O.C." -+territory "Taiwan" - revision "0.2" - date "2000-08-02" - % diff --git a/packages/glibc-ports/2.16.0/280-new-valencian-locale.patch b/packages/glibc-ports/2.16.0/280-new-valencian-locale.patch deleted file mode 100644 index 4cdd108..0000000 --- a/packages/glibc-ports/2.16.0/280-new-valencian-locale.patch +++ /dev/null @@ -1,115 +0,0 @@ -http://bugs.gentoo.org/show_bug.cgi?id=131815 -http://sourceware.org/bugzilla/show_bug.cgi?id=2522 - -diff -durN glibc-2.13.orig/localedata/SUPPORTED glibc-2.13/localedata/SUPPORTED ---- glibc-2.13.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 -+++ glibc-2.13/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 -@@ -72,6 +72,8 @@ - ca_ES.UTF-8/UTF-8 \ - ca_ES/ISO-8859-1 \ - ca_ES@euro/ISO-8859-15 \ -+ca_ES.UTF-8@valencia/UTF-8 \ -+ca_ES@valencia/ISO-8859-15 \ - ca_FR.UTF-8/UTF-8 \ - ca_FR/ISO-8859-15 \ - ca_IT.UTF-8/UTF-8 \ -diff -durN glibc-2.13.orig/localedata/locales/ca_ES@valencia glibc-2.13/localedata/locales/ca_ES@valencia ---- glibc-2.13.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.13/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 -@@ -0,0 +1,96 @@ -+comment_char % -+escape_char / -+% -+% Valencian (southern Catalan) locale for Spain with Euro -+% -+% Note that this locale is almost the same as ca_ES@euro. The point of having -+% a separate locale is only for PO translations, which have a lot of social -+% support and are very appreciated by the Valencian-speaking community. -+% -+% Contact: Jordi Mallach -+% Email: jordi@gnu.org -+% Tel: -+% Fax: -+% Language: ca -+% Territory: ES -+% Option: euro -+% Revision: 1.0 -+% Date: 2006-04-06 -+% Application: general -+% Users: general -+% Repertoiremap: mnemonic,ds -+% Charset: ISO-8859-15 -+% Distribution and use is free, also -+% for commercial purposes. -+ -+LC_IDENTIFICATION -+title "Valencian (southern Catalan) locale for Spain with Euro" -+source "" -+address "" -+contact "Jordi Mallach" -+email "jordi@gnu.org" -+tel "" -+fax "" -+language "Catalan" -+territory "Spain" -+revision "1.0" -+date "2006-04-06" -+% -+category "ca_ES@valencia:2006";LC_IDENTIFICATION -+category "ca_ES@valencia:2006";LC_CTYPE -+category "ca_ES@valencia:2006";LC_COLLATE -+category "ca_ES@valencia:2006";LC_MONETARY -+category "ca_ES@valencia:2006";LC_NUMERIC -+category "ca_ES@valencia:2006";LC_TIME -+category "ca_ES@valencia:2006";LC_MESSAGES -+category "ca_ES@valencia:2006";LC_PAPER -+category "ca_ES@valencia:2006";LC_NAME -+category "ca_ES@valencia:2006";LC_ADDRESS -+category "ca_ES@valencia:2006";LC_TELEPHONE -+category "ca_ES@valencia:2006";LC_MEASUREMENT -+ -+END LC_IDENTIFICATION -+ -+LC_CTYPE -+copy "i18n" -+END LC_CTYPE -+ -+LC_COLLATE -+copy "ca_ES" -+END LC_COLLATE -+ -+LC_MONETARY -+copy "ca_ES" -+END LC_MONETARY -+ -+LC_NUMERIC -+copy "ca_ES" -+END LC_NUMERIC -+ -+LC_TIME -+copy "ca_ES" -+END LC_TIME -+ -+LC_MESSAGES -+copy "ca_ES" -+END LC_MESSAGES -+ -+LC_PAPER -+copy "ca_ES" -+END LC_PAPER -+ -+LC_NAME -+copy "ca_ES" -+END LC_NAME -+ -+LC_ADDRESS -+copy "ca_ES" -+END LC_ADDRESS -+ -+LC_TELEPHONE -+copy "ca_ES" -+END LC_TELEPHONE -+ -+LC_MEASUREMENT -+copy "ca_ES" -+END LC_MEASUREMENT diff --git a/packages/glibc-ports/2.16.0/300-nscd-one-fork.patch b/packages/glibc-ports/2.16.0/300-nscd-one-fork.patch deleted file mode 100644 index 13b2861..0000000 --- a/packages/glibc-ports/2.16.0/300-nscd-one-fork.patch +++ /dev/null @@ -1,43 +0,0 @@ -only fork one to assist in stop-start-daemon assumptions about daemon behavior - -http://bugs.gentoo.org/190785 - -diff -durN glibc-2.13.orig/nscd/nscd.c glibc-2.13/nscd/nscd.c ---- glibc-2.13.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 -+++ glibc-2.13/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 -@@ -203,6 +203,9 @@ - exit (0); - } - -+ if (write_pid (_PATH_NSCDPID) < 0) -+ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -+ - int nullfd = open (_PATH_DEVNULL, O_RDWR); - if (nullfd != -1) - { -@@ -252,15 +255,6 @@ - for (i = min_close_fd; i < getdtablesize (); i++) - close (i); - -- if (run_mode == RUN_DAEMONIZE) -- { -- pid = fork (); -- if (pid == -1) -- error (EXIT_FAILURE, errno, _("cannot fork")); -- if (pid != 0) -- exit (0); -- } -- - setsid (); - - if (chdir ("/") != 0) -@@ -245,9 +242,6 @@ - - openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); - -- if (write_pid (_PATH_NSCDPID) < 0) -- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); -- - if (!init_logfile ()) - dbg_log (_("Could not create log file")); - diff --git a/packages/glibc-ports/2.16.0/310-hppa-nptl-carlos.patch b/packages/glibc-ports/2.16.0/310-hppa-nptl-carlos.patch deleted file mode 100644 index 11e8a65..0000000 --- a/packages/glibc-ports/2.16.0/310-hppa-nptl-carlos.patch +++ /dev/null @@ -1,246 +0,0 @@ - - -diff -durN glibc-2.13.orig/elf/rtld.c glibc-2.13/elf/rtld.c ---- glibc-2.13.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 -+++ glibc-2.13/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 -@@ -392,14 +392,14 @@ - know it is available. We do not have to clear the memory if we - do not have to use the temporary bootstrap_map. Global variables - are initialized to zero by default. */ --#ifndef DONT_USE_BOOTSTRAP_MAP -+#if !defined DONT_USE_BOOTSTRAP_MAP - # ifdef HAVE_BUILTIN_MEMSET - __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); - # else -- for (size_t cnt = 0; -- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); -- ++cnt) -- bootstrap_map.l_info[cnt] = 0; -+ /* Clear the whole bootstrap_map structure */ -+ for (char *cnt = (char *)&(bootstrap_map); -+ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); -+ *cnt++ = '\0'); - # endif - # if USE___THREAD - bootstrap_map.l_tls_modid = 0; -diff -durN glibc-2.13.orig/include/atomic.h glibc-2.13/include/atomic.h ---- glibc-2.13.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 -+++ glibc-2.13/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 -@@ -185,7 +185,7 @@ - __typeof (*(mem)) __atg5_value = (newvalue); \ - \ - do \ -- __atg5_oldval = *__atg5_memp; \ -+ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ - __atg5_oldval), 0)); \ -@@ -206,7 +206,7 @@ - __typeof (*(mem)) __atg6_value = (value); \ - \ - do \ -- __atg6_oldval = *__atg6_memp; \ -+ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ - __atg6_oldval \ -@@ -224,7 +224,7 @@ - __typeof (*(mem)) __atg7_value = (value); \ - \ - do \ -- __atg7_oldv = *__atg7_memp; \ -+ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ - __atg7_oldv \ -@@ -242,7 +242,7 @@ - __typeof (mem) __atg8_memp = (mem); \ - __typeof (*(mem)) __atg8_value = (value); \ - do { \ -- __atg8_oldval = *__atg8_memp; \ -+ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ - if (__atg8_oldval >= __atg8_value) \ - break; \ - } while (__builtin_expect \ -@@ -259,7 +259,7 @@ - __typeof (mem) __atg9_memp = (mem); \ - __typeof (*(mem)) __atg9_value = (value); \ - do { \ -- __atg9_oldv = *__atg9_memp; \ -+ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ - if (__atg9_oldv >= __atg9_value) \ - break; \ - } while (__builtin_expect \ -@@ -277,7 +277,7 @@ - __typeof (mem) __atg10_memp = (mem); \ - __typeof (*(mem)) __atg10_value = (value); \ - do { \ -- __atg10_oldval = *__atg10_memp; \ -+ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ - if (__atg10_oldval <= __atg10_value) \ - break; \ - } while (__builtin_expect \ -@@ -361,7 +361,7 @@ - \ - do \ - { \ -- __atg11_oldval = *__atg11_memp; \ -+ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ - if (__builtin_expect (__atg11_oldval <= 0, 0)) \ - break; \ - } \ -@@ -400,7 +400,7 @@ - __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ - \ - do \ -- __atg14_old = (*__atg14_memp); \ -+ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ - __atg14_old | __atg14_mask,\ -@@ -418,7 +418,7 @@ - __typeof (*(mem)) __atg15_mask = (mask); \ - \ - do \ -- __atg15_old = (*__atg15_memp); \ -+ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ - __atg15_old & __atg15_mask, \ -@@ -450,7 +450,7 @@ - __typeof (*(mem)) __atg16_mask = (mask); \ - \ - do \ -- __atg16_old = (*__atg16_memp); \ -+ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ - __atg16_old & __atg16_mask,\ -@@ -468,7 +468,7 @@ - __typeof (*(mem)) __atg17_mask = (mask); \ - \ - do \ -- __atg17_old = (*__atg17_memp); \ -+ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ - __atg17_old | __atg17_mask, \ -@@ -484,7 +484,7 @@ - __typeof (*(mem)) __atg18_mask = (mask); \ - \ - do \ -- __atg18_old = (*__atg18_memp); \ -+ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ - while (__builtin_expect \ - (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ - __atg18_old | __atg18_mask,\ -@@ -500,7 +500,7 @@ - __typeof (*(mem)) __atg19_mask = (mask); \ - \ - do \ -- __atg19_old = (*__atg19_memp); \ -+ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ - while (__builtin_expect \ - (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ - __atg19_old | __atg19_mask,\ -diff -durN glibc-2.13.orig/nptl/Makefile glibc-2.13/nptl/Makefile ---- glibc-2.13.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 -+++ glibc-2.13/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -266,9 +266,9 @@ - # Files which must not be linked with libpthread. - tests-nolibpthread = tst-unload - --# This sets the stack resource limit to 1023kb, which is not a multiple --# of the page size since every architecture's page size is > 1k. --tst-oddstacklimit-ENV = ; ulimit -s 1023; -+# This sets the stack resource limit to 8193kb, which is not a multiple -+# of the page size since every architecture's page size is 4096 bytes. -+tst-oddstacklimit-ENV = ; ulimit -s 8193; - - gen-as-const-headers = pthread-errnos.sym - -@@ -426,6 +426,35 @@ - CFLAGS-tst-cleanupx4.c += -fexceptions - CFLAGS-tst-oncex3.c += -fexceptions - CFLAGS-tst-oncex4.c += -fexceptions -+ -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed -+LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) -+LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) -+ - CFLAGS-tst-align.c += $(stack-align-test-flags) - CFLAGS-tst-align3.c += $(stack-align-test-flags) - CFLAGS-tst-initializers1.c = -W -Wall -Werror -diff -durN glibc-2.13.orig/nptl/pthread_barrier_wait.c glibc-2.13/nptl/pthread_barrier_wait.c ---- glibc-2.13.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 -+++ glibc-2.13/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 -@@ -64,7 +64,7 @@ - do - lll_futex_wait (&ibarrier->curr_event, event, - ibarrier->private ^ FUTEX_PRIVATE_FLAG); -- while (event == ibarrier->curr_event); -+ while (event == *(volatile unsigned int *)&ibarrier->curr_event); - } - - /* Make sure the init_count is stored locally or in a register. */ -diff -durN glibc-2.13.orig/nptl/sysdeps/pthread/Makefile glibc-2.13/nptl/sysdeps/pthread/Makefile ---- glibc-2.13.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 -+++ glibc-2.13/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -33,7 +33,9 @@ - - ifeq ($(have-forced-unwind),yes) - tests += tst-mqueue8x -+ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed - CFLAGS-tst-mqueue8x.c += -fexceptions -+LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) - endif - endif - -diff -durN glibc-2.13.orig/stdio-common/Makefile glibc-2.13/stdio-common/Makefile ---- glibc-2.13.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 -+++ glibc-2.13/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 -@@ -82,7 +82,7 @@ - $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' - endif - --CFLAGS-vfprintf.c = -Wno-uninitialized -+CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch - CFLAGS-vfwprintf.c = -Wno-uninitialized - CFLAGS-tst-printf.c = -Wno-format - CFLAGS-tstdiomisc.c = -Wno-format -diff -durN glibc-2.13.orig/sunrpc/clnt_udp.c glibc-2.13/sunrpc/clnt_udp.c ---- glibc-2.13.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 -+++ glibc-2.13/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 -@@ -456,7 +456,7 @@ - while (inlen < 0 && errno == EINTR); - if (inlen < 0) - { -- if (errno == EWOULDBLOCK) -+ if (errno == EWOULDBLOCK || errno == EAGAIN) - continue; - cu->cu_error.re_errno = errno; - return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/packages/glibc-ports/2.16.0/330-m68k-sys-user.patch b/packages/glibc-ports/2.16.0/330-m68k-sys-user.patch index f113996..932d917 100644 --- a/packages/glibc-ports/2.16.0/330-m68k-sys-user.patch +++ b/packages/glibc-ports/2.16.0/330-m68k-sys-user.patch @@ -1,8 +1,8 @@ copied from kernel as it is sanitized now -diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h ---- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 +diff -durN glibc-ports-2.16.0.orig/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-ports-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h +--- glibc-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-2.16.0/sysdeps/unix/sysv/linux/m68k/sys/user.h 2009-11-13 00:50:31.000000000 +0100 @@ -1,3 +1,90 @@ +#ifndef _SYS_USER_H +#define _SYS_USER_H @@ -94,4 +94,3 @@ diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/m68k/sys /* Copyright (C) 2008, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. -diff -durN glibc-2.16.0.orig/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h glibc-2.16.0/ports/sysdeps/unix/sysv/linux/m68k/sys/user.h diff --git a/packages/glibc-ports/2.16.0/340-dl_execstack-PaX-support.patch b/packages/glibc-ports/2.16.0/340-dl_execstack-PaX-support.patch deleted file mode 100644 index 2402af0..0000000 --- a/packages/glibc-ports/2.16.0/340-dl_execstack-PaX-support.patch +++ /dev/null @@ -1,66 +0,0 @@ - With latest versions of glibc, a lot of apps failed on a PaX enabled - system with: - cannot enable executable stack as shared object requires: Permission denied - - This is due to PaX 'exec-protecting' the stack, and ld.so then trying - to make the stack executable due to some libraries not containing the - PT_GNU_STACK section. Bug #32960. (12 Nov 2003). - - Patch also NPTL. Bug #116086. (20 Dec 2005). - -diff -durN glibc-2.13.orig/nptl/allocatestack.c glibc-2.13/nptl/allocatestack.c ---- glibc-2.13.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 -+++ glibc-2.13/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -329,7 +329,8 @@ - # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" - #endif - if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) -- return errno; -+ if (errno != EACCES) /* PAX is enabled */ -+ return errno; - - return 0; - } -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 -@@ -63,7 +63,10 @@ - else - # endif - { -- result = errno; -+ if (errno == EACCES) /* PAX is enabled */ -+ result = 0; -+ else -+ result = errno; - goto out; - } - } -@@ -89,7 +92,12 @@ - page -= size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; -@@ -115,7 +123,12 @@ - page += size; - else - { -- if (errno != ENOMEM) /* Unexpected failure mode. */ -+ if (errno == EACCES) /* PAX is enabled */ -+ { -+ result = 0; -+ goto out; -+ } -+ else if (errno != ENOMEM) /* Unexpected failure mode. */ - { - result = errno; - goto out; diff --git a/packages/glibc-ports/2.16.0/350-pre20040117-pt_pax.patch b/packages/glibc-ports/2.16.0/350-pre20040117-pt_pax.patch deleted file mode 100644 index f8f6b83..0000000 --- a/packages/glibc-ports/2.16.0/350-pre20040117-pt_pax.patch +++ /dev/null @@ -1,32 +0,0 @@ - - -diff -durN glibc-2.13.orig/elf/elf.h glibc-2.13/elf/elf.h ---- glibc-2.13.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 -+++ glibc-2.13/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 -@@ -580,6 +580,7 @@ - #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ - #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ - #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ -+#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ - #define PT_LOSUNW 0x6ffffffa - #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ - #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ -@@ -593,6 +594,18 @@ - #define PF_X (1 << 0) /* Segment is executable */ - #define PF_W (1 << 1) /* Segment is writable */ - #define PF_R (1 << 2) /* Segment is readable */ -+#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ -+#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ -+#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ -+#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ -+#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ -+#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ -+#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ -+#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ -+#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ -+#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ -+#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ -+#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ - #define PF_MASKOS 0x0ff00000 /* OS-specific */ - #define PF_MASKPROC 0xf0000000 /* Processor-specific */ - diff --git a/packages/glibc-ports/2.16.0/360-tests-sandbox-libdl-paths.patch b/packages/glibc-ports/2.16.0/360-tests-sandbox-libdl-paths.patch deleted file mode 100644 index 9f78c52..0000000 --- a/packages/glibc-ports/2.16.0/360-tests-sandbox-libdl-paths.patch +++ /dev/null @@ -1,193 +0,0 @@ -when glibc runs its tests, it does so by invoking the local library loader. -in Gentoo, we build/run inside of our "sandbox" which itself is linked against -libdl (so that it can load libraries and pull out symbols). the trouble -is that when you upgrade from an older glibc to the new one, often times -internal symbols change name or abi. this is normally OK as you cannot use -libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so -we always say "keep all of the glibc libraries from the same build". but -when glibc runs its tests, it uses dynamic paths to point to its new local -copies of libraries. if the test doesnt use libdl, then glibc doesnt add -its path, and when sandbox triggers the loading of libdl, glibc does so -from the host system system. this gets us into the case of all libraries -are from the locally compiled version of glibc except for libdl.so. - -Fix by Wormo - -http://bugs.gentoo.org/56898 - -diff -durN glibc-2.13.orig/grp/tst_fgetgrent.sh glibc-2.13/grp/tst_fgetgrent.sh ---- glibc-2.13.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 -+++ glibc-2.13/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,7 +24,8 @@ - rtld_installed_name=$1; shift - - testout=${common_objpfx}/grp/tst_fgetgrent.out --library_path=${common_objpfx} -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn - - result=0 - -diff -durN glibc-2.13.orig/iconvdata/run-iconv-test.sh glibc-2.13/iconvdata/run-iconv-test.sh ---- glibc-2.13.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 -+++ glibc-2.13/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -34,7 +34,7 @@ - export GCONV_PATH - - # We have to have some directories in the library path. --LIBPATH=$codir:$codir/iconvdata -+LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn - - # How the start the iconv(1) program. - ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ -diff -durN glibc-2.13.orig/iconvdata/tst-table.sh glibc-2.13/iconvdata/tst-table.sh ---- glibc-2.13.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 -+++ glibc-2.13/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -59,8 +59,11 @@ - irreversible=${charset}.irreversible - fi - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # iconv in one direction. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-table-from ${charset} \ - > ${objpfx}tst-${charset}.table - -diff -durN glibc-2.13.orig/intl/tst-codeset.sh glibc-2.13/intl/tst-codeset.sh ---- glibc-2.13.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 -+++ glibc-2.13/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -37,6 +37,9 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - ${common_objpfx}elf/ld.so --library-path $common_objpfx \ - ${objpfx}tst-codeset > ${objpfx}tst-codeset.out - -diff -durN glibc-2.13.orig/intl/tst-gettext.sh glibc-2.13/intl/tst-gettext.sh ---- glibc-2.13.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 -+++ glibc-2.13/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -51,9 +51,12 @@ - LOCPATH=${common_objpfx}localedata - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. - MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.13.orig/intl/tst-gettext2.sh glibc-2.13/intl/tst-gettext2.sh ---- glibc-2.13.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 -+++ glibc-2.13/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -65,8 +65,11 @@ - LOCPATH=${objpfx}domaindir - export LOCPATH - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - # Now run the test. --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && - cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir - - exit $? -diff -durN glibc-2.13.orig/malloc/tst-mtrace.sh glibc-2.13/malloc/tst-mtrace.sh ---- glibc-2.13.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 -+++ glibc-2.13/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -24,9 +24,12 @@ - status=0 - trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ - LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ --${common_objpfx}elf/ld.so --library-path $common_objpfx \ -+${common_objpfx}elf/ld.so --library-path $library_path \ - ${common_objpfx}malloc/tst-mtrace || status=1 - - if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then -diff -durN glibc-2.13.orig/nptl/tst-tls6.sh glibc-2.13/nptl/tst-tls6.sh ---- glibc-2.13.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 -+++ glibc-2.13/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -5,8 +5,8 @@ - rtld_installed_name=$1; shift - logfile=$common_objpfx/nptl/tst-tls6.out - --# We have to find libc and nptl --library_path=${common_objpfx}:${common_objpfx}nptl -+# We have to find libc and nptl (also libdl in case sandbox is in use) -+library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn - tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}/nptl/tst-tls5" - -diff -durN glibc-2.13.orig/posix/globtest.sh glibc-2.13/posix/globtest.sh ---- glibc-2.13.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 -+++ glibc-2.13/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -18,7 +18,7 @@ - esac - - # We have to find the libc and the NSS modules. --library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod -+library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn - - # Since we use `sort' we must make sure to use the same locale everywhere. - LC_ALL=C -diff -durN glibc-2.13.orig/posix/tst-getconf.sh glibc-2.13/posix/tst-getconf.sh ---- glibc-2.13.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 -+++ glibc-2.13/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -10,7 +10,10 @@ - else - rtld_installed_name=$1; shift - runit() { -- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" -+ -+ # make sure libdl is also in path in case sandbox is in use -+ library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" - } - fi - -diff -durN glibc-2.13.orig/posix/wordexp-tst.sh glibc-2.13/posix/wordexp-tst.sh ---- glibc-2.13.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 -+++ glibc-2.13/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 -@@ -19,8 +19,11 @@ - " - export IFS - -+# make sure libdl is also in path in case sandbox is in use -+library_path=${common_objpfx}:${common_objpfx}/dlfcn -+ - failed=0 --${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ -+${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ - ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 - cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 - wordexp returned 0 diff --git a/packages/glibc-ports/2.16.0/380-dont-build-timezone.patch b/packages/glibc-ports/2.16.0/380-dont-build-timezone.patch deleted file mode 100644 index 11c358e..0000000 --- a/packages/glibc-ports/2.16.0/380-dont-build-timezone.patch +++ /dev/null @@ -1,14 +0,0 @@ -timezone data has been split into the package sys-libs/timezone-data - -diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig ---- glibc-2.13.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 -+++ glibc-2.13/Makeconfig 2009-11-13 00:50:41.000000000 +0100 -@@ -944,7 +944,7 @@ - stdlib stdio-common libio malloc string wcsmbs time dirent \ - grp pwd posix io termios resource misc socket sysvipc gmon \ - gnulib iconv iconvdata wctype manual shadow gshadow po argp \ -- crypt nss localedata timezone rt conform debug \ -+ crypt nss localedata rt conform debug \ - $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) - - ifndef avoid-generated diff --git a/packages/glibc-ports/2.16.0/400-alpha-xstat.patch b/packages/glibc-ports/2.16.0/400-alpha-xstat.patch deleted file mode 100644 index 6e4ab8f..0000000 --- a/packages/glibc-ports/2.16.0/400-alpha-xstat.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -@@ -386,6 +386,11 @@ - # define __ASSUME_GETDENTS32_D_TYPE 1 - #endif - -+/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ -+#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ -+# define __ASSUME_STAT64_SYSCALL 1 -+#endif -+ - /* Starting with version 2.5.3, the initial location returned by `brk' - after exec is always rounded up to the next page. */ - #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/packages/glibc-ports/2.16.0/430-alpha-creat.patch b/packages/glibc-ports/2.16.0/430-alpha-creat.patch deleted file mode 100644 index da6ddda..0000000 --- a/packages/glibc-ports/2.16.0/430-alpha-creat.patch +++ /dev/null @@ -1,14 +0,0 @@ -alpha does not have a __NR_creat - -http://bugs.gentoo.org/227275 -http://sourceware.org/bugzilla/show_bug.cgi?id=6650 - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 -@@ -1 +1,5 @@ - /* Defined as alias for the syscall. */ -+#include -+#ifndef __NR_creat -+#include "../../../../../io/creat64.c" -+#endif diff --git a/packages/glibc-ports/2.16.0/440-alpha-cache-shape.patch b/packages/glibc-ports/2.16.0/440-alpha-cache-shape.patch index 5b1a298..7612872 100644 --- a/packages/glibc-ports/2.16.0/440-alpha-cache-shape.patch +++ b/packages/glibc-ports/2.16.0/440-alpha-cache-shape.patch @@ -5,9 +5,9 @@ duplication for static builds with dl-sysdep and dl-support. since dl-sysdep is both shared/static, there is no point in hooking dl-support anymore, so we can punt it. -diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c ---- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 +diff -durN glibc-2.16.0.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c glibc-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c +--- glibc-ports-2.16.0.orig/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/dl-support.c 2009-11-13 00:50:53.000000000 +0100 @@ -1,2 +1,1 @@ -#include "dl-auxv.h" #include diff --git a/packages/glibc-ports/2.16.0/460-alpha-fix-gcc-4.1-warnings.patch b/packages/glibc-ports/2.16.0/460-alpha-fix-gcc-4.1-warnings.patch index f2ff04f..96f1646 100644 --- a/packages/glibc-ports/2.16.0/460-alpha-fix-gcc-4.1-warnings.patch +++ b/packages/glibc-ports/2.16.0/460-alpha-fix-gcc-4.1-warnings.patch @@ -16,9 +16,9 @@ I cannot really think of anything better than ports/sysdeps/unix/sysv/linux/alpha/ioperm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) -diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c ---- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 +diff -durN glibc-ports-2.16.0.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c +--- glibc-ports-2.16.0.orig/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/ioperm.c 2009-11-13 00:50:57.000000000 +0100 @@ -178,13 +178,13 @@ static inline void stb_mb(unsigned char val, unsigned long addr) @@ -53,4 +53,3 @@ diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/alpha/io return r; } -diff -durN glibc-2.16.0.orig/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c glibc-2.16.0/ports/sysdeps/unix/sysv/linux/alpha/ioperm.c diff --git a/packages/glibc-ports/2.16.0/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc-ports/2.16.0/490-alpha_alpha-add-fdatasync-support.patch deleted file mode 100644 index acf250d..0000000 --- a/packages/glibc-ports/2.16.0/490-alpha_alpha-add-fdatasync-support.patch +++ /dev/null @@ -1,126 +0,0 @@ -2009-07-25 Aurelien Jarno - - * sysdeps/unix/sysv/linux/kernel-features.h: define - __ASSUME_FDATASYNC. - * sysdeps/unix/sysv/linux/fdatasync.c: New file. - * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with - -fexceptions. - * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. - - sysdeps/unix/sysv/linux/Makefile | 1 - sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ - sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ - sysdeps/unix/sysv/linux/syscalls.list | 1 - 4 files changed, 76 insertions(+), 1 deletion(-) - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.13/sysdeps/unix/sysv/linux/Makefile ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 -@@ -21,6 +21,7 @@ - setfsuid setfsgid makedev epoll_pwait signalfd \ - eventfd eventfd_read eventfd_write prlimit - -+CFLAGS-fdatasync.c = -fexceptions - CFLAGS-gethostid.c = -fexceptions - CFLAGS-tst-writev.c += "-DARTIFICIAL_LIMIT=0x80000000-__getpagesize()" - -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 -@@ -0,0 +1,69 @@ -+/* fdatasync -- synchronize at least the data part of a file with -+ the underlying media. Linux version. -+ -+ Copyright (C) 2007 Free Software Foundation, Inc. -+ This file is part of the GNU C Library. -+ -+ The GNU C Library is free software; you can redistribute it and/or -+ modify it under the terms of the GNU Lesser General Public -+ License as published by the Free Software Foundation; either -+ version 2.1 of the License, or (at your option) any later version. -+ -+ The GNU C Library is distributed in the hope that it will be useful, -+ but WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public -+ License along with the GNU C Library; if not, write to the Free -+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA -+ 02111-1307 USA. */ -+ -+#include -+#include -+ -+#include -+#include -+#include -+ -+#include -+ -+#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC -+static int __have_no_fdatasync; -+#endif -+ -+static int -+do_fdatasync (int fd) -+{ -+#ifdef __ASSUME_FDATASYNC -+ return INLINE_SYSCALL (fdatasync, 1, fd); -+#elif defined __NR_fdatasync -+ if (!__builtin_expect (__have_no_fdatasync, 0)) -+ { -+ int result = INLINE_SYSCALL (fdatasync, 1, fd); -+ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) -+ return result; -+ -+ __have_no_fdatasync = 1; -+ } -+#endif -+ return INLINE_SYSCALL (fsync, 1, fd); -+} -+ -+int -+__fdatasync (int fd) -+{ -+ if (SINGLE_THREAD_P) -+ return do_fdatasync (fd); -+ -+ int oldtype = LIBC_CANCEL_ASYNC (); -+ -+ int result = do_fdatasync (fd); -+ -+ LIBC_CANCEL_RESET (oldtype); -+ -+ return result; -+} -+ -+weak_alias (__fdatasync, fdatasync) -+ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 -@@ -459,6 +459,12 @@ - # define __ASSUME_FUTEX_LOCK_PI 1 - #endif - -+/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it -+ was already present in 2.0 kernels on other architectures. */ -+#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) -+# define __ASSUME_FDATASYNC 1 -+#endif -+ - /* Support for utimensat syscall was added in 2.6.22, on SH - only after 2.6.22-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020616 \ -diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list ---- glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 -+++ glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 -@@ -11,7 +11,6 @@ - epoll_create1 EXTRA epoll_create1 i:i epoll_create1 - epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl - epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait --fdatasync - fdatasync Ci:i fdatasync - flock - flock i:ii __flock flock - fork - fork i: __libc_fork __fork fork - get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/packages/glibc-ports/2.16.0/530-alpha-fix-rtld-fPIC.patch b/packages/glibc-ports/2.16.0/530-alpha-fix-rtld-fPIC.patch index 42faaa5..db9c890 100644 --- a/packages/glibc-ports/2.16.0/530-alpha-fix-rtld-fPIC.patch +++ b/packages/glibc-ports/2.16.0/530-alpha-fix-rtld-fPIC.patch @@ -5,9 +5,9 @@ ports/sysdeps/alpha/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/alpha/Makefile glibc-2.16.0/glibc-ports-2.16.0/sysdeps/alpha/Makefile ---- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 +diff -durN glibc-ports-2.16.0.orig/sysdeps/alpha/Makefile glibc-ports-2.16.0/sysdeps/alpha/Makefile +--- glibc-ports-2.16.0.orig/sysdeps/alpha/Makefile 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.16.0/sysdeps/alpha/Makefile 2009-11-13 00:51:13.000000000 +0100 @@ -35,7 +35,8 @@ ifeq ($(subdir),elf) @@ -18,4 +18,3 @@ diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/alpha/Makefile glibc-2.1 endif # Build everything with full IEEE math support, and with dynamic rounding; -diff -durN glibc-2.16.0.orig/ports/sysdeps/alpha/Makefile glibc-2.16.0/ports/sysdeps/alpha/Makefile diff --git a/packages/glibc-ports/2.16.0/560-ppc-atomic.patch b/packages/glibc-ports/2.16.0/560-ppc-atomic.patch deleted file mode 100644 index ee1cb90..0000000 --- a/packages/glibc-ports/2.16.0/560-ppc-atomic.patch +++ /dev/null @@ -1,415 +0,0 @@ -sniped from suse - -Index: sysdeps/powerpc/bits/atomic.h -=================================================================== -RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v -retrieving revision 1.17 -diff -u -a -p -r1.17 atomic.h - -diff -durN glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h glibc-2.13/sysdeps/powerpc/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -85,14 +85,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -102,14 +102,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpw %0,%2\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -118,12 +118,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -132,11 +132,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stwcx. %3,0,%2\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stwcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -144,12 +144,12 @@ - #define __arch_atomic_exchange_and_add_32(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stwcx. %1,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -157,12 +157,12 @@ - #define __arch_atomic_increment_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -170,27 +170,27 @@ - #define __arch_atomic_decrement_val_32(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: lwarx %0,0,%2\n" \ -+ __asm __volatile ("1: lwarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stwcx. %0,0,%2\n" \ -+ " stwcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_32(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: lwarx %0,0,%3\n" \ -+ __asm __volatile ("1: lwarx %0,%y2\n" \ - " cmpwi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stwcx. %1,0,%3\n" \ -+ " stwcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile ( \ -- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -60,14 +60,14 @@ - ({ \ - unsigned int __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stwcx. %3,0,%1\n" \ -+ " stwcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h ---- glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 -+++ glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 -@@ -44,14 +44,14 @@ - ({ \ - unsigned int __tmp, __tmp2; \ - __asm __volatile (" clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -61,14 +61,14 @@ - unsigned int __tmp, __tmp2; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ - " clrldi %1,%1,32\n" \ -- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ - " subf. %0,%1,%0\n" \ - " bne 2f\n" \ -- " stwcx. %4,0,%2\n" \ -+ " stwcx. %4,%y2\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp), "=r" (__tmp2) \ -- : "b" (mem), "1" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ -+ : "1" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -82,14 +82,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -98,14 +98,14 @@ - ({ \ - unsigned long __tmp; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " subf. %0,%2,%0\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (mem), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp != 0; \ - }) -@@ -115,14 +115,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile ( \ -- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -132,14 +132,14 @@ - __typeof (*(mem)) __tmp; \ - __typeof (mem) __memp = (mem); \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ - " cmpd %0,%2\n" \ - " bne 2f\n" \ -- " stdcx. %3,0,%1\n" \ -+ " stdcx. %3,%y1\n" \ - " bne- 1b\n" \ - "2: " \ -- : "=&r" (__tmp) \ -- : "b" (__memp), "r" (oldval), "r" (newval) \ -+ : "=&r" (__tmp), "+Z" (*__memp) \ -+ : "r" (oldval), "r" (newval) \ - : "cr0", "memory"); \ - __tmp; \ - }) -@@ -148,12 +148,12 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b\n" \ - " " __ARCH_ACQ_INSTR \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -162,11 +162,11 @@ - ({ \ - __typeof (*mem) __val; \ - __asm __volatile (__ARCH_REL_INSTR "\n" \ -- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ -- " stdcx. %3,0,%2\n" \ -+ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ -+ " stdcx. %2,%y1\n" \ - " bne- 1b" \ -- : "=&r" (__val), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&r" (__val), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -174,12 +174,12 @@ - #define __arch_atomic_exchange_and_add_64(mem, value) \ - ({ \ - __typeof (*mem) __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -- " add %1,%0,%4\n" \ -- " stdcx. %1,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ -+ " add %1,%0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "r" (value), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : "r" (value) \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -187,12 +187,12 @@ - #define __arch_atomic_increment_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " addi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) -@@ -200,27 +200,27 @@ - #define __arch_atomic_decrement_val_64(mem) \ - ({ \ - __typeof (*(mem)) __val; \ -- __asm __volatile ("1: ldarx %0,0,%2\n" \ -+ __asm __volatile ("1: ldarx %0,%y1\n" \ - " subi %0,%0,1\n" \ -- " stdcx. %0,0,%2\n" \ -+ " stdcx. %0,%y1\n" \ - " bne- 1b" \ -- : "=&b" (__val), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) - - #define __arch_atomic_decrement_if_positive_64(mem) \ - ({ int __val, __tmp; \ -- __asm __volatile ("1: ldarx %0,0,%3\n" \ -+ __asm __volatile ("1: ldarx %0,%y2\n" \ - " cmpdi 0,%0,0\n" \ - " addi %1,%0,-1\n" \ - " ble 2f\n" \ -- " stdcx. %1,0,%3\n" \ -+ " stdcx. %1,%y2\n" \ - " bne- 1b\n" \ - "2: " __ARCH_ACQ_INSTR \ -- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ -- : "b" (mem), "m" (*mem) \ -+ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ -+ : \ - : "cr0", "memory"); \ - __val; \ - }) diff --git a/packages/glibc-ports/2.16.0/580-nptl-lowlevellock.patch b/packages/glibc-ports/2.16.0/580-nptl-lowlevellock.patch index 185331c..a1c6c7a 100644 --- a/packages/glibc-ports/2.16.0/580-nptl-lowlevellock.patch +++ b/packages/glibc-ports/2.16.0/580-nptl-lowlevellock.patch @@ -9,9 +9,9 @@ In file included from ../nptl/sysdeps/unix/sysv/linux/libc-lowlevellock.c:21: ../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: for each function it appears in.) ../nptl/sysdeps/unix/sysv/linux/lowlevellock.c:31: error: 'header' undeclared (first use in this function) -diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h ---- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 +diff -durN glibc-ports-2.16.0.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h +--- glibc-ports-2.16.0.orig/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h 2009-11-13 00:51:23.000000000 +0100 @@ -25,6 +25,7 @@ #include #include @@ -20,4 +20,3 @@ diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/unix/sysv/linux/arm/nptl #define FUTEX_WAIT 0 #define FUTEX_WAKE 1 -diff -durN glibc-2.16.0.orig/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h glibc-2.16.0/ports/sysdeps/unix/sysv/linux/arm/nptl/lowlevellock.h diff --git a/packages/glibc-ports/2.16.0/610-fpu-cw-mips.patch b/packages/glibc-ports/2.16.0/610-fpu-cw-mips.patch index 0c0daf3..ef42c8f 100644 --- a/packages/glibc-ports/2.16.0/610-fpu-cw-mips.patch +++ b/packages/glibc-ports/2.16.0/610-fpu-cw-mips.patch @@ -1,8 +1,8 @@ http://sourceware.org/ml/libc-alpha/2002-10/msg00392.html -diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/mips/fpu_control.h glibc-2.16.0/glibc-ports-2.16.0/sysdeps/mips/fpu_control.h ---- glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 -+++ glibc-2.16.0/glibc-ports-2.16.0/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 +diff -durN glibc-ports-2.16.0.orig/sysdeps/mips/fpu_control.h glibc-ports-2.16.0/sysdeps/mips/fpu_control.h +--- glibc-ports-2.16.0.orig/sysdeps/mips/fpu_control.h 2009-05-16 10:36:20.000000000 +0200 ++++ glibc-ports-2.16.0/sysdeps/mips/fpu_control.h 2009-11-13 00:51:31.000000000 +0100 @@ -86,7 +86,7 @@ #define _FPU_RC_UP 0x2 #define _FPU_RC_DOWN 0x3 @@ -12,4 +12,3 @@ diff -durN glibc-2.16.0.orig/glibc-ports-2.16.0/sysdeps/mips/fpu_control.h glibc /* The fdlibm code requires strict IEEE double precision arithmetic, -diff -durN glibc-2.16.0.orig/ports/sysdeps/mips/fpu_control.h glibc-2.16.0/ports/sysdeps/mips/fpu_control.h diff --git a/packages/glibc-ports/2.16.0/630-mips_shn_undef-hack.patch b/packages/glibc-ports/2.16.0/630-mips_shn_undef-hack.patch deleted file mode 100644 index 791d76c..0000000 --- a/packages/glibc-ports/2.16.0/630-mips_shn_undef-hack.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -durN glibc-2.13.orig/elf/dl-lookup.c glibc-2.13/elf/dl-lookup.c ---- glibc-2.13.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 -+++ glibc-2.13/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 -@@ -301,6 +301,12 @@ - /* FALLTHROUGH */ - case STB_GLOBAL: - success: -+#ifdef __mips__ -+ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF -+ symbols, we skip them. */ -+ if (sym->st_shndx == SHN_UNDEF) -+ break; -+#endif - /* Global definition. Just what we need. */ - result->s = sym; - result->m = (struct link_map *) map; diff --git a/packages/glibc-ports/2.16.0/640-alpha-atfcts.patch b/packages/glibc-ports/2.16.0/640-alpha-atfcts.patch deleted file mode 100644 index 7a8a94a..0000000 --- a/packages/glibc-ports/2.16.0/640-alpha-atfcts.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 -+++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 -@@ -437,7 +437,8 @@ - the code. On PPC they were introduced in 2.6.17-rc1, - on SH in 2.6.19-rc1. */ - #if __LINUX_KERNEL_VERSION >= 0x020611 \ -- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) -+ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ -+ && (!defined __alpha__) - # define __ASSUME_ATFCTS 1 - #endif - diff --git a/packages/glibc-ports/2.16.0/650-syslog.patch b/packages/glibc-ports/2.16.0/650-syslog.patch deleted file mode 100644 index c20cafc..0000000 --- a/packages/glibc-ports/2.16.0/650-syslog.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c ---- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 -+++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 -@@ -152,7 +152,7 @@ - #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID - /* Check for invalid bits. */ - if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { -- syslog(INTERNALLOG, -+ __syslog(INTERNALLOG, - "syslog: unknown facility/priority: %x", pri); - pri &= LOG_PRIMASK|LOG_FACMASK; - } diff --git a/packages/glibc-ports/2.16.0/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc-ports/2.16.0/660-debug-readlink_chk-readklinkat_chk.patch deleted file mode 100644 index a5a7052..0000000 --- a/packages/glibc-ports/2.16.0/660-debug-readlink_chk-readklinkat_chk.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c ---- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 -+++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 -@@ -25,7 +25,7 @@ - - - ssize_t --__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) -+__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) - { - if (len > buflen) - __chk_fail (); -diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c ---- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 -+++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 -@@ -21,7 +21,7 @@ - - - ssize_t --__readlinkat_chk (int fd, const char *path, void *buf, size_t len, -+__readlinkat_chk (int fd, const char *path, char *buf, size_t len, - size_t buflen) - { - if (len > buflen) diff --git a/packages/glibc/2.12.1/100-respect-env-CPPFLAGS.patch b/packages/glibc/2.12.1/100-respect-env-CPPFLAGS.patch new file mode 100644 index 0000000..ed022be --- /dev/null +++ b/packages/glibc/2.12.1/100-respect-env-CPPFLAGS.patch @@ -0,0 +1,25 @@ +Respect environment CPPFLAGS when we run ./configure so we can inject +random -D things without having to set CFLAGS/ASFLAGS + +diff -durN glibc-2.12.1.orig/Makeconfig glibc-2.12.1/Makeconfig +--- glibc-2.12.1.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 ++++ glibc-2.12.1/Makeconfig 2009-11-13 00:49:41.000000000 +0100 +@@ -697,6 +697,7 @@ + $(foreach lib,$(libof-$(basename $(@F))) \ + $(libof-$(field.le_next)) + ++#define LIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = LIST_FIRST((head)); \ ++ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + /* + * List access methods. + */ +@@ -197,6 +202,16 @@ + #define SLIST_FOREACH(var, head, field) \ + for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) + ++#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = SLIST_FIRST((head)); \ ++ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ ++#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ ++ for ((varp) = &SLIST_FIRST((head)); \ ++ ((var) = *(varp)) != NULL; \ ++ (varp) = &SLIST_NEXT((var), field)) ++ + /* + * Singly-linked List access methods. + */ +@@ -242,6 +257,12 @@ + (head)->stqh_last = &(elm)->field.stqe_next; \ + } while (/*CONSTCOND*/0) + ++#define STAILQ_LAST(head, type, field) \ ++ (STAILQ_EMPTY((head)) ? \ ++ NULL : \ ++ ((struct type *)(void *) \ ++ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) ++ + #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ + if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ + (head)->stqh_last = &(elm)->field.stqe_next; \ +@@ -271,6 +292,11 @@ + (var); \ + (var) = ((var)->field.stqe_next)) + ++#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = STAILQ_FIRST((head)); \ ++ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define STAILQ_CONCAT(head1, head2) do { \ + if (!STAILQ_EMPTY((head2))) { \ + *(head1)->stqh_last = (head2)->stqh_first; \ +@@ -437,11 +463,21 @@ + (var); \ + (var) = ((var)->field.tqe_next)) + ++#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = TAILQ_FIRST((head)); \ ++ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ + for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ + (var); \ + (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) + ++#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ ++ for ((var) = TAILQ_LAST((head), headname); \ ++ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_CONCAT(head1, head2, field) do { \ + if (!TAILQ_EMPTY(head2)) { \ + *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/packages/glibc/2.12.1/160-manual-no-perl.patch b/packages/glibc/2.12.1/160-manual-no-perl.patch new file mode 100644 index 0000000..2eb5414 --- /dev/null +++ b/packages/glibc/2.12.1/160-manual-no-perl.patch @@ -0,0 +1,24 @@ +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/packages/glibc/2.12.1/170-localedef-fix-trampoline.patch b/packages/glibc/2.12.1/170-localedef-fix-trampoline.patch new file mode 100644 index 0000000..fb0881d --- /dev/null +++ b/packages/glibc/2.12.1/170-localedef-fix-trampoline.patch @@ -0,0 +1,53 @@ +# DP: Description: Fix localedef segfault when run under exec-shield, +# PaX or similar. (#231438, #198099) +# DP: Dpatch Author: James Troup +# DP: Patch Author: (probably) Jakub Jelinek +# DP: Upstream status: Unknown +# DP: Status Details: Unknown +# DP: Date: 2004-03-16 +diff -durN glibc-2.12.1.orig/locale/programs/3level.h glibc-2.12.1/locale/programs/3level.h +--- glibc-2.12.1.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 ++++ glibc-2.12.1/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 +@@ -203,6 +203,42 @@ + } + } + } ++ ++/* GCC ATM seems to do a poor job with pointers to nested functions passed ++ to inlined functions. Help it a little bit with this hack. */ ++#define wchead_table_iterate(tp, fn) \ ++do \ ++ { \ ++ struct wchead_table *t = (tp); \ ++ uint32_t index1; \ ++ for (index1 = 0; index1 < t->level1_size; index1++) \ ++ { \ ++ uint32_t lookup1 = t->level1[index1]; \ ++ if (lookup1 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup1_shifted = lookup1 << t->q; \ ++ uint32_t index2; \ ++ for (index2 = 0; index2 < (1 << t->q); index2++) \ ++ { \ ++ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ ++ if (lookup2 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup2_shifted = lookup2 << t->p; \ ++ uint32_t index3; \ ++ for (index3 = 0; index3 < (1 << t->p); index3++) \ ++ { \ ++ struct element_t *lookup3 \ ++ = t->level3[index3 + lookup2_shifted]; \ ++ if (lookup3 != NULL) \ ++ fn ((((index1 << t->q) + index2) << t->p) + index3, \ ++ lookup3); \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } while (0) ++ + #endif + + #ifndef NO_FINALIZE diff --git a/packages/glibc/2.12.1/180-resolv-dynamic.patch b/packages/glibc/2.12.1/180-resolv-dynamic.patch new file mode 100644 index 0000000..8f74a53 --- /dev/null +++ b/packages/glibc/2.12.1/180-resolv-dynamic.patch @@ -0,0 +1,39 @@ +ripped from SuSE + +if /etc/resolv.conf is updated, then make sure applications +already running get the updated information. + +http://bugs.gentoo.org/177416 + +diff -durN glibc-2.12.1.orig/resolv/res_libc.c glibc-2.12.1/resolv/res_libc.c +--- glibc-2.12.1.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 ++++ glibc-2.12.1/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + + /* The following bit is copied from res_data.c (where it is #ifdef'ed +@@ -95,6 +96,20 @@ + __res_maybe_init (res_state resp, int preinit) + { + if (resp->options & RES_INIT) { ++ static time_t last_mtime, last_check; ++ time_t now; ++ struct stat statbuf; ++ ++ time (&now); ++ if (now != last_check) { ++ last_check = now; ++ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { ++ last_mtime = statbuf.st_mtime; ++ atomicinclock (lock); ++ atomicinc (__res_initstamp); ++ atomicincunlock (lock); ++ } ++ } + if (__res_initstamp != resp->_u._ext.initstamp) { + if (resp->nscount > 0) + __res_iclose (resp, true); diff --git a/packages/glibc/2.12.1/190-localedef-mmap.patch b/packages/glibc/2.12.1/190-localedef-mmap.patch new file mode 100644 index 0000000..b24ed80 --- /dev/null +++ b/packages/glibc/2.12.1/190-localedef-mmap.patch @@ -0,0 +1,39 @@ +sniped from Debian +http://bugs.gentoo.org/289615 + +2009-10-27 Aurelien Jarno + + * locale/programs/locarchive.c: use MMAP_SHARED to reserve memory + used later with MMAP_FIXED | MMAP_SHARED to cope with different + alignment restrictions. + +diff -durN glibc-2.12.1.orig/locale/programs/locarchive.c glibc-2.12.1/locale/programs/locarchive.c +--- glibc-2.12.1.orig/locale/programs/locarchive.c 2009-04-27 16:07:47.000000000 +0200 ++++ glibc-2.12.1/locale/programs/locarchive.c 2009-11-13 00:50:01.000000000 +0100 +@@ -134,7 +134,7 @@ + size_t reserved = RESERVE_MMAP_SIZE; + int xflags = 0; + if (total < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else +@@ -396,7 +396,7 @@ + size_t reserved = RESERVE_MMAP_SIZE; + int xflags = 0; + if (total < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else +@@ -614,7 +614,7 @@ + int xflags = 0; + void *p; + if (st.st_size < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else diff --git a/packages/glibc/2.12.1/200-fadvise64_64.patch b/packages/glibc/2.12.1/200-fadvise64_64.patch new file mode 100644 index 0000000..a9f10cd --- /dev/null +++ b/packages/glibc/2.12.1/200-fadvise64_64.patch @@ -0,0 +1,28 @@ +ripped from Debian + + sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.12.1/sysdeps/unix/sysv/linux/posix_fadvise.c +--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 +@@ -35,6 +35,19 @@ + return INTERNAL_SYSCALL_ERRNO (ret, err); + return 0; + #else ++# ifdef __NR_fadvise64_64 ++ INTERNAL_SYSCALL_DECL (err); ++ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, ++ __LONG_LONG_PAIR ((long) (offset >> 31), ++ (long) offset), ++ __LONG_LONG_PAIR ((long) (len >> 31), ++ (long) len), ++ advise); ++ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) ++ return INTERNAL_SYSCALL_ERRNO (ret, err); ++ return 0; ++# else + return ENOSYS; ++# endif + #endif + } diff --git a/packages/glibc/2.12.1/220-section-comments.patch b/packages/glibc/2.12.1/220-section-comments.patch new file mode 100644 index 0000000..4d35535 --- /dev/null +++ b/packages/glibc/2.12.1/220-section-comments.patch @@ -0,0 +1,24 @@ +http://sources.redhat.com/ml/binutils/2004-04/msg00665.html + +fixes building on some architectures (like m68k/arm/cris/etc...) because +it does the right thing + +diff -durN glibc-2.12.1.orig/include/libc-symbols.h glibc-2.12.1/include/libc-symbols.h +--- glibc-2.12.1.orig/include/libc-symbols.h 2009-03-14 00:51:46.000000000 +0100 ++++ glibc-2.12.1/include/libc-symbols.h 2009-11-13 00:50:07.000000000 +0100 +@@ -239,12 +239,12 @@ + # define __make_section_unallocated(section_string) + # endif + +-/* Tacking on "\n\t#" to the section name makes gcc put it's bogus ++/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus + section attributes on what looks like a comment to the assembler. */ + # ifdef HAVE_SECTION_QUOTES +-# define __sec_comment "\"\n\t#\"" ++# define __sec_comment "\"\n#APP\n\t#\"" + # else +-# define __sec_comment "\n\t#" ++# define __sec_comment "\n#APP\n\t#" + # endif + # define link_warning(symbol, msg) \ + __make_section_unallocated (".gnu.warning." #symbol) \ diff --git a/packages/glibc/2.12.1/230-no-inline-gmon.patch b/packages/glibc/2.12.1/230-no-inline-gmon.patch new file mode 100644 index 0000000..594fb79 --- /dev/null +++ b/packages/glibc/2.12.1/230-no-inline-gmon.patch @@ -0,0 +1,36 @@ +http://bugs.gentoo.org/196245 +http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html + +Attached is a patch to add __attribute__ ((noinline)) to +call_gmon_start. + +Without this patch, the sec script that processed initfini.s removes a +part of inlined call_gmon_start, causing undefined label errors. + +This patch solves the problem by forcing gcc not to inline +call_gmon_start with __attribute__ ((noinline)). + +Tested by building for arm-none-lixux-gnueabi. OK to apply? + +Kazu Hirata + +2006-05-07 Kazu Hirata <kazu@codesourcery.com> + + * sysdeps/generic/initfini.c (call_gmon_start): Add + __attribute__ ((noinline)). + +Index: sysdeps/generic/initfini.c +=================================================================== + +diff -durN glibc-2.12.1.orig/sysdeps/generic/initfini.c glibc-2.12.1/sysdeps/generic/initfini.c +--- glibc-2.12.1.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200 ++++ glibc-2.12.1/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100 +@@ -70,7 +70,7 @@ + /* The beginning of _init: */ + asm ("\n/*@_init_PROLOG_BEGINS*/"); + +-static void ++static void __attribute__ ((noinline)) + call_gmon_start(void) + { + extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ diff --git a/packages/glibc/2.12.1/240-check_native-headers.patch b/packages/glibc/2.12.1/240-check_native-headers.patch new file mode 100644 index 0000000..de0cb5b --- /dev/null +++ b/packages/glibc/2.12.1/240-check_native-headers.patch @@ -0,0 +1,17 @@ +many ports hit this warning: +../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' +../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' + +snipped from suse + +diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/check_native.c glibc-2.12.1/sysdeps/unix/sysv/linux/check_native.c +--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/check_native.c 2007-11-24 04:12:17.000000000 +0100 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/check_native.c 2009-11-13 00:50:11.000000000 +0100 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/packages/glibc/2.12.1/250-fix-pr631.patch b/packages/glibc/2.12.1/250-fix-pr631.patch new file mode 100644 index 0000000..af5b347 --- /dev/null +++ b/packages/glibc/2.12.1/250-fix-pr631.patch @@ -0,0 +1,45 @@ +From dank@kegel.com +Wed Jun 15 09:12:43 PDT 2005 + +Fixes + +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r' +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent' +... 53 lines deleted ... +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r' +collect2: ld returned 1 exit status +make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1 + +when building glibc with --enable-static-nss. + +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631 + +diff -durN glibc-2.12.1.orig/Makeconfig glibc-2.12.1/Makeconfig +--- glibc-2.12.1.orig/Makeconfig 2009-11-13 00:49:41.000000000 +0100 ++++ glibc-2.12.1/Makeconfig 2009-11-13 00:50:13.000000000 +0100 +@@ -531,7 +531,7 @@ + + # The static libraries. + ifeq (yes,$(build-static)) +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a + else + ifeq (yes,$(build-shared)) + # We can try to link the programs with lib*_pic.a... +diff -durN glibc-2.12.1.orig/elf/Makefile glibc-2.12.1/elf/Makefile +--- glibc-2.12.1.orig/elf/Makefile 2009-01-31 01:20:55.000000000 +0100 ++++ glibc-2.12.1/elf/Makefile 2009-11-13 00:50:13.000000000 +0100 +@@ -146,6 +146,13 @@ + install-bin-script = ldd + endif + ++ifeq (yes,$(build-static-nss)) ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss) ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv) ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ ++ $(resolvobjdir)/libresolv.a ++endif ++ + others = sprof sln + install-bin = sprof + others-static = sln diff --git a/packages/glibc/2.12.1/260-assume-pipe2.patch b/packages/glibc/2.12.1/260-assume-pipe2.patch new file mode 100644 index 0000000..b84f882 --- /dev/null +++ b/packages/glibc/2.12.1/260-assume-pipe2.patch @@ -0,0 +1,40 @@ +http://bugs.gentoo.org/250342 +http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 + +we cant assume sock_cloexec and pipe2 are bound together as the former defines +are found in glibc only while the latter are a combo of kernel headers and +glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub +inside of glibc, we hit a problem. for example: + +#include +#include +main() +{ + getgrnam("portage"); + if (!popen("ls", "r")) + perror("popen()"); +} + +getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both +__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against +older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS +stub for it. so popen() will always fail as glibc assumes pipe2() works. + +diff -durN glibc-2.12.1.orig/socket/have_sock_cloexec.c glibc-2.12.1/socket/have_sock_cloexec.c +--- glibc-2.12.1.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 ++++ glibc-2.12.1/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 +@@ -16,9 +16,14 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#include + #include + #include + + #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC + int __have_sock_cloexec; + #endif ++ ++#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 ++int __have_pipe2; ++#endif diff --git a/packages/glibc/2.12.1/270-china.patch b/packages/glibc/2.12.1/270-china.patch new file mode 100644 index 0000000..4cde1cf --- /dev/null +++ b/packages/glibc/2.12.1/270-china.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.12.1.orig/localedata/locales/zh_TW glibc-2.12.1/localedata/locales/zh_TW +--- glibc-2.12.1.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 ++++ glibc-2.12.1/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 +@@ -1,7 +1,7 @@ + comment_char % + escape_char / + % +-% Chinese language locale for Taiwan R.O.C. ++% Chinese language locale for Taiwan + % charmap: BIG5-CP950 + % + % Original Author: +@@ -17,7 +17,7 @@ + % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf + + LC_IDENTIFICATION +-title "Chinese locale for Taiwan R.O.C." ++title "Chinese locale for Taiwan" + source "" + address "" + contact "" +@@ -25,7 +25,7 @@ + tel "" + fax "" + language "Chinese" +-territory "Taiwan R.O.C." ++territory "Taiwan" + revision "0.2" + date "2000-08-02" + % diff --git a/packages/glibc/2.12.1/280-new-valencian-locale.patch b/packages/glibc/2.12.1/280-new-valencian-locale.patch new file mode 100644 index 0000000..6b46b44 --- /dev/null +++ b/packages/glibc/2.12.1/280-new-valencian-locale.patch @@ -0,0 +1,115 @@ +http://bugs.gentoo.org/show_bug.cgi?id=131815 +http://sourceware.org/bugzilla/show_bug.cgi?id=2522 + +diff -durN glibc-2.12.1.orig/localedata/SUPPORTED glibc-2.12.1/localedata/SUPPORTED +--- glibc-2.12.1.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 ++++ glibc-2.12.1/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 +@@ -72,6 +72,8 @@ + ca_ES.UTF-8/UTF-8 \ + ca_ES/ISO-8859-1 \ + ca_ES@euro/ISO-8859-15 \ ++ca_ES.UTF-8@valencia/UTF-8 \ ++ca_ES@valencia/ISO-8859-15 \ + ca_FR.UTF-8/UTF-8 \ + ca_FR/ISO-8859-15 \ + ca_IT.UTF-8/UTF-8 \ +diff -durN glibc-2.12.1.orig/localedata/locales/ca_ES@valencia glibc-2.12.1/localedata/locales/ca_ES@valencia +--- glibc-2.12.1.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.12.1/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 +@@ -0,0 +1,96 @@ ++comment_char % ++escape_char / ++% ++% Valencian (southern Catalan) locale for Spain with Euro ++% ++% Note that this locale is almost the same as ca_ES@euro. The point of having ++% a separate locale is only for PO translations, which have a lot of social ++% support and are very appreciated by the Valencian-speaking community. ++% ++% Contact: Jordi Mallach ++% Email: jordi@gnu.org ++% Tel: ++% Fax: ++% Language: ca ++% Territory: ES ++% Option: euro ++% Revision: 1.0 ++% Date: 2006-04-06 ++% Application: general ++% Users: general ++% Repertoiremap: mnemonic,ds ++% Charset: ISO-8859-15 ++% Distribution and use is free, also ++% for commercial purposes. ++ ++LC_IDENTIFICATION ++title "Valencian (southern Catalan) locale for Spain with Euro" ++source "" ++address "" ++contact "Jordi Mallach" ++email "jordi@gnu.org" ++tel "" ++fax "" ++language "Catalan" ++territory "Spain" ++revision "1.0" ++date "2006-04-06" ++% ++category "ca_ES@valencia:2006";LC_IDENTIFICATION ++category "ca_ES@valencia:2006";LC_CTYPE ++category "ca_ES@valencia:2006";LC_COLLATE ++category "ca_ES@valencia:2006";LC_MONETARY ++category "ca_ES@valencia:2006";LC_NUMERIC ++category "ca_ES@valencia:2006";LC_TIME ++category "ca_ES@valencia:2006";LC_MESSAGES ++category "ca_ES@valencia:2006";LC_PAPER ++category "ca_ES@valencia:2006";LC_NAME ++category "ca_ES@valencia:2006";LC_ADDRESS ++category "ca_ES@valencia:2006";LC_TELEPHONE ++category "ca_ES@valencia:2006";LC_MEASUREMENT ++ ++END LC_IDENTIFICATION ++ ++LC_CTYPE ++copy "i18n" ++END LC_CTYPE ++ ++LC_COLLATE ++copy "ca_ES" ++END LC_COLLATE ++ ++LC_MONETARY ++copy "ca_ES" ++END LC_MONETARY ++ ++LC_NUMERIC ++copy "ca_ES" ++END LC_NUMERIC ++ ++LC_TIME ++copy "ca_ES" ++END LC_TIME ++ ++LC_MESSAGES ++copy "ca_ES" ++END LC_MESSAGES ++ ++LC_PAPER ++copy "ca_ES" ++END LC_PAPER ++ ++LC_NAME ++copy "ca_ES" ++END LC_NAME ++ ++LC_ADDRESS ++copy "ca_ES" ++END LC_ADDRESS ++ ++LC_TELEPHONE ++copy "ca_ES" ++END LC_TELEPHONE ++ ++LC_MEASUREMENT ++copy "ca_ES" ++END LC_MEASUREMENT diff --git a/packages/glibc/2.12.1/300-nscd-one-fork.patch b/packages/glibc/2.12.1/300-nscd-one-fork.patch new file mode 100644 index 0000000..27eae51 --- /dev/null +++ b/packages/glibc/2.12.1/300-nscd-one-fork.patch @@ -0,0 +1,40 @@ +only fork one to assist in stop-start-daemon assumptions about daemon behavior + +http://bugs.gentoo.org/190785 + +diff -durN glibc-2.12.1.orig/nscd/nscd.c glibc-2.12.1/nscd/nscd.c +--- glibc-2.12.1.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 ++++ glibc-2.12.1/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 +@@ -182,6 +182,9 @@ + if (pid != 0) + exit (0); + ++ if (write_pid (_PATH_NSCDPID) < 0) ++ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); ++ + int nullfd = open (_PATH_DEVNULL, O_RDWR); + if (nullfd != -1) + { +@@ -231,12 +234,6 @@ + for (i = min_close_fd; i < getdtablesize (); i++) + close (i); + +- pid = fork (); +- if (pid == -1) +- error (EXIT_FAILURE, errno, _("cannot fork")); +- if (pid != 0) +- exit (0); +- + setsid (); + + if (chdir ("/") != 0) +@@ -245,9 +242,6 @@ + + openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); + +- if (write_pid (_PATH_NSCDPID) < 0) +- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); +- + if (!init_logfile ()) + dbg_log (_("Could not create log file")); + diff --git a/packages/glibc/2.12.1/310-hppa-nptl-carlos.patch b/packages/glibc/2.12.1/310-hppa-nptl-carlos.patch new file mode 100644 index 0000000..947bb58 --- /dev/null +++ b/packages/glibc/2.12.1/310-hppa-nptl-carlos.patch @@ -0,0 +1,246 @@ + + +diff -durN glibc-2.12.1.orig/elf/rtld.c glibc-2.12.1/elf/rtld.c +--- glibc-2.12.1.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 ++++ glibc-2.12.1/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 +@@ -390,14 +390,14 @@ + know it is available. We do not have to clear the memory if we + do not have to use the temporary bootstrap_map. Global variables + are initialized to zero by default. */ +-#ifndef DONT_USE_BOOTSTRAP_MAP ++#if !defined DONT_USE_BOOTSTRAP_MAP + # ifdef HAVE_BUILTIN_MEMSET + __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); + # else +- for (size_t cnt = 0; +- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); +- ++cnt) +- bootstrap_map.l_info[cnt] = 0; ++ /* Clear the whole bootstrap_map structure */ ++ for (char *cnt = (char *)&(bootstrap_map); ++ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); ++ *cnt++ = '\0'); + # endif + # if USE___THREAD + bootstrap_map.l_tls_modid = 0; +diff -durN glibc-2.12.1.orig/include/atomic.h glibc-2.12.1/include/atomic.h +--- glibc-2.12.1.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 ++++ glibc-2.12.1/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 +@@ -185,7 +185,7 @@ + __typeof (*(mem)) __atg5_value = (newvalue); \ + \ + do \ +- __atg5_oldval = *__atg5_memp; \ ++ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ + __atg5_oldval), 0)); \ +@@ -206,7 +206,7 @@ + __typeof (*(mem)) __atg6_value = (value); \ + \ + do \ +- __atg6_oldval = *__atg6_memp; \ ++ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ + __atg6_oldval \ +@@ -224,7 +224,7 @@ + __typeof (*(mem)) __atg7_value = (value); \ + \ + do \ +- __atg7_oldv = *__atg7_memp; \ ++ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ + __atg7_oldv \ +@@ -242,7 +242,7 @@ + __typeof (mem) __atg8_memp = (mem); \ + __typeof (*(mem)) __atg8_value = (value); \ + do { \ +- __atg8_oldval = *__atg8_memp; \ ++ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ + if (__atg8_oldval >= __atg8_value) \ + break; \ + } while (__builtin_expect \ +@@ -259,7 +259,7 @@ + __typeof (mem) __atg9_memp = (mem); \ + __typeof (*(mem)) __atg9_value = (value); \ + do { \ +- __atg9_oldv = *__atg9_memp; \ ++ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ + if (__atg9_oldv >= __atg9_value) \ + break; \ + } while (__builtin_expect \ +@@ -277,7 +277,7 @@ + __typeof (mem) __atg10_memp = (mem); \ + __typeof (*(mem)) __atg10_value = (value); \ + do { \ +- __atg10_oldval = *__atg10_memp; \ ++ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ + if (__atg10_oldval <= __atg10_value) \ + break; \ + } while (__builtin_expect \ +@@ -361,7 +361,7 @@ + \ + do \ + { \ +- __atg11_oldval = *__atg11_memp; \ ++ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ + if (__builtin_expect (__atg11_oldval <= 0, 0)) \ + break; \ + } \ +@@ -400,7 +400,7 @@ + __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ + \ + do \ +- __atg14_old = (*__atg14_memp); \ ++ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ + __atg14_old | __atg14_mask,\ +@@ -418,7 +418,7 @@ + __typeof (*(mem)) __atg15_mask = (mask); \ + \ + do \ +- __atg15_old = (*__atg15_memp); \ ++ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ + __atg15_old & __atg15_mask, \ +@@ -450,7 +450,7 @@ + __typeof (*(mem)) __atg16_mask = (mask); \ + \ + do \ +- __atg16_old = (*__atg16_memp); \ ++ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ + __atg16_old & __atg16_mask,\ +@@ -468,7 +468,7 @@ + __typeof (*(mem)) __atg17_mask = (mask); \ + \ + do \ +- __atg17_old = (*__atg17_memp); \ ++ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ + __atg17_old | __atg17_mask, \ +@@ -484,7 +484,7 @@ + __typeof (*(mem)) __atg18_mask = (mask); \ + \ + do \ +- __atg18_old = (*__atg18_memp); \ ++ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ + __atg18_old | __atg18_mask,\ +@@ -500,7 +500,7 @@ + __typeof (*(mem)) __atg19_mask = (mask); \ + \ + do \ +- __atg19_old = (*__atg19_memp); \ ++ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ + __atg19_old | __atg19_mask,\ +diff -durN glibc-2.12.1.orig/nptl/Makefile glibc-2.12.1/nptl/Makefile +--- glibc-2.12.1.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 ++++ glibc-2.12.1/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -264,9 +264,9 @@ + # Files which must not be linked with libpthread. + tests-nolibpthread = tst-unload + +-# This sets the stack resource limit to 1023kb, which is not a multiple +-# of the page size since every architecture's page size is > 1k. +-tst-oddstacklimit-ENV = ; ulimit -s 1023; ++# This sets the stack resource limit to 8193kb, which is not a multiple ++# of the page size since every architecture's page size is 4096 bytes. ++tst-oddstacklimit-ENV = ; ulimit -s 8193; + + distribute = eintr.c tst-cleanup4aux.c + +@@ -425,6 +425,35 @@ + CFLAGS-tst-cleanupx4.c += -fexceptions + CFLAGS-tst-oncex3.c += -fexceptions + CFLAGS-tst-oncex4.c += -fexceptions ++ ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed ++LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) ++ + CFLAGS-tst-align.c += $(stack-align-test-flags) + CFLAGS-tst-align3.c += $(stack-align-test-flags) + CFLAGS-tst-initializers1.c = -W -Wall -Werror +diff -durN glibc-2.12.1.orig/nptl/pthread_barrier_wait.c glibc-2.12.1/nptl/pthread_barrier_wait.c +--- glibc-2.12.1.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 ++++ glibc-2.12.1/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 +@@ -64,7 +64,7 @@ + do + lll_futex_wait (&ibarrier->curr_event, event, + ibarrier->private ^ FUTEX_PRIVATE_FLAG); +- while (event == ibarrier->curr_event); ++ while (event == *(volatile unsigned int *)&ibarrier->curr_event); + } + + /* Make sure the init_count is stored locally or in a register. */ +diff -durN glibc-2.12.1.orig/nptl/sysdeps/pthread/Makefile glibc-2.12.1/nptl/sysdeps/pthread/Makefile +--- glibc-2.12.1.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 ++++ glibc-2.12.1/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -33,7 +33,9 @@ + + ifeq ($(have-forced-unwind),yes) + tests += tst-mqueue8x ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed + CFLAGS-tst-mqueue8x.c += -fexceptions ++LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) + endif + endif + +diff -durN glibc-2.12.1.orig/stdio-common/Makefile glibc-2.12.1/stdio-common/Makefile +--- glibc-2.12.1.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 ++++ glibc-2.12.1/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -82,7 +82,7 @@ + $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' + endif + +-CFLAGS-vfprintf.c = -Wno-uninitialized ++CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch + CFLAGS-vfwprintf.c = -Wno-uninitialized + CFLAGS-tst-printf.c = -Wno-format + CFLAGS-tstdiomisc.c = -Wno-format +diff -durN glibc-2.12.1.orig/sunrpc/clnt_udp.c glibc-2.12.1/sunrpc/clnt_udp.c +--- glibc-2.12.1.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 ++++ glibc-2.12.1/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 +@@ -456,7 +456,7 @@ + while (inlen < 0 && errno == EINTR); + if (inlen < 0) + { +- if (errno == EWOULDBLOCK) ++ if (errno == EWOULDBLOCK || errno == EAGAIN) + continue; + cu->cu_error.re_errno = errno; + return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/packages/glibc/2.12.1/340-dl_execstack-PaX-support.patch b/packages/glibc/2.12.1/340-dl_execstack-PaX-support.patch new file mode 100644 index 0000000..afdb39c --- /dev/null +++ b/packages/glibc/2.12.1/340-dl_execstack-PaX-support.patch @@ -0,0 +1,66 @@ + With latest versions of glibc, a lot of apps failed on a PaX enabled + system with: + cannot enable executable stack as shared object requires: Permission denied + + This is due to PaX 'exec-protecting' the stack, and ld.so then trying + to make the stack executable due to some libraries not containing the + PT_GNU_STACK section. Bug #32960. (12 Nov 2003). + + Patch also NPTL. Bug #116086. (20 Dec 2005). + +diff -durN glibc-2.12.1.orig/nptl/allocatestack.c glibc-2.12.1/nptl/allocatestack.c +--- glibc-2.12.1.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 ++++ glibc-2.12.1/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -329,7 +329,8 @@ + # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" + #endif + if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) +- return errno; ++ if (errno != EACCES) /* PAX is enabled */ ++ return errno; + + return 0; + } +diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.12.1/sysdeps/unix/sysv/linux/dl-execstack.c +--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -63,7 +63,10 @@ + else + # endif + { +- result = errno; ++ if (errno == EACCES) /* PAX is enabled */ ++ result = 0; ++ else ++ result = errno; + goto out; + } + } +@@ -89,7 +92,12 @@ + page -= size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; +@@ -115,7 +123,12 @@ + page += size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; diff --git a/packages/glibc/2.12.1/350-pre20040117-pt_pax.patch b/packages/glibc/2.12.1/350-pre20040117-pt_pax.patch new file mode 100644 index 0000000..3f03169 --- /dev/null +++ b/packages/glibc/2.12.1/350-pre20040117-pt_pax.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.12.1.orig/elf/elf.h glibc-2.12.1/elf/elf.h +--- glibc-2.12.1.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 ++++ glibc-2.12.1/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 +@@ -580,6 +580,7 @@ + #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ + #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ + #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ ++#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ + #define PT_LOSUNW 0x6ffffffa + #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ + #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ +@@ -593,6 +594,18 @@ + #define PF_X (1 << 0) /* Segment is executable */ + #define PF_W (1 << 1) /* Segment is writable */ + #define PF_R (1 << 2) /* Segment is readable */ ++#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ ++#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ ++#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ ++#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ ++#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ ++#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ ++#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ ++#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ ++#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ ++#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ ++#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ ++#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ + #define PF_MASKOS 0x0ff00000 /* OS-specific */ + #define PF_MASKPROC 0xf0000000 /* Processor-specific */ + diff --git a/packages/glibc/2.12.1/360-tests-sandbox-libdl-paths.patch b/packages/glibc/2.12.1/360-tests-sandbox-libdl-paths.patch new file mode 100644 index 0000000..a847cdb --- /dev/null +++ b/packages/glibc/2.12.1/360-tests-sandbox-libdl-paths.patch @@ -0,0 +1,193 @@ +when glibc runs its tests, it does so by invoking the local library loader. +in Gentoo, we build/run inside of our "sandbox" which itself is linked against +libdl (so that it can load libraries and pull out symbols). the trouble +is that when you upgrade from an older glibc to the new one, often times +internal symbols change name or abi. this is normally OK as you cannot use +libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so +we always say "keep all of the glibc libraries from the same build". but +when glibc runs its tests, it uses dynamic paths to point to its new local +copies of libraries. if the test doesnt use libdl, then glibc doesnt add +its path, and when sandbox triggers the loading of libdl, glibc does so +from the host system system. this gets us into the case of all libraries +are from the locally compiled version of glibc except for libdl.so. + +Fix by Wormo + +http://bugs.gentoo.org/56898 + +diff -durN glibc-2.12.1.orig/grp/tst_fgetgrent.sh glibc-2.12.1/grp/tst_fgetgrent.sh +--- glibc-2.12.1.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 ++++ glibc-2.12.1/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,7 +24,8 @@ + rtld_installed_name=$1; shift + + testout=${common_objpfx}/grp/tst_fgetgrent.out +-library_path=${common_objpfx} ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn + + result=0 + +diff -durN glibc-2.12.1.orig/iconvdata/run-iconv-test.sh glibc-2.12.1/iconvdata/run-iconv-test.sh +--- glibc-2.12.1.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 ++++ glibc-2.12.1/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -34,7 +34,7 @@ + export GCONV_PATH + + # We have to have some directories in the library path. +-LIBPATH=$codir:$codir/iconvdata ++LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn + + # How the start the iconv(1) program. + ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ +diff -durN glibc-2.12.1.orig/iconvdata/tst-table.sh glibc-2.12.1/iconvdata/tst-table.sh +--- glibc-2.12.1.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 ++++ glibc-2.12.1/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -59,8 +59,11 @@ + irreversible=${charset}.irreversible + fi + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # iconv in one direction. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-table-from ${charset} \ + > ${objpfx}tst-${charset}.table + +diff -durN glibc-2.12.1.orig/intl/tst-codeset.sh glibc-2.12.1/intl/tst-codeset.sh +--- glibc-2.12.1.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 ++++ glibc-2.12.1/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -37,6 +37,9 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + ${common_objpfx}elf/ld.so --library-path $common_objpfx \ + ${objpfx}tst-codeset > ${objpfx}tst-codeset.out + +diff -durN glibc-2.12.1.orig/intl/tst-gettext.sh glibc-2.12.1/intl/tst-gettext.sh +--- glibc-2.12.1.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 ++++ glibc-2.12.1/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -51,9 +51,12 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. + MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.12.1.orig/intl/tst-gettext2.sh glibc-2.12.1/intl/tst-gettext2.sh +--- glibc-2.12.1.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 ++++ glibc-2.12.1/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -65,8 +65,11 @@ + LOCPATH=${objpfx}domaindir + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && + cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.12.1.orig/malloc/tst-mtrace.sh glibc-2.12.1/malloc/tst-mtrace.sh +--- glibc-2.12.1.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 ++++ glibc-2.12.1/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,9 +24,12 @@ + status=0 + trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ + LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${common_objpfx}malloc/tst-mtrace || status=1 + + if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then +diff -durN glibc-2.12.1.orig/nptl/tst-tls6.sh glibc-2.12.1/nptl/tst-tls6.sh +--- glibc-2.12.1.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 ++++ glibc-2.12.1/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -5,8 +5,8 @@ + rtld_installed_name=$1; shift + logfile=$common_objpfx/nptl/tst-tls6.out + +-# We have to find libc and nptl +-library_path=${common_objpfx}:${common_objpfx}nptl ++# We have to find libc and nptl (also libdl in case sandbox is in use) ++library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn + tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}/nptl/tst-tls5" + +diff -durN glibc-2.12.1.orig/posix/globtest.sh glibc-2.12.1/posix/globtest.sh +--- glibc-2.12.1.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 ++++ glibc-2.12.1/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -18,7 +18,7 @@ + esac + + # We have to find the libc and the NSS modules. +-library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod ++library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn + + # Since we use `sort' we must make sure to use the same locale everywhere. + LC_ALL=C +diff -durN glibc-2.12.1.orig/posix/tst-getconf.sh glibc-2.12.1/posix/tst-getconf.sh +--- glibc-2.12.1.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 ++++ glibc-2.12.1/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -10,7 +10,10 @@ + else + rtld_installed_name=$1; shift + runit() { +- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" ++ ++ # make sure libdl is also in path in case sandbox is in use ++ library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" + } + fi + +diff -durN glibc-2.12.1.orig/posix/wordexp-tst.sh glibc-2.12.1/posix/wordexp-tst.sh +--- glibc-2.12.1.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 ++++ glibc-2.12.1/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -19,8 +19,11 @@ + " + export IFS + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + failed=0 +-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ ++${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 + cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 + wordexp returned 0 diff --git a/packages/glibc/2.12.1/370-fnmatch.patch b/packages/glibc/2.12.1/370-fnmatch.patch new file mode 100644 index 0000000..f345b35 --- /dev/null +++ b/packages/glibc/2.12.1/370-fnmatch.patch @@ -0,0 +1,62 @@ +http://sourceware.org/ml/libc-hacker/2002-11/msg00071.html + +When fnmatch detects an invalid multibyte character it should fall back to +single byte matching, so that "*" has a chance to match such a string. + +Andreas. + +2005-04-12 Andreas Schwab + + * posix/fnmatch.c (fnmatch): If conversion to wide character + fails fall back to single byte matching. + +Index: posix/fnmatch.c +=================================================================== + +diff -durN glibc-2.12.1.orig/posix/fnmatch.c glibc-2.12.1/posix/fnmatch.c +--- glibc-2.12.1.orig/posix/fnmatch.c 2007-07-28 22:35:00.000000000 +0200 ++++ glibc-2.12.1/posix/fnmatch.c 2009-11-13 00:50:39.000000000 +0100 +@@ -327,6 +327,7 @@ + # if HANDLE_MULTIBYTE + if (__builtin_expect (MB_CUR_MAX, 1) != 1) + { ++ const char *orig_pattern = pattern; + mbstate_t ps; + size_t n; + const char *p; +@@ -382,10 +383,8 @@ + wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t)); + n = mbsrtowcs (wstring, &p, n + 1, &ps); + if (__builtin_expect (n == (size_t) -1, 0)) +- /* Something wrong. +- XXX Do we have to set `errno' to something which mbsrtows hasn't +- already done? */ +- return -1; ++ /* Something wrong. Fall back to single byte matching. */ ++ goto try_singlebyte; + if (p) + { + memset (&ps, '\0', sizeof (ps)); +@@ -397,10 +396,8 @@ + prepare_wstring: + n = mbsrtowcs (NULL, &string, 0, &ps); + if (__builtin_expect (n == (size_t) -1, 0)) +- /* Something wrong. +- XXX Do we have to set `errno' to something which mbsrtows hasn't +- already done? */ +- return -1; ++ /* Something wrong. Fall back to single byte matching. */ ++ goto try_singlebyte; + wstring = (wchar_t *) alloca ((n + 1) * sizeof (wchar_t)); + assert (mbsinit (&ps)); + (void) mbsrtowcs (wstring, &string, n + 1, &ps); +@@ -408,6 +405,9 @@ + + return internal_fnwmatch (wpattern, wstring, wstring + n, + flags & FNM_PERIOD, flags, NULL); ++ ++ try_singlebyte: ++ pattern = orig_pattern; + } + # endif /* mbstate_t and mbsrtowcs or _LIBC. */ + diff --git a/packages/glibc/2.12.1/380-dont-build-timezone.patch b/packages/glibc/2.12.1/380-dont-build-timezone.patch new file mode 100644 index 0000000..0a30436 --- /dev/null +++ b/packages/glibc/2.12.1/380-dont-build-timezone.patch @@ -0,0 +1,14 @@ +timezone data has been split into the package sys-libs/timezone-data + +diff -durN glibc-2.12.1.orig/Makeconfig glibc-2.12.1/Makeconfig +--- glibc-2.12.1.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 ++++ glibc-2.12.1/Makeconfig 2009-11-13 00:50:41.000000000 +0100 +@@ -944,7 +944,7 @@ + stdlib stdio-common libio malloc string wcsmbs time dirent \ + grp pwd posix io termios resource misc socket sysvipc gmon \ + gnulib iconv iconvdata wctype manual shadow gshadow po argp \ +- crypt nss localedata timezone rt conform debug \ ++ crypt nss localedata rt conform debug \ + $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) + + ifndef avoid-generated diff --git a/packages/glibc/2.12.1/400-alpha-xstat.patch b/packages/glibc/2.12.1/400-alpha-xstat.patch new file mode 100644 index 0000000..97bea98 --- /dev/null +++ b/packages/glibc/2.12.1/400-alpha-xstat.patch @@ -0,0 +1,15 @@ +diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 +@@ -386,6 +386,11 @@ + # define __ASSUME_GETDENTS32_D_TYPE 1 + #endif + ++/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ ++#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ ++# define __ASSUME_STAT64_SYSCALL 1 ++#endif ++ + /* Starting with version 2.5.3, the initial location returned by `brk' + after exec is always rounded up to the next page. */ + #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/packages/glibc/2.12.1/430-alpha-creat.patch b/packages/glibc/2.12.1/430-alpha-creat.patch new file mode 100644 index 0000000..bfb72d0 --- /dev/null +++ b/packages/glibc/2.12.1/430-alpha-creat.patch @@ -0,0 +1,14 @@ +alpha does not have a __NR_creat + +http://bugs.gentoo.org/227275 +http://sourceware.org/bugzilla/show_bug.cgi?id=6650 + +diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.12.1/sysdeps/unix/sysv/linux/wordsize-64/creat64.c +--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 +@@ -1 +1,5 @@ + /* Defined as alias for the syscall. */ ++#include ++#ifndef __NR_creat ++#include "../../../../../io/creat64.c" ++#endif diff --git a/packages/glibc/2.12.1/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc/2.12.1/490-alpha_alpha-add-fdatasync-support.patch new file mode 100644 index 0000000..9d35ebd --- /dev/null +++ b/packages/glibc/2.12.1/490-alpha_alpha-add-fdatasync-support.patch @@ -0,0 +1,126 @@ +2009-07-25 Aurelien Jarno + + * sysdeps/unix/sysv/linux/kernel-features.h: define + __ASSUME_FDATASYNC. + * sysdeps/unix/sysv/linux/fdatasync.c: New file. + * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with + -fexceptions. + * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. + + sysdeps/unix/sysv/linux/Makefile | 1 + sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ + sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ + sysdeps/unix/sysv/linux/syscalls.list | 1 + 4 files changed, 76 insertions(+), 1 deletion(-) + +diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.12.1/sysdeps/unix/sysv/linux/Makefile +--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 +@@ -20,6 +20,7 @@ + setfsuid setfsgid makedev epoll_pwait signalfd \ + eventfd eventfd_read eventfd_write + ++CFLAGS-fdatasync.c = -fexceptions + CFLAGS-gethostid.c = -fexceptions + + sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ +diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.12.1/sysdeps/unix/sysv/linux/fdatasync.c +--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 +@@ -0,0 +1,69 @@ ++/* fdatasync -- synchronize at least the data part of a file with ++ the underlying media. Linux version. ++ ++ Copyright (C) 2007 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC ++static int __have_no_fdatasync; ++#endif ++ ++static int ++do_fdatasync (int fd) ++{ ++#ifdef __ASSUME_FDATASYNC ++ return INLINE_SYSCALL (fdatasync, 1, fd); ++#elif defined __NR_fdatasync ++ if (!__builtin_expect (__have_no_fdatasync, 0)) ++ { ++ int result = INLINE_SYSCALL (fdatasync, 1, fd); ++ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) ++ return result; ++ ++ __have_no_fdatasync = 1; ++ } ++#endif ++ return INLINE_SYSCALL (fsync, 1, fd); ++} ++ ++int ++__fdatasync (int fd) ++{ ++ if (SINGLE_THREAD_P) ++ return do_fdatasync (fd); ++ ++ int oldtype = LIBC_CANCEL_ASYNC (); ++ ++ int result = do_fdatasync (fd); ++ ++ LIBC_CANCEL_RESET (oldtype); ++ ++ return result; ++} ++ ++weak_alias (__fdatasync, fdatasync) ++ +diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 +@@ -459,6 +459,12 @@ + # define __ASSUME_FUTEX_LOCK_PI 1 + #endif + ++/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it ++ was already present in 2.0 kernels on other architectures. */ ++#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) ++# define __ASSUME_FDATASYNC 1 ++#endif ++ + /* Support for utimensat syscall was added in 2.6.22, on SH + only after 2.6.22-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020616 \ +diff -durN glibc-2.12.1.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.12.1/sysdeps/unix/sysv/linux/syscalls.list +--- glibc-2.12.1.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 +@@ -11,7 +11,6 @@ + epoll_create1 EXTRA epoll_create1 i:i epoll_create1 + epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl + epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait +-fdatasync - fdatasync Ci:i fdatasync + flock - flock i:ii __flock flock + fork - fork i: __libc_fork __fork fork + get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/packages/glibc/2.12.1/560-ppc-atomic.patch b/packages/glibc/2.12.1/560-ppc-atomic.patch new file mode 100644 index 0000000..679ef18 --- /dev/null +++ b/packages/glibc/2.12.1/560-ppc-atomic.patch @@ -0,0 +1,415 @@ +sniped from suse + +Index: sysdeps/powerpc/bits/atomic.h +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v +retrieving revision 1.17 +diff -u -a -p -r1.17 atomic.h + +diff -durN glibc-2.12.1.orig/sysdeps/powerpc/bits/atomic.h glibc-2.12.1/sysdeps/powerpc/bits/atomic.h +--- glibc-2.12.1.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 ++++ glibc-2.12.1/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -85,14 +85,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -102,14 +102,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -118,12 +118,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -132,11 +132,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -144,12 +144,12 @@ + #define __arch_atomic_exchange_and_add_32(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stwcx. %1,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -157,12 +157,12 @@ + #define __arch_atomic_increment_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -170,27 +170,27 @@ + #define __arch_atomic_decrement_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_32(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ + " cmpwi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stwcx. %1,0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +diff -durN glibc-2.12.1.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.12.1/sysdeps/powerpc/powerpc32/bits/atomic.h +--- glibc-2.12.1.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 ++++ glibc-2.12.1/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -60,14 +60,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +diff -durN glibc-2.12.1.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.12.1/sysdeps/powerpc/powerpc64/bits/atomic.h +--- glibc-2.12.1.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 ++++ glibc-2.12.1/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp, __tmp2; \ + __asm __volatile (" clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -61,14 +61,14 @@ + unsigned int __tmp, __tmp2; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ + " clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -82,14 +82,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -98,14 +98,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -115,14 +115,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -132,14 +132,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -148,12 +148,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -162,11 +162,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -174,12 +174,12 @@ + #define __arch_atomic_exchange_and_add_64(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stdcx. %1,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -187,12 +187,12 @@ + #define __arch_atomic_increment_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -200,27 +200,27 @@ + #define __arch_atomic_decrement_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_64(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ + " cmpdi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stdcx. %1,0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) diff --git a/packages/glibc/2.12.1/630-mips_shn_undef-hack.patch b/packages/glibc/2.12.1/630-mips_shn_undef-hack.patch new file mode 100644 index 0000000..f6a5eb6 --- /dev/null +++ b/packages/glibc/2.12.1/630-mips_shn_undef-hack.patch @@ -0,0 +1,16 @@ +diff -durN glibc-2.12.1.orig/elf/dl-lookup.c glibc-2.12.1/elf/dl-lookup.c +--- glibc-2.12.1.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 ++++ glibc-2.12.1/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 +@@ -301,6 +301,12 @@ + /* FALLTHROUGH */ + case STB_GLOBAL: + success: ++#ifdef __mips__ ++ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF ++ symbols, we skip them. */ ++ if (sym->st_shndx == SHN_UNDEF) ++ break; ++#endif + /* Global definition. Just what we need. */ + result->s = sym; + result->m = (struct link_map *) map; diff --git a/packages/glibc/2.12.1/640-alpha-atfcts.patch b/packages/glibc/2.12.1/640-alpha-atfcts.patch new file mode 100644 index 0000000..90a9d0d --- /dev/null +++ b/packages/glibc/2.12.1/640-alpha-atfcts.patch @@ -0,0 +1,12 @@ +--- glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 ++++ glibc-2.12.1/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 +@@ -437,7 +437,8 @@ + the code. On PPC they were introduced in 2.6.17-rc1, + on SH in 2.6.19-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020611 \ +- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) ++ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ ++ && (!defined __alpha__) + # define __ASSUME_ATFCTS 1 + #endif + diff --git a/packages/glibc/2.12.1/650-syslog.patch b/packages/glibc/2.12.1/650-syslog.patch new file mode 100644 index 0000000..c20cafc --- /dev/null +++ b/packages/glibc/2.12.1/650-syslog.patch @@ -0,0 +1,12 @@ +diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c +--- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 ++++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 +@@ -152,7 +152,7 @@ + #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID + /* Check for invalid bits. */ + if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { +- syslog(INTERNALLOG, ++ __syslog(INTERNALLOG, + "syslog: unknown facility/priority: %x", pri); + pri &= LOG_PRIMASK|LOG_FACMASK; + } diff --git a/packages/glibc/2.12.1/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc/2.12.1/660-debug-readlink_chk-readklinkat_chk.patch new file mode 100644 index 0000000..a5a7052 --- /dev/null +++ b/packages/glibc/2.12.1/660-debug-readlink_chk-readklinkat_chk.patch @@ -0,0 +1,24 @@ +diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c +--- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 ++++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 +@@ -25,7 +25,7 @@ + + + ssize_t +-__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) ++__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) + { + if (len > buflen) + __chk_fail (); +diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c +--- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 ++++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 +@@ -21,7 +21,7 @@ + + + ssize_t +-__readlinkat_chk (int fd, const char *path, void *buf, size_t len, ++__readlinkat_chk (int fd, const char *path, char *buf, size_t len, + size_t buflen) + { + if (len > buflen) diff --git a/packages/glibc/2.13/100-respect-env-CPPFLAGS.patch b/packages/glibc/2.13/100-respect-env-CPPFLAGS.patch new file mode 100644 index 0000000..3798cb2 --- /dev/null +++ b/packages/glibc/2.13/100-respect-env-CPPFLAGS.patch @@ -0,0 +1,14 @@ +Respect environment CPPFLAGS when we run ./configure so we can inject +random -D things without having to set CFLAGS/ASFLAGS + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 ++++ glibc-2.13/Makeconfig 2009-11-13 00:49:41.000000000 +0100 +@@ -697,6 +697,7 @@ + $(foreach lib,$(libof-$(basename $(@F))) \ + $(libof-$(field.le_next)) + ++#define LIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = LIST_FIRST((head)); \ ++ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + /* + * List access methods. + */ +@@ -197,6 +202,16 @@ + #define SLIST_FOREACH(var, head, field) \ + for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) + ++#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = SLIST_FIRST((head)); \ ++ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ ++#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ ++ for ((varp) = &SLIST_FIRST((head)); \ ++ ((var) = *(varp)) != NULL; \ ++ (varp) = &SLIST_NEXT((var), field)) ++ + /* + * Singly-linked List access methods. + */ +@@ -242,6 +257,12 @@ + (head)->stqh_last = &(elm)->field.stqe_next; \ + } while (/*CONSTCOND*/0) + ++#define STAILQ_LAST(head, type, field) \ ++ (STAILQ_EMPTY((head)) ? \ ++ NULL : \ ++ ((struct type *)(void *) \ ++ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) ++ + #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ + if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ + (head)->stqh_last = &(elm)->field.stqe_next; \ +@@ -271,6 +292,11 @@ + (var); \ + (var) = ((var)->field.stqe_next)) + ++#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = STAILQ_FIRST((head)); \ ++ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define STAILQ_CONCAT(head1, head2) do { \ + if (!STAILQ_EMPTY((head2))) { \ + *(head1)->stqh_last = (head2)->stqh_first; \ +@@ -437,11 +463,21 @@ + (var); \ + (var) = ((var)->field.tqe_next)) + ++#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = TAILQ_FIRST((head)); \ ++ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ + for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ + (var); \ + (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) + ++#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ ++ for ((var) = TAILQ_LAST((head), headname); \ ++ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_CONCAT(head1, head2, field) do { \ + if (!TAILQ_EMPTY(head2)) { \ + *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/packages/glibc/2.13/160-manual-no-perl.patch b/packages/glibc/2.13/160-manual-no-perl.patch new file mode 100644 index 0000000..5e2b807 --- /dev/null +++ b/packages/glibc/2.13/160-manual-no-perl.patch @@ -0,0 +1,24 @@ +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.13.orig/manual/Makefile glibc-2.13/manual/Makefile +--- glibc-2.13.orig/manual/Makefile 2006-01-08 07:43:47.000000000 +0100 ++++ glibc-2.13/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/packages/glibc/2.13/170-localedef-fix-trampoline.patch b/packages/glibc/2.13/170-localedef-fix-trampoline.patch new file mode 100644 index 0000000..3cc6559 --- /dev/null +++ b/packages/glibc/2.13/170-localedef-fix-trampoline.patch @@ -0,0 +1,53 @@ +# DP: Description: Fix localedef segfault when run under exec-shield, +# PaX or similar. (#231438, #198099) +# DP: Dpatch Author: James Troup +# DP: Patch Author: (probably) Jakub Jelinek +# DP: Upstream status: Unknown +# DP: Status Details: Unknown +# DP: Date: 2004-03-16 +diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h +--- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 ++++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 +@@ -203,6 +203,42 @@ + } + } + } ++ ++/* GCC ATM seems to do a poor job with pointers to nested functions passed ++ to inlined functions. Help it a little bit with this hack. */ ++#define wchead_table_iterate(tp, fn) \ ++do \ ++ { \ ++ struct wchead_table *t = (tp); \ ++ uint32_t index1; \ ++ for (index1 = 0; index1 < t->level1_size; index1++) \ ++ { \ ++ uint32_t lookup1 = t->level1[index1]; \ ++ if (lookup1 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup1_shifted = lookup1 << t->q; \ ++ uint32_t index2; \ ++ for (index2 = 0; index2 < (1 << t->q); index2++) \ ++ { \ ++ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ ++ if (lookup2 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup2_shifted = lookup2 << t->p; \ ++ uint32_t index3; \ ++ for (index3 = 0; index3 < (1 << t->p); index3++) \ ++ { \ ++ struct element_t *lookup3 \ ++ = t->level3[index3 + lookup2_shifted]; \ ++ if (lookup3 != NULL) \ ++ fn ((((index1 << t->q) + index2) << t->p) + index3, \ ++ lookup3); \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } while (0) ++ + #endif + + #ifndef NO_FINALIZE diff --git a/packages/glibc/2.13/180-resolv-dynamic.patch b/packages/glibc/2.13/180-resolv-dynamic.patch new file mode 100644 index 0000000..e916bce --- /dev/null +++ b/packages/glibc/2.13/180-resolv-dynamic.patch @@ -0,0 +1,39 @@ +ripped from SuSE + +if /etc/resolv.conf is updated, then make sure applications +already running get the updated information. + +http://bugs.gentoo.org/177416 + +diff -durN glibc-2.13.orig/resolv/res_libc.c glibc-2.13/resolv/res_libc.c +--- glibc-2.13.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 ++++ glibc-2.13/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + + /* The following bit is copied from res_data.c (where it is #ifdef'ed +@@ -95,6 +96,20 @@ + __res_maybe_init (res_state resp, int preinit) + { + if (resp->options & RES_INIT) { ++ static time_t last_mtime, last_check; ++ time_t now; ++ struct stat statbuf; ++ ++ time (&now); ++ if (now != last_check) { ++ last_check = now; ++ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { ++ last_mtime = statbuf.st_mtime; ++ atomicinclock (lock); ++ atomicinc (__res_initstamp); ++ atomicincunlock (lock); ++ } ++ } + if (__res_initstamp != resp->_u._ext.initstamp) { + if (resp->nscount > 0) + __res_iclose (resp, true); diff --git a/packages/glibc/2.13/190-localedef-mmap.patch b/packages/glibc/2.13/190-localedef-mmap.patch new file mode 100644 index 0000000..f3914cd --- /dev/null +++ b/packages/glibc/2.13/190-localedef-mmap.patch @@ -0,0 +1,39 @@ +sniped from Debian +http://bugs.gentoo.org/289615 + +2009-10-27 Aurelien Jarno + + * locale/programs/locarchive.c: use MMAP_SHARED to reserve memory + used later with MMAP_FIXED | MMAP_SHARED to cope with different + alignment restrictions. + +diff -durN glibc-2.13.orig/locale/programs/locarchive.c glibc-2.13/locale/programs/locarchive.c +--- glibc-2.13.orig/locale/programs/locarchive.c 2009-04-27 16:07:47.000000000 +0200 ++++ glibc-2.13/locale/programs/locarchive.c 2009-11-13 00:50:01.000000000 +0100 +@@ -134,7 +134,7 @@ + size_t reserved = RESERVE_MMAP_SIZE; + int xflags = 0; + if (total < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else +@@ -396,7 +396,7 @@ + size_t reserved = RESERVE_MMAP_SIZE; + int xflags = 0; + if (total < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else +@@ -614,7 +614,7 @@ + int xflags = 0; + void *p; + if (st.st_size < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else diff --git a/packages/glibc/2.13/200-fadvise64_64.patch b/packages/glibc/2.13/200-fadvise64_64.patch new file mode 100644 index 0000000..71bca38 --- /dev/null +++ b/packages/glibc/2.13/200-fadvise64_64.patch @@ -0,0 +1,28 @@ +ripped from Debian + + sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 +@@ -35,6 +35,19 @@ + return INTERNAL_SYSCALL_ERRNO (ret, err); + return 0; + #else ++# ifdef __NR_fadvise64_64 ++ INTERNAL_SYSCALL_DECL (err); ++ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, ++ __LONG_LONG_PAIR ((long) (offset >> 31), ++ (long) offset), ++ __LONG_LONG_PAIR ((long) (len >> 31), ++ (long) len), ++ advise); ++ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) ++ return INTERNAL_SYSCALL_ERRNO (ret, err); ++ return 0; ++# else + return ENOSYS; ++# endif + #endif + } diff --git a/packages/glibc/2.13/220-section-comments.patch b/packages/glibc/2.13/220-section-comments.patch new file mode 100644 index 0000000..d717829 --- /dev/null +++ b/packages/glibc/2.13/220-section-comments.patch @@ -0,0 +1,24 @@ +http://sources.redhat.com/ml/binutils/2004-04/msg00665.html + +fixes building on some architectures (like m68k/arm/cris/etc...) because +it does the right thing + +diff -durN glibc-2.13.orig/include/libc-symbols.h glibc-2.13/include/libc-symbols.h +--- glibc-2.13.orig/include/libc-symbols.h 2009-03-14 00:51:46.000000000 +0100 ++++ glibc-2.13/include/libc-symbols.h 2009-11-13 00:50:07.000000000 +0100 +@@ -239,12 +239,12 @@ + # define __make_section_unallocated(section_string) + # endif + +-/* Tacking on "\n\t#" to the section name makes gcc put it's bogus ++/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus + section attributes on what looks like a comment to the assembler. */ + # ifdef HAVE_SECTION_QUOTES +-# define __sec_comment "\"\n\t#\"" ++# define __sec_comment "\"\n#APP\n\t#\"" + # else +-# define __sec_comment "\n\t#" ++# define __sec_comment "\n#APP\n\t#" + # endif + # define link_warning(symbol, msg) \ + __make_section_unallocated (".gnu.warning." #symbol) \ diff --git a/packages/glibc/2.13/230-no-inline-gmon.patch b/packages/glibc/2.13/230-no-inline-gmon.patch new file mode 100644 index 0000000..fa33c2b --- /dev/null +++ b/packages/glibc/2.13/230-no-inline-gmon.patch @@ -0,0 +1,36 @@ +http://bugs.gentoo.org/196245 +http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html + +Attached is a patch to add __attribute__ ((noinline)) to +call_gmon_start. + +Without this patch, the sec script that processed initfini.s removes a +part of inlined call_gmon_start, causing undefined label errors. + +This patch solves the problem by forcing gcc not to inline +call_gmon_start with __attribute__ ((noinline)). + +Tested by building for arm-none-lixux-gnueabi. OK to apply? + +Kazu Hirata + +2006-05-07 Kazu Hirata <kazu@codesourcery.com> + + * sysdeps/generic/initfini.c (call_gmon_start): Add + __attribute__ ((noinline)). + +Index: sysdeps/generic/initfini.c +=================================================================== + +diff -durN glibc-2.13.orig/sysdeps/generic/initfini.c glibc-2.13/sysdeps/generic/initfini.c +--- glibc-2.13.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200 ++++ glibc-2.13/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100 +@@ -70,7 +70,7 @@ + /* The beginning of _init: */ + asm ("\n/*@_init_PROLOG_BEGINS*/"); + +-static void ++static void __attribute__ ((noinline)) + call_gmon_start(void) + { + extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ diff --git a/packages/glibc/2.13/240-check_native-headers.patch b/packages/glibc/2.13/240-check_native-headers.patch new file mode 100644 index 0000000..c936f71 --- /dev/null +++ b/packages/glibc/2.13/240-check_native-headers.patch @@ -0,0 +1,17 @@ +many ports hit this warning: +../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' +../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' + +snipped from suse + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/check_native.c glibc-2.13/sysdeps/unix/sysv/linux/check_native.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/check_native.c 2007-11-24 04:12:17.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/check_native.c 2009-11-13 00:50:11.000000000 +0100 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/packages/glibc/2.13/250-fix-pr631.patch b/packages/glibc/2.13/250-fix-pr631.patch new file mode 100644 index 0000000..a48912e --- /dev/null +++ b/packages/glibc/2.13/250-fix-pr631.patch @@ -0,0 +1,45 @@ +From dank@kegel.com +Wed Jun 15 09:12:43 PDT 2005 + +Fixes + +build-glibc/libc.a(nsswitch.o)(.data+0x64): undefined reference to `_nss_files_getaliasent_r' +build-glibc/libc.a(nsswitch.o)(.data+0x6c): undefined reference to `_nss_files_endaliasent' +... 53 lines deleted ... +build-glibc/libc.a(nsswitch.o)(.data+0x21c): undefined reference to `_nss_files_getspnam_r' +collect2: ld returned 1 exit status +make[2]: *** [/build/gcc-3.4.3-glibc-2.3.5-hdrs-2.6.11.2/i686-unknown-linux-gnu/build-glibc/elf/ldconfig] Error 1 + +when building glibc with --enable-static-nss. + +See http://sources.redhat.com/bugzilla/show_bug.cgi?id=631 + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-11-13 00:49:41.000000000 +0100 ++++ glibc-2.13/Makeconfig 2009-11-13 00:50:13.000000000 +0100 +@@ -531,7 +531,7 @@ + + # The static libraries. + ifeq (yes,$(build-static)) +-link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a ++link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(otherlibs) $(common-objpfx)libc.a + else + ifeq (yes,$(build-shared)) + # We can try to link the programs with lib*_pic.a... +diff -durN glibc-2.13.orig/elf/Makefile glibc-2.13/elf/Makefile +--- glibc-2.13.orig/elf/Makefile 2009-01-31 01:20:55.000000000 +0100 ++++ glibc-2.13/elf/Makefile 2009-11-13 00:50:13.000000000 +0100 +@@ -146,6 +146,13 @@ + install-bin-script = ldd + endif + ++ifeq (yes,$(build-static-nss)) ++nssobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)nss) ++resolvobjdir := $(patsubst ../$(subdir),.,$(common-objpfx)resolv) ++otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \ ++ $(resolvobjdir)/libresolv.a ++endif ++ + others = sprof sln + install-bin = sprof + others-static = sln diff --git a/packages/glibc/2.13/260-assume-pipe2.patch b/packages/glibc/2.13/260-assume-pipe2.patch new file mode 100644 index 0000000..42e8f4e --- /dev/null +++ b/packages/glibc/2.13/260-assume-pipe2.patch @@ -0,0 +1,40 @@ +http://bugs.gentoo.org/250342 +http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 + +we cant assume sock_cloexec and pipe2 are bound together as the former defines +are found in glibc only while the latter are a combo of kernel headers and +glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub +inside of glibc, we hit a problem. for example: + +#include +#include +main() +{ + getgrnam("portage"); + if (!popen("ls", "r")) + perror("popen()"); +} + +getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both +__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against +older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS +stub for it. so popen() will always fail as glibc assumes pipe2() works. + +diff -durN glibc-2.13.orig/socket/have_sock_cloexec.c glibc-2.13/socket/have_sock_cloexec.c +--- glibc-2.13.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 ++++ glibc-2.13/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 +@@ -16,9 +16,14 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#include + #include + #include + + #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC + int __have_sock_cloexec; + #endif ++ ++#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 ++int __have_pipe2; ++#endif diff --git a/packages/glibc/2.13/270-china.patch b/packages/glibc/2.13/270-china.patch new file mode 100644 index 0000000..41d7759 --- /dev/null +++ b/packages/glibc/2.13/270-china.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.13.orig/localedata/locales/zh_TW glibc-2.13/localedata/locales/zh_TW +--- glibc-2.13.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 ++++ glibc-2.13/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 +@@ -1,7 +1,7 @@ + comment_char % + escape_char / + % +-% Chinese language locale for Taiwan R.O.C. ++% Chinese language locale for Taiwan + % charmap: BIG5-CP950 + % + % Original Author: +@@ -17,7 +17,7 @@ + % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf + + LC_IDENTIFICATION +-title "Chinese locale for Taiwan R.O.C." ++title "Chinese locale for Taiwan" + source "" + address "" + contact "" +@@ -25,7 +25,7 @@ + tel "" + fax "" + language "Chinese" +-territory "Taiwan R.O.C." ++territory "Taiwan" + revision "0.2" + date "2000-08-02" + % diff --git a/packages/glibc/2.13/280-new-valencian-locale.patch b/packages/glibc/2.13/280-new-valencian-locale.patch new file mode 100644 index 0000000..4cdd108 --- /dev/null +++ b/packages/glibc/2.13/280-new-valencian-locale.patch @@ -0,0 +1,115 @@ +http://bugs.gentoo.org/show_bug.cgi?id=131815 +http://sourceware.org/bugzilla/show_bug.cgi?id=2522 + +diff -durN glibc-2.13.orig/localedata/SUPPORTED glibc-2.13/localedata/SUPPORTED +--- glibc-2.13.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 ++++ glibc-2.13/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 +@@ -72,6 +72,8 @@ + ca_ES.UTF-8/UTF-8 \ + ca_ES/ISO-8859-1 \ + ca_ES@euro/ISO-8859-15 \ ++ca_ES.UTF-8@valencia/UTF-8 \ ++ca_ES@valencia/ISO-8859-15 \ + ca_FR.UTF-8/UTF-8 \ + ca_FR/ISO-8859-15 \ + ca_IT.UTF-8/UTF-8 \ +diff -durN glibc-2.13.orig/localedata/locales/ca_ES@valencia glibc-2.13/localedata/locales/ca_ES@valencia +--- glibc-2.13.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.13/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 +@@ -0,0 +1,96 @@ ++comment_char % ++escape_char / ++% ++% Valencian (southern Catalan) locale for Spain with Euro ++% ++% Note that this locale is almost the same as ca_ES@euro. The point of having ++% a separate locale is only for PO translations, which have a lot of social ++% support and are very appreciated by the Valencian-speaking community. ++% ++% Contact: Jordi Mallach ++% Email: jordi@gnu.org ++% Tel: ++% Fax: ++% Language: ca ++% Territory: ES ++% Option: euro ++% Revision: 1.0 ++% Date: 2006-04-06 ++% Application: general ++% Users: general ++% Repertoiremap: mnemonic,ds ++% Charset: ISO-8859-15 ++% Distribution and use is free, also ++% for commercial purposes. ++ ++LC_IDENTIFICATION ++title "Valencian (southern Catalan) locale for Spain with Euro" ++source "" ++address "" ++contact "Jordi Mallach" ++email "jordi@gnu.org" ++tel "" ++fax "" ++language "Catalan" ++territory "Spain" ++revision "1.0" ++date "2006-04-06" ++% ++category "ca_ES@valencia:2006";LC_IDENTIFICATION ++category "ca_ES@valencia:2006";LC_CTYPE ++category "ca_ES@valencia:2006";LC_COLLATE ++category "ca_ES@valencia:2006";LC_MONETARY ++category "ca_ES@valencia:2006";LC_NUMERIC ++category "ca_ES@valencia:2006";LC_TIME ++category "ca_ES@valencia:2006";LC_MESSAGES ++category "ca_ES@valencia:2006";LC_PAPER ++category "ca_ES@valencia:2006";LC_NAME ++category "ca_ES@valencia:2006";LC_ADDRESS ++category "ca_ES@valencia:2006";LC_TELEPHONE ++category "ca_ES@valencia:2006";LC_MEASUREMENT ++ ++END LC_IDENTIFICATION ++ ++LC_CTYPE ++copy "i18n" ++END LC_CTYPE ++ ++LC_COLLATE ++copy "ca_ES" ++END LC_COLLATE ++ ++LC_MONETARY ++copy "ca_ES" ++END LC_MONETARY ++ ++LC_NUMERIC ++copy "ca_ES" ++END LC_NUMERIC ++ ++LC_TIME ++copy "ca_ES" ++END LC_TIME ++ ++LC_MESSAGES ++copy "ca_ES" ++END LC_MESSAGES ++ ++LC_PAPER ++copy "ca_ES" ++END LC_PAPER ++ ++LC_NAME ++copy "ca_ES" ++END LC_NAME ++ ++LC_ADDRESS ++copy "ca_ES" ++END LC_ADDRESS ++ ++LC_TELEPHONE ++copy "ca_ES" ++END LC_TELEPHONE ++ ++LC_MEASUREMENT ++copy "ca_ES" ++END LC_MEASUREMENT diff --git a/packages/glibc/2.13/300-nscd-one-fork.patch b/packages/glibc/2.13/300-nscd-one-fork.patch new file mode 100644 index 0000000..adc9b3f --- /dev/null +++ b/packages/glibc/2.13/300-nscd-one-fork.patch @@ -0,0 +1,40 @@ +only fork one to assist in stop-start-daemon assumptions about daemon behavior + +http://bugs.gentoo.org/190785 + +diff -durN glibc-2.13.orig/nscd/nscd.c glibc-2.13/nscd/nscd.c +--- glibc-2.13.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 ++++ glibc-2.13/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 +@@ -182,6 +182,9 @@ + if (pid != 0) + exit (0); + ++ if (write_pid (_PATH_NSCDPID) < 0) ++ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); ++ + int nullfd = open (_PATH_DEVNULL, O_RDWR); + if (nullfd != -1) + { +@@ -231,12 +234,6 @@ + for (i = min_close_fd; i < getdtablesize (); i++) + close (i); + +- pid = fork (); +- if (pid == -1) +- error (EXIT_FAILURE, errno, _("cannot fork")); +- if (pid != 0) +- exit (0); +- + setsid (); + + if (chdir ("/") != 0) +@@ -245,9 +242,6 @@ + + openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); + +- if (write_pid (_PATH_NSCDPID) < 0) +- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); +- + if (!init_logfile ()) + dbg_log (_("Could not create log file")); + diff --git a/packages/glibc/2.13/310-hppa-nptl-carlos.patch b/packages/glibc/2.13/310-hppa-nptl-carlos.patch new file mode 100644 index 0000000..4c028b2 --- /dev/null +++ b/packages/glibc/2.13/310-hppa-nptl-carlos.patch @@ -0,0 +1,246 @@ + + +diff -durN glibc-2.13.orig/elf/rtld.c glibc-2.13/elf/rtld.c +--- glibc-2.13.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 ++++ glibc-2.13/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 +@@ -392,14 +392,14 @@ + know it is available. We do not have to clear the memory if we + do not have to use the temporary bootstrap_map. Global variables + are initialized to zero by default. */ +-#ifndef DONT_USE_BOOTSTRAP_MAP ++#if !defined DONT_USE_BOOTSTRAP_MAP + # ifdef HAVE_BUILTIN_MEMSET + __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); + # else +- for (size_t cnt = 0; +- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); +- ++cnt) +- bootstrap_map.l_info[cnt] = 0; ++ /* Clear the whole bootstrap_map structure */ ++ for (char *cnt = (char *)&(bootstrap_map); ++ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); ++ *cnt++ = '\0'); + # endif + # if USE___THREAD + bootstrap_map.l_tls_modid = 0; +diff -durN glibc-2.13.orig/include/atomic.h glibc-2.13/include/atomic.h +--- glibc-2.13.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 ++++ glibc-2.13/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 +@@ -185,7 +185,7 @@ + __typeof (*(mem)) __atg5_value = (newvalue); \ + \ + do \ +- __atg5_oldval = *__atg5_memp; \ ++ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ + __atg5_oldval), 0)); \ +@@ -206,7 +206,7 @@ + __typeof (*(mem)) __atg6_value = (value); \ + \ + do \ +- __atg6_oldval = *__atg6_memp; \ ++ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ + __atg6_oldval \ +@@ -224,7 +224,7 @@ + __typeof (*(mem)) __atg7_value = (value); \ + \ + do \ +- __atg7_oldv = *__atg7_memp; \ ++ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ + __atg7_oldv \ +@@ -242,7 +242,7 @@ + __typeof (mem) __atg8_memp = (mem); \ + __typeof (*(mem)) __atg8_value = (value); \ + do { \ +- __atg8_oldval = *__atg8_memp; \ ++ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ + if (__atg8_oldval >= __atg8_value) \ + break; \ + } while (__builtin_expect \ +@@ -259,7 +259,7 @@ + __typeof (mem) __atg9_memp = (mem); \ + __typeof (*(mem)) __atg9_value = (value); \ + do { \ +- __atg9_oldv = *__atg9_memp; \ ++ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ + if (__atg9_oldv >= __atg9_value) \ + break; \ + } while (__builtin_expect \ +@@ -277,7 +277,7 @@ + __typeof (mem) __atg10_memp = (mem); \ + __typeof (*(mem)) __atg10_value = (value); \ + do { \ +- __atg10_oldval = *__atg10_memp; \ ++ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ + if (__atg10_oldval <= __atg10_value) \ + break; \ + } while (__builtin_expect \ +@@ -361,7 +361,7 @@ + \ + do \ + { \ +- __atg11_oldval = *__atg11_memp; \ ++ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ + if (__builtin_expect (__atg11_oldval <= 0, 0)) \ + break; \ + } \ +@@ -400,7 +400,7 @@ + __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ + \ + do \ +- __atg14_old = (*__atg14_memp); \ ++ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ + __atg14_old | __atg14_mask,\ +@@ -418,7 +418,7 @@ + __typeof (*(mem)) __atg15_mask = (mask); \ + \ + do \ +- __atg15_old = (*__atg15_memp); \ ++ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ + __atg15_old & __atg15_mask, \ +@@ -450,7 +450,7 @@ + __typeof (*(mem)) __atg16_mask = (mask); \ + \ + do \ +- __atg16_old = (*__atg16_memp); \ ++ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ + __atg16_old & __atg16_mask,\ +@@ -468,7 +468,7 @@ + __typeof (*(mem)) __atg17_mask = (mask); \ + \ + do \ +- __atg17_old = (*__atg17_memp); \ ++ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ + __atg17_old | __atg17_mask, \ +@@ -484,7 +484,7 @@ + __typeof (*(mem)) __atg18_mask = (mask); \ + \ + do \ +- __atg18_old = (*__atg18_memp); \ ++ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ + __atg18_old | __atg18_mask,\ +@@ -500,7 +500,7 @@ + __typeof (*(mem)) __atg19_mask = (mask); \ + \ + do \ +- __atg19_old = (*__atg19_memp); \ ++ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ + __atg19_old | __atg19_mask,\ +diff -durN glibc-2.13.orig/nptl/Makefile glibc-2.13/nptl/Makefile +--- glibc-2.13.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 ++++ glibc-2.13/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -265,9 +265,9 @@ + # Files which must not be linked with libpthread. + tests-nolibpthread = tst-unload + +-# This sets the stack resource limit to 1023kb, which is not a multiple +-# of the page size since every architecture's page size is > 1k. +-tst-oddstacklimit-ENV = ; ulimit -s 1023; ++# This sets the stack resource limit to 8193kb, which is not a multiple ++# of the page size since every architecture's page size is 4096 bytes. ++tst-oddstacklimit-ENV = ; ulimit -s 8193; + + distribute = eintr.c tst-cleanup4aux.c + +@@ -426,6 +426,35 @@ + CFLAGS-tst-cleanupx4.c += -fexceptions + CFLAGS-tst-oncex3.c += -fexceptions + CFLAGS-tst-oncex4.c += -fexceptions ++ ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed ++LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) ++ + CFLAGS-tst-align.c += $(stack-align-test-flags) + CFLAGS-tst-align3.c += $(stack-align-test-flags) + CFLAGS-tst-initializers1.c = -W -Wall -Werror +diff -durN glibc-2.13.orig/nptl/pthread_barrier_wait.c glibc-2.13/nptl/pthread_barrier_wait.c +--- glibc-2.13.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 ++++ glibc-2.13/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 +@@ -64,7 +64,7 @@ + do + lll_futex_wait (&ibarrier->curr_event, event, + ibarrier->private ^ FUTEX_PRIVATE_FLAG); +- while (event == ibarrier->curr_event); ++ while (event == *(volatile unsigned int *)&ibarrier->curr_event); + } + + /* Make sure the init_count is stored locally or in a register. */ +diff -durN glibc-2.13.orig/nptl/sysdeps/pthread/Makefile glibc-2.13/nptl/sysdeps/pthread/Makefile +--- glibc-2.13.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 ++++ glibc-2.13/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -33,7 +33,9 @@ + + ifeq ($(have-forced-unwind),yes) + tests += tst-mqueue8x ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed + CFLAGS-tst-mqueue8x.c += -fexceptions ++LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) + endif + endif + +diff -durN glibc-2.13.orig/stdio-common/Makefile glibc-2.13/stdio-common/Makefile +--- glibc-2.13.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 ++++ glibc-2.13/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -82,7 +82,7 @@ + $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' + endif + +-CFLAGS-vfprintf.c = -Wno-uninitialized ++CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch + CFLAGS-vfwprintf.c = -Wno-uninitialized + CFLAGS-tst-printf.c = -Wno-format + CFLAGS-tstdiomisc.c = -Wno-format +diff -durN glibc-2.13.orig/sunrpc/clnt_udp.c glibc-2.13/sunrpc/clnt_udp.c +--- glibc-2.13.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 ++++ glibc-2.13/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 +@@ -456,7 +456,7 @@ + while (inlen < 0 && errno == EINTR); + if (inlen < 0) + { +- if (errno == EWOULDBLOCK) ++ if (errno == EWOULDBLOCK || errno == EAGAIN) + continue; + cu->cu_error.re_errno = errno; + return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/packages/glibc/2.13/340-dl_execstack-PaX-support.patch b/packages/glibc/2.13/340-dl_execstack-PaX-support.patch new file mode 100644 index 0000000..2402af0 --- /dev/null +++ b/packages/glibc/2.13/340-dl_execstack-PaX-support.patch @@ -0,0 +1,66 @@ + With latest versions of glibc, a lot of apps failed on a PaX enabled + system with: + cannot enable executable stack as shared object requires: Permission denied + + This is due to PaX 'exec-protecting' the stack, and ld.so then trying + to make the stack executable due to some libraries not containing the + PT_GNU_STACK section. Bug #32960. (12 Nov 2003). + + Patch also NPTL. Bug #116086. (20 Dec 2005). + +diff -durN glibc-2.13.orig/nptl/allocatestack.c glibc-2.13/nptl/allocatestack.c +--- glibc-2.13.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 ++++ glibc-2.13/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -329,7 +329,8 @@ + # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" + #endif + if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) +- return errno; ++ if (errno != EACCES) /* PAX is enabled */ ++ return errno; + + return 0; + } +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -63,7 +63,10 @@ + else + # endif + { +- result = errno; ++ if (errno == EACCES) /* PAX is enabled */ ++ result = 0; ++ else ++ result = errno; + goto out; + } + } +@@ -89,7 +92,12 @@ + page -= size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; +@@ -115,7 +123,12 @@ + page += size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; diff --git a/packages/glibc/2.13/350-pre20040117-pt_pax.patch b/packages/glibc/2.13/350-pre20040117-pt_pax.patch new file mode 100644 index 0000000..f8f6b83 --- /dev/null +++ b/packages/glibc/2.13/350-pre20040117-pt_pax.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.13.orig/elf/elf.h glibc-2.13/elf/elf.h +--- glibc-2.13.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 ++++ glibc-2.13/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 +@@ -580,6 +580,7 @@ + #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ + #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ + #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ ++#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ + #define PT_LOSUNW 0x6ffffffa + #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ + #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ +@@ -593,6 +594,18 @@ + #define PF_X (1 << 0) /* Segment is executable */ + #define PF_W (1 << 1) /* Segment is writable */ + #define PF_R (1 << 2) /* Segment is readable */ ++#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ ++#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ ++#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ ++#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ ++#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ ++#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ ++#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ ++#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ ++#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ ++#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ ++#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ ++#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ + #define PF_MASKOS 0x0ff00000 /* OS-specific */ + #define PF_MASKPROC 0xf0000000 /* Processor-specific */ + diff --git a/packages/glibc/2.13/360-tests-sandbox-libdl-paths.patch b/packages/glibc/2.13/360-tests-sandbox-libdl-paths.patch new file mode 100644 index 0000000..9f78c52 --- /dev/null +++ b/packages/glibc/2.13/360-tests-sandbox-libdl-paths.patch @@ -0,0 +1,193 @@ +when glibc runs its tests, it does so by invoking the local library loader. +in Gentoo, we build/run inside of our "sandbox" which itself is linked against +libdl (so that it can load libraries and pull out symbols). the trouble +is that when you upgrade from an older glibc to the new one, often times +internal symbols change name or abi. this is normally OK as you cannot use +libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so +we always say "keep all of the glibc libraries from the same build". but +when glibc runs its tests, it uses dynamic paths to point to its new local +copies of libraries. if the test doesnt use libdl, then glibc doesnt add +its path, and when sandbox triggers the loading of libdl, glibc does so +from the host system system. this gets us into the case of all libraries +are from the locally compiled version of glibc except for libdl.so. + +Fix by Wormo + +http://bugs.gentoo.org/56898 + +diff -durN glibc-2.13.orig/grp/tst_fgetgrent.sh glibc-2.13/grp/tst_fgetgrent.sh +--- glibc-2.13.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 ++++ glibc-2.13/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,7 +24,8 @@ + rtld_installed_name=$1; shift + + testout=${common_objpfx}/grp/tst_fgetgrent.out +-library_path=${common_objpfx} ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn + + result=0 + +diff -durN glibc-2.13.orig/iconvdata/run-iconv-test.sh glibc-2.13/iconvdata/run-iconv-test.sh +--- glibc-2.13.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 ++++ glibc-2.13/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -34,7 +34,7 @@ + export GCONV_PATH + + # We have to have some directories in the library path. +-LIBPATH=$codir:$codir/iconvdata ++LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn + + # How the start the iconv(1) program. + ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ +diff -durN glibc-2.13.orig/iconvdata/tst-table.sh glibc-2.13/iconvdata/tst-table.sh +--- glibc-2.13.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 ++++ glibc-2.13/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -59,8 +59,11 @@ + irreversible=${charset}.irreversible + fi + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # iconv in one direction. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-table-from ${charset} \ + > ${objpfx}tst-${charset}.table + +diff -durN glibc-2.13.orig/intl/tst-codeset.sh glibc-2.13/intl/tst-codeset.sh +--- glibc-2.13.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 ++++ glibc-2.13/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -37,6 +37,9 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + ${common_objpfx}elf/ld.so --library-path $common_objpfx \ + ${objpfx}tst-codeset > ${objpfx}tst-codeset.out + +diff -durN glibc-2.13.orig/intl/tst-gettext.sh glibc-2.13/intl/tst-gettext.sh +--- glibc-2.13.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 ++++ glibc-2.13/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -51,9 +51,12 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. + MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.13.orig/intl/tst-gettext2.sh glibc-2.13/intl/tst-gettext2.sh +--- glibc-2.13.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 ++++ glibc-2.13/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -65,8 +65,11 @@ + LOCPATH=${objpfx}domaindir + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && + cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.13.orig/malloc/tst-mtrace.sh glibc-2.13/malloc/tst-mtrace.sh +--- glibc-2.13.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 ++++ glibc-2.13/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,9 +24,12 @@ + status=0 + trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ + LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${common_objpfx}malloc/tst-mtrace || status=1 + + if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then +diff -durN glibc-2.13.orig/nptl/tst-tls6.sh glibc-2.13/nptl/tst-tls6.sh +--- glibc-2.13.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 ++++ glibc-2.13/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -5,8 +5,8 @@ + rtld_installed_name=$1; shift + logfile=$common_objpfx/nptl/tst-tls6.out + +-# We have to find libc and nptl +-library_path=${common_objpfx}:${common_objpfx}nptl ++# We have to find libc and nptl (also libdl in case sandbox is in use) ++library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn + tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}/nptl/tst-tls5" + +diff -durN glibc-2.13.orig/posix/globtest.sh glibc-2.13/posix/globtest.sh +--- glibc-2.13.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 ++++ glibc-2.13/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -18,7 +18,7 @@ + esac + + # We have to find the libc and the NSS modules. +-library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod ++library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn + + # Since we use `sort' we must make sure to use the same locale everywhere. + LC_ALL=C +diff -durN glibc-2.13.orig/posix/tst-getconf.sh glibc-2.13/posix/tst-getconf.sh +--- glibc-2.13.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 ++++ glibc-2.13/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -10,7 +10,10 @@ + else + rtld_installed_name=$1; shift + runit() { +- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" ++ ++ # make sure libdl is also in path in case sandbox is in use ++ library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" + } + fi + +diff -durN glibc-2.13.orig/posix/wordexp-tst.sh glibc-2.13/posix/wordexp-tst.sh +--- glibc-2.13.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 ++++ glibc-2.13/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -19,8 +19,11 @@ + " + export IFS + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + failed=0 +-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ ++${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 + cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 + wordexp returned 0 diff --git a/packages/glibc/2.13/380-dont-build-timezone.patch b/packages/glibc/2.13/380-dont-build-timezone.patch new file mode 100644 index 0000000..11c358e --- /dev/null +++ b/packages/glibc/2.13/380-dont-build-timezone.patch @@ -0,0 +1,14 @@ +timezone data has been split into the package sys-libs/timezone-data + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 ++++ glibc-2.13/Makeconfig 2009-11-13 00:50:41.000000000 +0100 +@@ -944,7 +944,7 @@ + stdlib stdio-common libio malloc string wcsmbs time dirent \ + grp pwd posix io termios resource misc socket sysvipc gmon \ + gnulib iconv iconvdata wctype manual shadow gshadow po argp \ +- crypt nss localedata timezone rt conform debug \ ++ crypt nss localedata rt conform debug \ + $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) + + ifndef avoid-generated diff --git a/packages/glibc/2.13/400-alpha-xstat.patch b/packages/glibc/2.13/400-alpha-xstat.patch new file mode 100644 index 0000000..6e4ab8f --- /dev/null +++ b/packages/glibc/2.13/400-alpha-xstat.patch @@ -0,0 +1,15 @@ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 +@@ -386,6 +386,11 @@ + # define __ASSUME_GETDENTS32_D_TYPE 1 + #endif + ++/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ ++#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ ++# define __ASSUME_STAT64_SYSCALL 1 ++#endif ++ + /* Starting with version 2.5.3, the initial location returned by `brk' + after exec is always rounded up to the next page. */ + #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/packages/glibc/2.13/430-alpha-creat.patch b/packages/glibc/2.13/430-alpha-creat.patch new file mode 100644 index 0000000..da6ddda --- /dev/null +++ b/packages/glibc/2.13/430-alpha-creat.patch @@ -0,0 +1,14 @@ +alpha does not have a __NR_creat + +http://bugs.gentoo.org/227275 +http://sourceware.org/bugzilla/show_bug.cgi?id=6650 + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 +@@ -1 +1,5 @@ + /* Defined as alias for the syscall. */ ++#include ++#ifndef __NR_creat ++#include "../../../../../io/creat64.c" ++#endif diff --git a/packages/glibc/2.13/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc/2.13/490-alpha_alpha-add-fdatasync-support.patch new file mode 100644 index 0000000..372f34c --- /dev/null +++ b/packages/glibc/2.13/490-alpha_alpha-add-fdatasync-support.patch @@ -0,0 +1,126 @@ +2009-07-25 Aurelien Jarno + + * sysdeps/unix/sysv/linux/kernel-features.h: define + __ASSUME_FDATASYNC. + * sysdeps/unix/sysv/linux/fdatasync.c: New file. + * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with + -fexceptions. + * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. + + sysdeps/unix/sysv/linux/Makefile | 1 + sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ + sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ + sysdeps/unix/sysv/linux/syscalls.list | 1 + 4 files changed, 76 insertions(+), 1 deletion(-) + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.13/sysdeps/unix/sysv/linux/Makefile +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 +@@ -20,6 +20,7 @@ + setfsuid setfsgid makedev epoll_pwait signalfd \ + eventfd eventfd_read eventfd_write prlimit + ++CFLAGS-fdatasync.c = -fexceptions + CFLAGS-gethostid.c = -fexceptions + + sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 +@@ -0,0 +1,69 @@ ++/* fdatasync -- synchronize at least the data part of a file with ++ the underlying media. Linux version. ++ ++ Copyright (C) 2007 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC ++static int __have_no_fdatasync; ++#endif ++ ++static int ++do_fdatasync (int fd) ++{ ++#ifdef __ASSUME_FDATASYNC ++ return INLINE_SYSCALL (fdatasync, 1, fd); ++#elif defined __NR_fdatasync ++ if (!__builtin_expect (__have_no_fdatasync, 0)) ++ { ++ int result = INLINE_SYSCALL (fdatasync, 1, fd); ++ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) ++ return result; ++ ++ __have_no_fdatasync = 1; ++ } ++#endif ++ return INLINE_SYSCALL (fsync, 1, fd); ++} ++ ++int ++__fdatasync (int fd) ++{ ++ if (SINGLE_THREAD_P) ++ return do_fdatasync (fd); ++ ++ int oldtype = LIBC_CANCEL_ASYNC (); ++ ++ int result = do_fdatasync (fd); ++ ++ LIBC_CANCEL_RESET (oldtype); ++ ++ return result; ++} ++ ++weak_alias (__fdatasync, fdatasync) ++ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 +@@ -459,6 +459,12 @@ + # define __ASSUME_FUTEX_LOCK_PI 1 + #endif + ++/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it ++ was already present in 2.0 kernels on other architectures. */ ++#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) ++# define __ASSUME_FDATASYNC 1 ++#endif ++ + /* Support for utimensat syscall was added in 2.6.22, on SH + only after 2.6.22-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020616 \ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 +@@ -11,7 +11,6 @@ + epoll_create1 EXTRA epoll_create1 i:i epoll_create1 + epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl + epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait +-fdatasync - fdatasync Ci:i fdatasync + flock - flock i:ii __flock flock + fork - fork i: __libc_fork __fork fork + get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/packages/glibc/2.13/560-ppc-atomic.patch b/packages/glibc/2.13/560-ppc-atomic.patch new file mode 100644 index 0000000..ee1cb90 --- /dev/null +++ b/packages/glibc/2.13/560-ppc-atomic.patch @@ -0,0 +1,415 @@ +sniped from suse + +Index: sysdeps/powerpc/bits/atomic.h +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v +retrieving revision 1.17 +diff -u -a -p -r1.17 atomic.h + +diff -durN glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h glibc-2.13/sysdeps/powerpc/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -85,14 +85,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -102,14 +102,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -118,12 +118,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -132,11 +132,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -144,12 +144,12 @@ + #define __arch_atomic_exchange_and_add_32(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stwcx. %1,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -157,12 +157,12 @@ + #define __arch_atomic_increment_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -170,27 +170,27 @@ + #define __arch_atomic_decrement_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_32(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ + " cmpwi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stwcx. %1,0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -60,14 +60,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp, __tmp2; \ + __asm __volatile (" clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -61,14 +61,14 @@ + unsigned int __tmp, __tmp2; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ + " clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -82,14 +82,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -98,14 +98,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -115,14 +115,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -132,14 +132,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -148,12 +148,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -162,11 +162,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -174,12 +174,12 @@ + #define __arch_atomic_exchange_and_add_64(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stdcx. %1,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -187,12 +187,12 @@ + #define __arch_atomic_increment_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -200,27 +200,27 @@ + #define __arch_atomic_decrement_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_64(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ + " cmpdi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stdcx. %1,0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) diff --git a/packages/glibc/2.13/630-mips_shn_undef-hack.patch b/packages/glibc/2.13/630-mips_shn_undef-hack.patch new file mode 100644 index 0000000..791d76c --- /dev/null +++ b/packages/glibc/2.13/630-mips_shn_undef-hack.patch @@ -0,0 +1,16 @@ +diff -durN glibc-2.13.orig/elf/dl-lookup.c glibc-2.13/elf/dl-lookup.c +--- glibc-2.13.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 ++++ glibc-2.13/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 +@@ -301,6 +301,12 @@ + /* FALLTHROUGH */ + case STB_GLOBAL: + success: ++#ifdef __mips__ ++ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF ++ symbols, we skip them. */ ++ if (sym->st_shndx == SHN_UNDEF) ++ break; ++#endif + /* Global definition. Just what we need. */ + result->s = sym; + result->m = (struct link_map *) map; diff --git a/packages/glibc/2.13/640-alpha-atfcts.patch b/packages/glibc/2.13/640-alpha-atfcts.patch new file mode 100644 index 0000000..7a8a94a --- /dev/null +++ b/packages/glibc/2.13/640-alpha-atfcts.patch @@ -0,0 +1,12 @@ +--- glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 +@@ -437,7 +437,8 @@ + the code. On PPC they were introduced in 2.6.17-rc1, + on SH in 2.6.19-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020611 \ +- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) ++ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ ++ && (!defined __alpha__) + # define __ASSUME_ATFCTS 1 + #endif + diff --git a/packages/glibc/2.13/650-syslog.patch b/packages/glibc/2.13/650-syslog.patch new file mode 100644 index 0000000..c20cafc --- /dev/null +++ b/packages/glibc/2.13/650-syslog.patch @@ -0,0 +1,12 @@ +diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c +--- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 ++++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 +@@ -152,7 +152,7 @@ + #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID + /* Check for invalid bits. */ + if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { +- syslog(INTERNALLOG, ++ __syslog(INTERNALLOG, + "syslog: unknown facility/priority: %x", pri); + pri &= LOG_PRIMASK|LOG_FACMASK; + } diff --git a/packages/glibc/2.13/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc/2.13/660-debug-readlink_chk-readklinkat_chk.patch new file mode 100644 index 0000000..a5a7052 --- /dev/null +++ b/packages/glibc/2.13/660-debug-readlink_chk-readklinkat_chk.patch @@ -0,0 +1,24 @@ +diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c +--- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 ++++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 +@@ -25,7 +25,7 @@ + + + ssize_t +-__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) ++__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) + { + if (len > buflen) + __chk_fail (); +diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c +--- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 ++++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 +@@ -21,7 +21,7 @@ + + + ssize_t +-__readlinkat_chk (int fd, const char *path, void *buf, size_t len, ++__readlinkat_chk (int fd, const char *path, char *buf, size_t len, + size_t buflen) + { + if (len > buflen) diff --git a/packages/glibc/2.14.1/100-respect-env-CPPFLAGS.patch b/packages/glibc/2.14.1/100-respect-env-CPPFLAGS.patch new file mode 100644 index 0000000..3798cb2 --- /dev/null +++ b/packages/glibc/2.14.1/100-respect-env-CPPFLAGS.patch @@ -0,0 +1,14 @@ +Respect environment CPPFLAGS when we run ./configure so we can inject +random -D things without having to set CFLAGS/ASFLAGS + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 ++++ glibc-2.13/Makeconfig 2009-11-13 00:49:41.000000000 +0100 +@@ -697,6 +697,7 @@ + $(foreach lib,$(libof-$(basename $(@F))) \ + $(libof-$(field.le_next)) + ++#define LIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = LIST_FIRST((head)); \ ++ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + /* + * List access methods. + */ +@@ -197,6 +202,16 @@ + #define SLIST_FOREACH(var, head, field) \ + for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) + ++#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = SLIST_FIRST((head)); \ ++ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ ++#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ ++ for ((varp) = &SLIST_FIRST((head)); \ ++ ((var) = *(varp)) != NULL; \ ++ (varp) = &SLIST_NEXT((var), field)) ++ + /* + * Singly-linked List access methods. + */ +@@ -242,6 +257,12 @@ + (head)->stqh_last = &(elm)->field.stqe_next; \ + } while (/*CONSTCOND*/0) + ++#define STAILQ_LAST(head, type, field) \ ++ (STAILQ_EMPTY((head)) ? \ ++ NULL : \ ++ ((struct type *)(void *) \ ++ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) ++ + #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ + if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ + (head)->stqh_last = &(elm)->field.stqe_next; \ +@@ -271,6 +292,11 @@ + (var); \ + (var) = ((var)->field.stqe_next)) + ++#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = STAILQ_FIRST((head)); \ ++ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define STAILQ_CONCAT(head1, head2) do { \ + if (!STAILQ_EMPTY((head2))) { \ + *(head1)->stqh_last = (head2)->stqh_first; \ +@@ -437,11 +463,21 @@ + (var); \ + (var) = ((var)->field.tqe_next)) + ++#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = TAILQ_FIRST((head)); \ ++ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ + for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ + (var); \ + (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) + ++#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ ++ for ((var) = TAILQ_LAST((head), headname); \ ++ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_CONCAT(head1, head2, field) do { \ + if (!TAILQ_EMPTY(head2)) { \ + *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/packages/glibc/2.14.1/160-manual-no-perl.patch b/packages/glibc/2.14.1/160-manual-no-perl.patch new file mode 100644 index 0000000..5e2b807 --- /dev/null +++ b/packages/glibc/2.14.1/160-manual-no-perl.patch @@ -0,0 +1,24 @@ +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.13.orig/manual/Makefile glibc-2.13/manual/Makefile +--- glibc-2.13.orig/manual/Makefile 2006-01-08 07:43:47.000000000 +0100 ++++ glibc-2.13/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/packages/glibc/2.14.1/170-localedef-fix-trampoline.patch b/packages/glibc/2.14.1/170-localedef-fix-trampoline.patch new file mode 100644 index 0000000..3cc6559 --- /dev/null +++ b/packages/glibc/2.14.1/170-localedef-fix-trampoline.patch @@ -0,0 +1,53 @@ +# DP: Description: Fix localedef segfault when run under exec-shield, +# PaX or similar. (#231438, #198099) +# DP: Dpatch Author: James Troup +# DP: Patch Author: (probably) Jakub Jelinek +# DP: Upstream status: Unknown +# DP: Status Details: Unknown +# DP: Date: 2004-03-16 +diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h +--- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 ++++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 +@@ -203,6 +203,42 @@ + } + } + } ++ ++/* GCC ATM seems to do a poor job with pointers to nested functions passed ++ to inlined functions. Help it a little bit with this hack. */ ++#define wchead_table_iterate(tp, fn) \ ++do \ ++ { \ ++ struct wchead_table *t = (tp); \ ++ uint32_t index1; \ ++ for (index1 = 0; index1 < t->level1_size; index1++) \ ++ { \ ++ uint32_t lookup1 = t->level1[index1]; \ ++ if (lookup1 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup1_shifted = lookup1 << t->q; \ ++ uint32_t index2; \ ++ for (index2 = 0; index2 < (1 << t->q); index2++) \ ++ { \ ++ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ ++ if (lookup2 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup2_shifted = lookup2 << t->p; \ ++ uint32_t index3; \ ++ for (index3 = 0; index3 < (1 << t->p); index3++) \ ++ { \ ++ struct element_t *lookup3 \ ++ = t->level3[index3 + lookup2_shifted]; \ ++ if (lookup3 != NULL) \ ++ fn ((((index1 << t->q) + index2) << t->p) + index3, \ ++ lookup3); \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } while (0) ++ + #endif + + #ifndef NO_FINALIZE diff --git a/packages/glibc/2.14.1/180-resolv-dynamic.patch b/packages/glibc/2.14.1/180-resolv-dynamic.patch new file mode 100644 index 0000000..e916bce --- /dev/null +++ b/packages/glibc/2.14.1/180-resolv-dynamic.patch @@ -0,0 +1,39 @@ +ripped from SuSE + +if /etc/resolv.conf is updated, then make sure applications +already running get the updated information. + +http://bugs.gentoo.org/177416 + +diff -durN glibc-2.13.orig/resolv/res_libc.c glibc-2.13/resolv/res_libc.c +--- glibc-2.13.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 ++++ glibc-2.13/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + + /* The following bit is copied from res_data.c (where it is #ifdef'ed +@@ -95,6 +96,20 @@ + __res_maybe_init (res_state resp, int preinit) + { + if (resp->options & RES_INIT) { ++ static time_t last_mtime, last_check; ++ time_t now; ++ struct stat statbuf; ++ ++ time (&now); ++ if (now != last_check) { ++ last_check = now; ++ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { ++ last_mtime = statbuf.st_mtime; ++ atomicinclock (lock); ++ atomicinc (__res_initstamp); ++ atomicincunlock (lock); ++ } ++ } + if (__res_initstamp != resp->_u._ext.initstamp) { + if (resp->nscount > 0) + __res_iclose (resp, true); diff --git a/packages/glibc/2.14.1/190-localedef-mmap.patch b/packages/glibc/2.14.1/190-localedef-mmap.patch new file mode 100644 index 0000000..f3914cd --- /dev/null +++ b/packages/glibc/2.14.1/190-localedef-mmap.patch @@ -0,0 +1,39 @@ +sniped from Debian +http://bugs.gentoo.org/289615 + +2009-10-27 Aurelien Jarno + + * locale/programs/locarchive.c: use MMAP_SHARED to reserve memory + used later with MMAP_FIXED | MMAP_SHARED to cope with different + alignment restrictions. + +diff -durN glibc-2.13.orig/locale/programs/locarchive.c glibc-2.13/locale/programs/locarchive.c +--- glibc-2.13.orig/locale/programs/locarchive.c 2009-04-27 16:07:47.000000000 +0200 ++++ glibc-2.13/locale/programs/locarchive.c 2009-11-13 00:50:01.000000000 +0100 +@@ -134,7 +134,7 @@ + size_t reserved = RESERVE_MMAP_SIZE; + int xflags = 0; + if (total < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else +@@ -396,7 +396,7 @@ + size_t reserved = RESERVE_MMAP_SIZE; + int xflags = 0; + if (total < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else +@@ -614,7 +614,7 @@ + int xflags = 0; + void *p; + if (st.st_size < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else diff --git a/packages/glibc/2.14.1/200-fadvise64_64.patch b/packages/glibc/2.14.1/200-fadvise64_64.patch new file mode 100644 index 0000000..71bca38 --- /dev/null +++ b/packages/glibc/2.14.1/200-fadvise64_64.patch @@ -0,0 +1,28 @@ +ripped from Debian + + sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 +@@ -35,6 +35,19 @@ + return INTERNAL_SYSCALL_ERRNO (ret, err); + return 0; + #else ++# ifdef __NR_fadvise64_64 ++ INTERNAL_SYSCALL_DECL (err); ++ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, ++ __LONG_LONG_PAIR ((long) (offset >> 31), ++ (long) offset), ++ __LONG_LONG_PAIR ((long) (len >> 31), ++ (long) len), ++ advise); ++ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) ++ return INTERNAL_SYSCALL_ERRNO (ret, err); ++ return 0; ++# else + return ENOSYS; ++# endif + #endif + } diff --git a/packages/glibc/2.14.1/220-section-comments.patch b/packages/glibc/2.14.1/220-section-comments.patch new file mode 100644 index 0000000..d717829 --- /dev/null +++ b/packages/glibc/2.14.1/220-section-comments.patch @@ -0,0 +1,24 @@ +http://sources.redhat.com/ml/binutils/2004-04/msg00665.html + +fixes building on some architectures (like m68k/arm/cris/etc...) because +it does the right thing + +diff -durN glibc-2.13.orig/include/libc-symbols.h glibc-2.13/include/libc-symbols.h +--- glibc-2.13.orig/include/libc-symbols.h 2009-03-14 00:51:46.000000000 +0100 ++++ glibc-2.13/include/libc-symbols.h 2009-11-13 00:50:07.000000000 +0100 +@@ -239,12 +239,12 @@ + # define __make_section_unallocated(section_string) + # endif + +-/* Tacking on "\n\t#" to the section name makes gcc put it's bogus ++/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus + section attributes on what looks like a comment to the assembler. */ + # ifdef HAVE_SECTION_QUOTES +-# define __sec_comment "\"\n\t#\"" ++# define __sec_comment "\"\n#APP\n\t#\"" + # else +-# define __sec_comment "\n\t#" ++# define __sec_comment "\n#APP\n\t#" + # endif + # define link_warning(symbol, msg) \ + __make_section_unallocated (".gnu.warning." #symbol) \ diff --git a/packages/glibc/2.14.1/230-no-inline-gmon.patch b/packages/glibc/2.14.1/230-no-inline-gmon.patch new file mode 100644 index 0000000..fa33c2b --- /dev/null +++ b/packages/glibc/2.14.1/230-no-inline-gmon.patch @@ -0,0 +1,36 @@ +http://bugs.gentoo.org/196245 +http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html + +Attached is a patch to add __attribute__ ((noinline)) to +call_gmon_start. + +Without this patch, the sec script that processed initfini.s removes a +part of inlined call_gmon_start, causing undefined label errors. + +This patch solves the problem by forcing gcc not to inline +call_gmon_start with __attribute__ ((noinline)). + +Tested by building for arm-none-lixux-gnueabi. OK to apply? + +Kazu Hirata + +2006-05-07 Kazu Hirata <kazu@codesourcery.com> + + * sysdeps/generic/initfini.c (call_gmon_start): Add + __attribute__ ((noinline)). + +Index: sysdeps/generic/initfini.c +=================================================================== + +diff -durN glibc-2.13.orig/sysdeps/generic/initfini.c glibc-2.13/sysdeps/generic/initfini.c +--- glibc-2.13.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200 ++++ glibc-2.13/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100 +@@ -70,7 +70,7 @@ + /* The beginning of _init: */ + asm ("\n/*@_init_PROLOG_BEGINS*/"); + +-static void ++static void __attribute__ ((noinline)) + call_gmon_start(void) + { + extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ diff --git a/packages/glibc/2.14.1/260-assume-pipe2.patch b/packages/glibc/2.14.1/260-assume-pipe2.patch new file mode 100644 index 0000000..42e8f4e --- /dev/null +++ b/packages/glibc/2.14.1/260-assume-pipe2.patch @@ -0,0 +1,40 @@ +http://bugs.gentoo.org/250342 +http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 + +we cant assume sock_cloexec and pipe2 are bound together as the former defines +are found in glibc only while the latter are a combo of kernel headers and +glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub +inside of glibc, we hit a problem. for example: + +#include +#include +main() +{ + getgrnam("portage"); + if (!popen("ls", "r")) + perror("popen()"); +} + +getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both +__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against +older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS +stub for it. so popen() will always fail as glibc assumes pipe2() works. + +diff -durN glibc-2.13.orig/socket/have_sock_cloexec.c glibc-2.13/socket/have_sock_cloexec.c +--- glibc-2.13.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 ++++ glibc-2.13/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 +@@ -16,9 +16,14 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#include + #include + #include + + #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC + int __have_sock_cloexec; + #endif ++ ++#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 ++int __have_pipe2; ++#endif diff --git a/packages/glibc/2.14.1/270-china.patch b/packages/glibc/2.14.1/270-china.patch new file mode 100644 index 0000000..41d7759 --- /dev/null +++ b/packages/glibc/2.14.1/270-china.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.13.orig/localedata/locales/zh_TW glibc-2.13/localedata/locales/zh_TW +--- glibc-2.13.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 ++++ glibc-2.13/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 +@@ -1,7 +1,7 @@ + comment_char % + escape_char / + % +-% Chinese language locale for Taiwan R.O.C. ++% Chinese language locale for Taiwan + % charmap: BIG5-CP950 + % + % Original Author: +@@ -17,7 +17,7 @@ + % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf + + LC_IDENTIFICATION +-title "Chinese locale for Taiwan R.O.C." ++title "Chinese locale for Taiwan" + source "" + address "" + contact "" +@@ -25,7 +25,7 @@ + tel "" + fax "" + language "Chinese" +-territory "Taiwan R.O.C." ++territory "Taiwan" + revision "0.2" + date "2000-08-02" + % diff --git a/packages/glibc/2.14.1/280-new-valencian-locale.patch b/packages/glibc/2.14.1/280-new-valencian-locale.patch new file mode 100644 index 0000000..4cdd108 --- /dev/null +++ b/packages/glibc/2.14.1/280-new-valencian-locale.patch @@ -0,0 +1,115 @@ +http://bugs.gentoo.org/show_bug.cgi?id=131815 +http://sourceware.org/bugzilla/show_bug.cgi?id=2522 + +diff -durN glibc-2.13.orig/localedata/SUPPORTED glibc-2.13/localedata/SUPPORTED +--- glibc-2.13.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 ++++ glibc-2.13/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 +@@ -72,6 +72,8 @@ + ca_ES.UTF-8/UTF-8 \ + ca_ES/ISO-8859-1 \ + ca_ES@euro/ISO-8859-15 \ ++ca_ES.UTF-8@valencia/UTF-8 \ ++ca_ES@valencia/ISO-8859-15 \ + ca_FR.UTF-8/UTF-8 \ + ca_FR/ISO-8859-15 \ + ca_IT.UTF-8/UTF-8 \ +diff -durN glibc-2.13.orig/localedata/locales/ca_ES@valencia glibc-2.13/localedata/locales/ca_ES@valencia +--- glibc-2.13.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.13/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 +@@ -0,0 +1,96 @@ ++comment_char % ++escape_char / ++% ++% Valencian (southern Catalan) locale for Spain with Euro ++% ++% Note that this locale is almost the same as ca_ES@euro. The point of having ++% a separate locale is only for PO translations, which have a lot of social ++% support and are very appreciated by the Valencian-speaking community. ++% ++% Contact: Jordi Mallach ++% Email: jordi@gnu.org ++% Tel: ++% Fax: ++% Language: ca ++% Territory: ES ++% Option: euro ++% Revision: 1.0 ++% Date: 2006-04-06 ++% Application: general ++% Users: general ++% Repertoiremap: mnemonic,ds ++% Charset: ISO-8859-15 ++% Distribution and use is free, also ++% for commercial purposes. ++ ++LC_IDENTIFICATION ++title "Valencian (southern Catalan) locale for Spain with Euro" ++source "" ++address "" ++contact "Jordi Mallach" ++email "jordi@gnu.org" ++tel "" ++fax "" ++language "Catalan" ++territory "Spain" ++revision "1.0" ++date "2006-04-06" ++% ++category "ca_ES@valencia:2006";LC_IDENTIFICATION ++category "ca_ES@valencia:2006";LC_CTYPE ++category "ca_ES@valencia:2006";LC_COLLATE ++category "ca_ES@valencia:2006";LC_MONETARY ++category "ca_ES@valencia:2006";LC_NUMERIC ++category "ca_ES@valencia:2006";LC_TIME ++category "ca_ES@valencia:2006";LC_MESSAGES ++category "ca_ES@valencia:2006";LC_PAPER ++category "ca_ES@valencia:2006";LC_NAME ++category "ca_ES@valencia:2006";LC_ADDRESS ++category "ca_ES@valencia:2006";LC_TELEPHONE ++category "ca_ES@valencia:2006";LC_MEASUREMENT ++ ++END LC_IDENTIFICATION ++ ++LC_CTYPE ++copy "i18n" ++END LC_CTYPE ++ ++LC_COLLATE ++copy "ca_ES" ++END LC_COLLATE ++ ++LC_MONETARY ++copy "ca_ES" ++END LC_MONETARY ++ ++LC_NUMERIC ++copy "ca_ES" ++END LC_NUMERIC ++ ++LC_TIME ++copy "ca_ES" ++END LC_TIME ++ ++LC_MESSAGES ++copy "ca_ES" ++END LC_MESSAGES ++ ++LC_PAPER ++copy "ca_ES" ++END LC_PAPER ++ ++LC_NAME ++copy "ca_ES" ++END LC_NAME ++ ++LC_ADDRESS ++copy "ca_ES" ++END LC_ADDRESS ++ ++LC_TELEPHONE ++copy "ca_ES" ++END LC_TELEPHONE ++ ++LC_MEASUREMENT ++copy "ca_ES" ++END LC_MEASUREMENT diff --git a/packages/glibc/2.14.1/300-nscd-one-fork.patch b/packages/glibc/2.14.1/300-nscd-one-fork.patch new file mode 100644 index 0000000..adc9b3f --- /dev/null +++ b/packages/glibc/2.14.1/300-nscd-one-fork.patch @@ -0,0 +1,40 @@ +only fork one to assist in stop-start-daemon assumptions about daemon behavior + +http://bugs.gentoo.org/190785 + +diff -durN glibc-2.13.orig/nscd/nscd.c glibc-2.13/nscd/nscd.c +--- glibc-2.13.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 ++++ glibc-2.13/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 +@@ -182,6 +182,9 @@ + if (pid != 0) + exit (0); + ++ if (write_pid (_PATH_NSCDPID) < 0) ++ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); ++ + int nullfd = open (_PATH_DEVNULL, O_RDWR); + if (nullfd != -1) + { +@@ -231,12 +234,6 @@ + for (i = min_close_fd; i < getdtablesize (); i++) + close (i); + +- pid = fork (); +- if (pid == -1) +- error (EXIT_FAILURE, errno, _("cannot fork")); +- if (pid != 0) +- exit (0); +- + setsid (); + + if (chdir ("/") != 0) +@@ -245,9 +242,6 @@ + + openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); + +- if (write_pid (_PATH_NSCDPID) < 0) +- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); +- + if (!init_logfile ()) + dbg_log (_("Could not create log file")); + diff --git a/packages/glibc/2.14.1/310-hppa-nptl-carlos.patch b/packages/glibc/2.14.1/310-hppa-nptl-carlos.patch new file mode 100644 index 0000000..4c028b2 --- /dev/null +++ b/packages/glibc/2.14.1/310-hppa-nptl-carlos.patch @@ -0,0 +1,246 @@ + + +diff -durN glibc-2.13.orig/elf/rtld.c glibc-2.13/elf/rtld.c +--- glibc-2.13.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 ++++ glibc-2.13/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 +@@ -392,14 +392,14 @@ + know it is available. We do not have to clear the memory if we + do not have to use the temporary bootstrap_map. Global variables + are initialized to zero by default. */ +-#ifndef DONT_USE_BOOTSTRAP_MAP ++#if !defined DONT_USE_BOOTSTRAP_MAP + # ifdef HAVE_BUILTIN_MEMSET + __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); + # else +- for (size_t cnt = 0; +- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); +- ++cnt) +- bootstrap_map.l_info[cnt] = 0; ++ /* Clear the whole bootstrap_map structure */ ++ for (char *cnt = (char *)&(bootstrap_map); ++ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); ++ *cnt++ = '\0'); + # endif + # if USE___THREAD + bootstrap_map.l_tls_modid = 0; +diff -durN glibc-2.13.orig/include/atomic.h glibc-2.13/include/atomic.h +--- glibc-2.13.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 ++++ glibc-2.13/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 +@@ -185,7 +185,7 @@ + __typeof (*(mem)) __atg5_value = (newvalue); \ + \ + do \ +- __atg5_oldval = *__atg5_memp; \ ++ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ + __atg5_oldval), 0)); \ +@@ -206,7 +206,7 @@ + __typeof (*(mem)) __atg6_value = (value); \ + \ + do \ +- __atg6_oldval = *__atg6_memp; \ ++ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ + __atg6_oldval \ +@@ -224,7 +224,7 @@ + __typeof (*(mem)) __atg7_value = (value); \ + \ + do \ +- __atg7_oldv = *__atg7_memp; \ ++ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ + __atg7_oldv \ +@@ -242,7 +242,7 @@ + __typeof (mem) __atg8_memp = (mem); \ + __typeof (*(mem)) __atg8_value = (value); \ + do { \ +- __atg8_oldval = *__atg8_memp; \ ++ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ + if (__atg8_oldval >= __atg8_value) \ + break; \ + } while (__builtin_expect \ +@@ -259,7 +259,7 @@ + __typeof (mem) __atg9_memp = (mem); \ + __typeof (*(mem)) __atg9_value = (value); \ + do { \ +- __atg9_oldv = *__atg9_memp; \ ++ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ + if (__atg9_oldv >= __atg9_value) \ + break; \ + } while (__builtin_expect \ +@@ -277,7 +277,7 @@ + __typeof (mem) __atg10_memp = (mem); \ + __typeof (*(mem)) __atg10_value = (value); \ + do { \ +- __atg10_oldval = *__atg10_memp; \ ++ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ + if (__atg10_oldval <= __atg10_value) \ + break; \ + } while (__builtin_expect \ +@@ -361,7 +361,7 @@ + \ + do \ + { \ +- __atg11_oldval = *__atg11_memp; \ ++ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ + if (__builtin_expect (__atg11_oldval <= 0, 0)) \ + break; \ + } \ +@@ -400,7 +400,7 @@ + __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ + \ + do \ +- __atg14_old = (*__atg14_memp); \ ++ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ + __atg14_old | __atg14_mask,\ +@@ -418,7 +418,7 @@ + __typeof (*(mem)) __atg15_mask = (mask); \ + \ + do \ +- __atg15_old = (*__atg15_memp); \ ++ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ + __atg15_old & __atg15_mask, \ +@@ -450,7 +450,7 @@ + __typeof (*(mem)) __atg16_mask = (mask); \ + \ + do \ +- __atg16_old = (*__atg16_memp); \ ++ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ + __atg16_old & __atg16_mask,\ +@@ -468,7 +468,7 @@ + __typeof (*(mem)) __atg17_mask = (mask); \ + \ + do \ +- __atg17_old = (*__atg17_memp); \ ++ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ + __atg17_old | __atg17_mask, \ +@@ -484,7 +484,7 @@ + __typeof (*(mem)) __atg18_mask = (mask); \ + \ + do \ +- __atg18_old = (*__atg18_memp); \ ++ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ + __atg18_old | __atg18_mask,\ +@@ -500,7 +500,7 @@ + __typeof (*(mem)) __atg19_mask = (mask); \ + \ + do \ +- __atg19_old = (*__atg19_memp); \ ++ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ + __atg19_old | __atg19_mask,\ +diff -durN glibc-2.13.orig/nptl/Makefile glibc-2.13/nptl/Makefile +--- glibc-2.13.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 ++++ glibc-2.13/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -265,9 +265,9 @@ + # Files which must not be linked with libpthread. + tests-nolibpthread = tst-unload + +-# This sets the stack resource limit to 1023kb, which is not a multiple +-# of the page size since every architecture's page size is > 1k. +-tst-oddstacklimit-ENV = ; ulimit -s 1023; ++# This sets the stack resource limit to 8193kb, which is not a multiple ++# of the page size since every architecture's page size is 4096 bytes. ++tst-oddstacklimit-ENV = ; ulimit -s 8193; + + distribute = eintr.c tst-cleanup4aux.c + +@@ -426,6 +426,35 @@ + CFLAGS-tst-cleanupx4.c += -fexceptions + CFLAGS-tst-oncex3.c += -fexceptions + CFLAGS-tst-oncex4.c += -fexceptions ++ ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed ++LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) ++ + CFLAGS-tst-align.c += $(stack-align-test-flags) + CFLAGS-tst-align3.c += $(stack-align-test-flags) + CFLAGS-tst-initializers1.c = -W -Wall -Werror +diff -durN glibc-2.13.orig/nptl/pthread_barrier_wait.c glibc-2.13/nptl/pthread_barrier_wait.c +--- glibc-2.13.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 ++++ glibc-2.13/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 +@@ -64,7 +64,7 @@ + do + lll_futex_wait (&ibarrier->curr_event, event, + ibarrier->private ^ FUTEX_PRIVATE_FLAG); +- while (event == ibarrier->curr_event); ++ while (event == *(volatile unsigned int *)&ibarrier->curr_event); + } + + /* Make sure the init_count is stored locally or in a register. */ +diff -durN glibc-2.13.orig/nptl/sysdeps/pthread/Makefile glibc-2.13/nptl/sysdeps/pthread/Makefile +--- glibc-2.13.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 ++++ glibc-2.13/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -33,7 +33,9 @@ + + ifeq ($(have-forced-unwind),yes) + tests += tst-mqueue8x ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed + CFLAGS-tst-mqueue8x.c += -fexceptions ++LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) + endif + endif + +diff -durN glibc-2.13.orig/stdio-common/Makefile glibc-2.13/stdio-common/Makefile +--- glibc-2.13.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 ++++ glibc-2.13/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -82,7 +82,7 @@ + $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' + endif + +-CFLAGS-vfprintf.c = -Wno-uninitialized ++CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch + CFLAGS-vfwprintf.c = -Wno-uninitialized + CFLAGS-tst-printf.c = -Wno-format + CFLAGS-tstdiomisc.c = -Wno-format +diff -durN glibc-2.13.orig/sunrpc/clnt_udp.c glibc-2.13/sunrpc/clnt_udp.c +--- glibc-2.13.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 ++++ glibc-2.13/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 +@@ -456,7 +456,7 @@ + while (inlen < 0 && errno == EINTR); + if (inlen < 0) + { +- if (errno == EWOULDBLOCK) ++ if (errno == EWOULDBLOCK || errno == EAGAIN) + continue; + cu->cu_error.re_errno = errno; + return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/packages/glibc/2.14.1/340-dl_execstack-PaX-support.patch b/packages/glibc/2.14.1/340-dl_execstack-PaX-support.patch new file mode 100644 index 0000000..2402af0 --- /dev/null +++ b/packages/glibc/2.14.1/340-dl_execstack-PaX-support.patch @@ -0,0 +1,66 @@ + With latest versions of glibc, a lot of apps failed on a PaX enabled + system with: + cannot enable executable stack as shared object requires: Permission denied + + This is due to PaX 'exec-protecting' the stack, and ld.so then trying + to make the stack executable due to some libraries not containing the + PT_GNU_STACK section. Bug #32960. (12 Nov 2003). + + Patch also NPTL. Bug #116086. (20 Dec 2005). + +diff -durN glibc-2.13.orig/nptl/allocatestack.c glibc-2.13/nptl/allocatestack.c +--- glibc-2.13.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 ++++ glibc-2.13/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -329,7 +329,8 @@ + # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" + #endif + if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) +- return errno; ++ if (errno != EACCES) /* PAX is enabled */ ++ return errno; + + return 0; + } +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -63,7 +63,10 @@ + else + # endif + { +- result = errno; ++ if (errno == EACCES) /* PAX is enabled */ ++ result = 0; ++ else ++ result = errno; + goto out; + } + } +@@ -89,7 +92,12 @@ + page -= size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; +@@ -115,7 +123,12 @@ + page += size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; diff --git a/packages/glibc/2.14.1/350-pre20040117-pt_pax.patch b/packages/glibc/2.14.1/350-pre20040117-pt_pax.patch new file mode 100644 index 0000000..f8f6b83 --- /dev/null +++ b/packages/glibc/2.14.1/350-pre20040117-pt_pax.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.13.orig/elf/elf.h glibc-2.13/elf/elf.h +--- glibc-2.13.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 ++++ glibc-2.13/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 +@@ -580,6 +580,7 @@ + #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ + #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ + #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ ++#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ + #define PT_LOSUNW 0x6ffffffa + #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ + #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ +@@ -593,6 +594,18 @@ + #define PF_X (1 << 0) /* Segment is executable */ + #define PF_W (1 << 1) /* Segment is writable */ + #define PF_R (1 << 2) /* Segment is readable */ ++#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ ++#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ ++#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ ++#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ ++#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ ++#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ ++#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ ++#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ ++#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ ++#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ ++#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ ++#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ + #define PF_MASKOS 0x0ff00000 /* OS-specific */ + #define PF_MASKPROC 0xf0000000 /* Processor-specific */ + diff --git a/packages/glibc/2.14.1/360-tests-sandbox-libdl-paths.patch b/packages/glibc/2.14.1/360-tests-sandbox-libdl-paths.patch new file mode 100644 index 0000000..9f78c52 --- /dev/null +++ b/packages/glibc/2.14.1/360-tests-sandbox-libdl-paths.patch @@ -0,0 +1,193 @@ +when glibc runs its tests, it does so by invoking the local library loader. +in Gentoo, we build/run inside of our "sandbox" which itself is linked against +libdl (so that it can load libraries and pull out symbols). the trouble +is that when you upgrade from an older glibc to the new one, often times +internal symbols change name or abi. this is normally OK as you cannot use +libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so +we always say "keep all of the glibc libraries from the same build". but +when glibc runs its tests, it uses dynamic paths to point to its new local +copies of libraries. if the test doesnt use libdl, then glibc doesnt add +its path, and when sandbox triggers the loading of libdl, glibc does so +from the host system system. this gets us into the case of all libraries +are from the locally compiled version of glibc except for libdl.so. + +Fix by Wormo + +http://bugs.gentoo.org/56898 + +diff -durN glibc-2.13.orig/grp/tst_fgetgrent.sh glibc-2.13/grp/tst_fgetgrent.sh +--- glibc-2.13.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 ++++ glibc-2.13/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,7 +24,8 @@ + rtld_installed_name=$1; shift + + testout=${common_objpfx}/grp/tst_fgetgrent.out +-library_path=${common_objpfx} ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn + + result=0 + +diff -durN glibc-2.13.orig/iconvdata/run-iconv-test.sh glibc-2.13/iconvdata/run-iconv-test.sh +--- glibc-2.13.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 ++++ glibc-2.13/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -34,7 +34,7 @@ + export GCONV_PATH + + # We have to have some directories in the library path. +-LIBPATH=$codir:$codir/iconvdata ++LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn + + # How the start the iconv(1) program. + ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ +diff -durN glibc-2.13.orig/iconvdata/tst-table.sh glibc-2.13/iconvdata/tst-table.sh +--- glibc-2.13.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 ++++ glibc-2.13/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -59,8 +59,11 @@ + irreversible=${charset}.irreversible + fi + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # iconv in one direction. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-table-from ${charset} \ + > ${objpfx}tst-${charset}.table + +diff -durN glibc-2.13.orig/intl/tst-codeset.sh glibc-2.13/intl/tst-codeset.sh +--- glibc-2.13.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 ++++ glibc-2.13/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -37,6 +37,9 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + ${common_objpfx}elf/ld.so --library-path $common_objpfx \ + ${objpfx}tst-codeset > ${objpfx}tst-codeset.out + +diff -durN glibc-2.13.orig/intl/tst-gettext.sh glibc-2.13/intl/tst-gettext.sh +--- glibc-2.13.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 ++++ glibc-2.13/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -51,9 +51,12 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. + MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.13.orig/intl/tst-gettext2.sh glibc-2.13/intl/tst-gettext2.sh +--- glibc-2.13.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 ++++ glibc-2.13/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -65,8 +65,11 @@ + LOCPATH=${objpfx}domaindir + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && + cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.13.orig/malloc/tst-mtrace.sh glibc-2.13/malloc/tst-mtrace.sh +--- glibc-2.13.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 ++++ glibc-2.13/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,9 +24,12 @@ + status=0 + trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ + LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${common_objpfx}malloc/tst-mtrace || status=1 + + if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then +diff -durN glibc-2.13.orig/nptl/tst-tls6.sh glibc-2.13/nptl/tst-tls6.sh +--- glibc-2.13.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 ++++ glibc-2.13/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -5,8 +5,8 @@ + rtld_installed_name=$1; shift + logfile=$common_objpfx/nptl/tst-tls6.out + +-# We have to find libc and nptl +-library_path=${common_objpfx}:${common_objpfx}nptl ++# We have to find libc and nptl (also libdl in case sandbox is in use) ++library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn + tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}/nptl/tst-tls5" + +diff -durN glibc-2.13.orig/posix/globtest.sh glibc-2.13/posix/globtest.sh +--- glibc-2.13.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 ++++ glibc-2.13/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -18,7 +18,7 @@ + esac + + # We have to find the libc and the NSS modules. +-library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod ++library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn + + # Since we use `sort' we must make sure to use the same locale everywhere. + LC_ALL=C +diff -durN glibc-2.13.orig/posix/tst-getconf.sh glibc-2.13/posix/tst-getconf.sh +--- glibc-2.13.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 ++++ glibc-2.13/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -10,7 +10,10 @@ + else + rtld_installed_name=$1; shift + runit() { +- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" ++ ++ # make sure libdl is also in path in case sandbox is in use ++ library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" + } + fi + +diff -durN glibc-2.13.orig/posix/wordexp-tst.sh glibc-2.13/posix/wordexp-tst.sh +--- glibc-2.13.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 ++++ glibc-2.13/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -19,8 +19,11 @@ + " + export IFS + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + failed=0 +-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ ++${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 + cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 + wordexp returned 0 diff --git a/packages/glibc/2.14.1/380-dont-build-timezone.patch b/packages/glibc/2.14.1/380-dont-build-timezone.patch new file mode 100644 index 0000000..11c358e --- /dev/null +++ b/packages/glibc/2.14.1/380-dont-build-timezone.patch @@ -0,0 +1,14 @@ +timezone data has been split into the package sys-libs/timezone-data + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 ++++ glibc-2.13/Makeconfig 2009-11-13 00:50:41.000000000 +0100 +@@ -944,7 +944,7 @@ + stdlib stdio-common libio malloc string wcsmbs time dirent \ + grp pwd posix io termios resource misc socket sysvipc gmon \ + gnulib iconv iconvdata wctype manual shadow gshadow po argp \ +- crypt nss localedata timezone rt conform debug \ ++ crypt nss localedata rt conform debug \ + $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) + + ifndef avoid-generated diff --git a/packages/glibc/2.14.1/400-alpha-xstat.patch b/packages/glibc/2.14.1/400-alpha-xstat.patch new file mode 100644 index 0000000..6e4ab8f --- /dev/null +++ b/packages/glibc/2.14.1/400-alpha-xstat.patch @@ -0,0 +1,15 @@ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 +@@ -386,6 +386,11 @@ + # define __ASSUME_GETDENTS32_D_TYPE 1 + #endif + ++/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ ++#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ ++# define __ASSUME_STAT64_SYSCALL 1 ++#endif ++ + /* Starting with version 2.5.3, the initial location returned by `brk' + after exec is always rounded up to the next page. */ + #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/packages/glibc/2.14.1/430-alpha-creat.patch b/packages/glibc/2.14.1/430-alpha-creat.patch new file mode 100644 index 0000000..da6ddda --- /dev/null +++ b/packages/glibc/2.14.1/430-alpha-creat.patch @@ -0,0 +1,14 @@ +alpha does not have a __NR_creat + +http://bugs.gentoo.org/227275 +http://sourceware.org/bugzilla/show_bug.cgi?id=6650 + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 +@@ -1 +1,5 @@ + /* Defined as alias for the syscall. */ ++#include ++#ifndef __NR_creat ++#include "../../../../../io/creat64.c" ++#endif diff --git a/packages/glibc/2.14.1/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc/2.14.1/490-alpha_alpha-add-fdatasync-support.patch new file mode 100644 index 0000000..372f34c --- /dev/null +++ b/packages/glibc/2.14.1/490-alpha_alpha-add-fdatasync-support.patch @@ -0,0 +1,126 @@ +2009-07-25 Aurelien Jarno + + * sysdeps/unix/sysv/linux/kernel-features.h: define + __ASSUME_FDATASYNC. + * sysdeps/unix/sysv/linux/fdatasync.c: New file. + * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with + -fexceptions. + * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. + + sysdeps/unix/sysv/linux/Makefile | 1 + sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ + sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ + sysdeps/unix/sysv/linux/syscalls.list | 1 + 4 files changed, 76 insertions(+), 1 deletion(-) + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.13/sysdeps/unix/sysv/linux/Makefile +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 +@@ -20,6 +20,7 @@ + setfsuid setfsgid makedev epoll_pwait signalfd \ + eventfd eventfd_read eventfd_write prlimit + ++CFLAGS-fdatasync.c = -fexceptions + CFLAGS-gethostid.c = -fexceptions + + sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 +@@ -0,0 +1,69 @@ ++/* fdatasync -- synchronize at least the data part of a file with ++ the underlying media. Linux version. ++ ++ Copyright (C) 2007 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC ++static int __have_no_fdatasync; ++#endif ++ ++static int ++do_fdatasync (int fd) ++{ ++#ifdef __ASSUME_FDATASYNC ++ return INLINE_SYSCALL (fdatasync, 1, fd); ++#elif defined __NR_fdatasync ++ if (!__builtin_expect (__have_no_fdatasync, 0)) ++ { ++ int result = INLINE_SYSCALL (fdatasync, 1, fd); ++ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) ++ return result; ++ ++ __have_no_fdatasync = 1; ++ } ++#endif ++ return INLINE_SYSCALL (fsync, 1, fd); ++} ++ ++int ++__fdatasync (int fd) ++{ ++ if (SINGLE_THREAD_P) ++ return do_fdatasync (fd); ++ ++ int oldtype = LIBC_CANCEL_ASYNC (); ++ ++ int result = do_fdatasync (fd); ++ ++ LIBC_CANCEL_RESET (oldtype); ++ ++ return result; ++} ++ ++weak_alias (__fdatasync, fdatasync) ++ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 +@@ -459,6 +459,12 @@ + # define __ASSUME_FUTEX_LOCK_PI 1 + #endif + ++/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it ++ was already present in 2.0 kernels on other architectures. */ ++#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) ++# define __ASSUME_FDATASYNC 1 ++#endif ++ + /* Support for utimensat syscall was added in 2.6.22, on SH + only after 2.6.22-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020616 \ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 +@@ -11,7 +11,6 @@ + epoll_create1 EXTRA epoll_create1 i:i epoll_create1 + epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl + epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait +-fdatasync - fdatasync Ci:i fdatasync + flock - flock i:ii __flock flock + fork - fork i: __libc_fork __fork fork + get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/packages/glibc/2.14.1/560-ppc-atomic.patch b/packages/glibc/2.14.1/560-ppc-atomic.patch new file mode 100644 index 0000000..ee1cb90 --- /dev/null +++ b/packages/glibc/2.14.1/560-ppc-atomic.patch @@ -0,0 +1,415 @@ +sniped from suse + +Index: sysdeps/powerpc/bits/atomic.h +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v +retrieving revision 1.17 +diff -u -a -p -r1.17 atomic.h + +diff -durN glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h glibc-2.13/sysdeps/powerpc/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -85,14 +85,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -102,14 +102,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -118,12 +118,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -132,11 +132,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -144,12 +144,12 @@ + #define __arch_atomic_exchange_and_add_32(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stwcx. %1,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -157,12 +157,12 @@ + #define __arch_atomic_increment_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -170,27 +170,27 @@ + #define __arch_atomic_decrement_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_32(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ + " cmpwi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stwcx. %1,0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -60,14 +60,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp, __tmp2; \ + __asm __volatile (" clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -61,14 +61,14 @@ + unsigned int __tmp, __tmp2; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ + " clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -82,14 +82,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -98,14 +98,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -115,14 +115,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -132,14 +132,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -148,12 +148,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -162,11 +162,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -174,12 +174,12 @@ + #define __arch_atomic_exchange_and_add_64(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stdcx. %1,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -187,12 +187,12 @@ + #define __arch_atomic_increment_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -200,27 +200,27 @@ + #define __arch_atomic_decrement_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_64(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ + " cmpdi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stdcx. %1,0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) diff --git a/packages/glibc/2.14.1/630-mips_shn_undef-hack.patch b/packages/glibc/2.14.1/630-mips_shn_undef-hack.patch new file mode 100644 index 0000000..791d76c --- /dev/null +++ b/packages/glibc/2.14.1/630-mips_shn_undef-hack.patch @@ -0,0 +1,16 @@ +diff -durN glibc-2.13.orig/elf/dl-lookup.c glibc-2.13/elf/dl-lookup.c +--- glibc-2.13.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 ++++ glibc-2.13/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 +@@ -301,6 +301,12 @@ + /* FALLTHROUGH */ + case STB_GLOBAL: + success: ++#ifdef __mips__ ++ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF ++ symbols, we skip them. */ ++ if (sym->st_shndx == SHN_UNDEF) ++ break; ++#endif + /* Global definition. Just what we need. */ + result->s = sym; + result->m = (struct link_map *) map; diff --git a/packages/glibc/2.14.1/640-alpha-atfcts.patch b/packages/glibc/2.14.1/640-alpha-atfcts.patch new file mode 100644 index 0000000..7a8a94a --- /dev/null +++ b/packages/glibc/2.14.1/640-alpha-atfcts.patch @@ -0,0 +1,12 @@ +--- glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 +@@ -437,7 +437,8 @@ + the code. On PPC they were introduced in 2.6.17-rc1, + on SH in 2.6.19-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020611 \ +- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) ++ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ ++ && (!defined __alpha__) + # define __ASSUME_ATFCTS 1 + #endif + diff --git a/packages/glibc/2.14.1/650-syslog.patch b/packages/glibc/2.14.1/650-syslog.patch new file mode 100644 index 0000000..c20cafc --- /dev/null +++ b/packages/glibc/2.14.1/650-syslog.patch @@ -0,0 +1,12 @@ +diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c +--- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 ++++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 +@@ -152,7 +152,7 @@ + #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID + /* Check for invalid bits. */ + if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { +- syslog(INTERNALLOG, ++ __syslog(INTERNALLOG, + "syslog: unknown facility/priority: %x", pri); + pri &= LOG_PRIMASK|LOG_FACMASK; + } diff --git a/packages/glibc/2.14.1/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc/2.14.1/660-debug-readlink_chk-readklinkat_chk.patch new file mode 100644 index 0000000..a5a7052 --- /dev/null +++ b/packages/glibc/2.14.1/660-debug-readlink_chk-readklinkat_chk.patch @@ -0,0 +1,24 @@ +diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c +--- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 ++++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 +@@ -25,7 +25,7 @@ + + + ssize_t +-__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) ++__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) + { + if (len > buflen) + __chk_fail (); +diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c +--- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 ++++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 +@@ -21,7 +21,7 @@ + + + ssize_t +-__readlinkat_chk (int fd, const char *path, void *buf, size_t len, ++__readlinkat_chk (int fd, const char *path, char *buf, size_t len, + size_t buflen) + { + if (len > buflen) diff --git a/packages/glibc/2.14/100-respect-env-CPPFLAGS.patch b/packages/glibc/2.14/100-respect-env-CPPFLAGS.patch new file mode 100644 index 0000000..3798cb2 --- /dev/null +++ b/packages/glibc/2.14/100-respect-env-CPPFLAGS.patch @@ -0,0 +1,14 @@ +Respect environment CPPFLAGS when we run ./configure so we can inject +random -D things without having to set CFLAGS/ASFLAGS + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 ++++ glibc-2.13/Makeconfig 2009-11-13 00:49:41.000000000 +0100 +@@ -697,6 +697,7 @@ + $(foreach lib,$(libof-$(basename $(@F))) \ + $(libof-$(field.le_next)) + ++#define LIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = LIST_FIRST((head)); \ ++ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + /* + * List access methods. + */ +@@ -197,6 +202,16 @@ + #define SLIST_FOREACH(var, head, field) \ + for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) + ++#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = SLIST_FIRST((head)); \ ++ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ ++#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ ++ for ((varp) = &SLIST_FIRST((head)); \ ++ ((var) = *(varp)) != NULL; \ ++ (varp) = &SLIST_NEXT((var), field)) ++ + /* + * Singly-linked List access methods. + */ +@@ -242,6 +257,12 @@ + (head)->stqh_last = &(elm)->field.stqe_next; \ + } while (/*CONSTCOND*/0) + ++#define STAILQ_LAST(head, type, field) \ ++ (STAILQ_EMPTY((head)) ? \ ++ NULL : \ ++ ((struct type *)(void *) \ ++ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) ++ + #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ + if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ + (head)->stqh_last = &(elm)->field.stqe_next; \ +@@ -271,6 +292,11 @@ + (var); \ + (var) = ((var)->field.stqe_next)) + ++#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = STAILQ_FIRST((head)); \ ++ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define STAILQ_CONCAT(head1, head2) do { \ + if (!STAILQ_EMPTY((head2))) { \ + *(head1)->stqh_last = (head2)->stqh_first; \ +@@ -437,11 +463,21 @@ + (var); \ + (var) = ((var)->field.tqe_next)) + ++#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = TAILQ_FIRST((head)); \ ++ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ + for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ + (var); \ + (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) + ++#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ ++ for ((var) = TAILQ_LAST((head), headname); \ ++ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_CONCAT(head1, head2, field) do { \ + if (!TAILQ_EMPTY(head2)) { \ + *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/packages/glibc/2.14/160-manual-no-perl.patch b/packages/glibc/2.14/160-manual-no-perl.patch new file mode 100644 index 0000000..5e2b807 --- /dev/null +++ b/packages/glibc/2.14/160-manual-no-perl.patch @@ -0,0 +1,24 @@ +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.13.orig/manual/Makefile glibc-2.13/manual/Makefile +--- glibc-2.13.orig/manual/Makefile 2006-01-08 07:43:47.000000000 +0100 ++++ glibc-2.13/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/packages/glibc/2.14/170-localedef-fix-trampoline.patch b/packages/glibc/2.14/170-localedef-fix-trampoline.patch new file mode 100644 index 0000000..3cc6559 --- /dev/null +++ b/packages/glibc/2.14/170-localedef-fix-trampoline.patch @@ -0,0 +1,53 @@ +# DP: Description: Fix localedef segfault when run under exec-shield, +# PaX or similar. (#231438, #198099) +# DP: Dpatch Author: James Troup +# DP: Patch Author: (probably) Jakub Jelinek +# DP: Upstream status: Unknown +# DP: Status Details: Unknown +# DP: Date: 2004-03-16 +diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h +--- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 ++++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 +@@ -203,6 +203,42 @@ + } + } + } ++ ++/* GCC ATM seems to do a poor job with pointers to nested functions passed ++ to inlined functions. Help it a little bit with this hack. */ ++#define wchead_table_iterate(tp, fn) \ ++do \ ++ { \ ++ struct wchead_table *t = (tp); \ ++ uint32_t index1; \ ++ for (index1 = 0; index1 < t->level1_size; index1++) \ ++ { \ ++ uint32_t lookup1 = t->level1[index1]; \ ++ if (lookup1 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup1_shifted = lookup1 << t->q; \ ++ uint32_t index2; \ ++ for (index2 = 0; index2 < (1 << t->q); index2++) \ ++ { \ ++ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ ++ if (lookup2 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup2_shifted = lookup2 << t->p; \ ++ uint32_t index3; \ ++ for (index3 = 0; index3 < (1 << t->p); index3++) \ ++ { \ ++ struct element_t *lookup3 \ ++ = t->level3[index3 + lookup2_shifted]; \ ++ if (lookup3 != NULL) \ ++ fn ((((index1 << t->q) + index2) << t->p) + index3, \ ++ lookup3); \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } while (0) ++ + #endif + + #ifndef NO_FINALIZE diff --git a/packages/glibc/2.14/180-resolv-dynamic.patch b/packages/glibc/2.14/180-resolv-dynamic.patch new file mode 100644 index 0000000..e916bce --- /dev/null +++ b/packages/glibc/2.14/180-resolv-dynamic.patch @@ -0,0 +1,39 @@ +ripped from SuSE + +if /etc/resolv.conf is updated, then make sure applications +already running get the updated information. + +http://bugs.gentoo.org/177416 + +diff -durN glibc-2.13.orig/resolv/res_libc.c glibc-2.13/resolv/res_libc.c +--- glibc-2.13.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 ++++ glibc-2.13/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + + /* The following bit is copied from res_data.c (where it is #ifdef'ed +@@ -95,6 +96,20 @@ + __res_maybe_init (res_state resp, int preinit) + { + if (resp->options & RES_INIT) { ++ static time_t last_mtime, last_check; ++ time_t now; ++ struct stat statbuf; ++ ++ time (&now); ++ if (now != last_check) { ++ last_check = now; ++ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { ++ last_mtime = statbuf.st_mtime; ++ atomicinclock (lock); ++ atomicinc (__res_initstamp); ++ atomicincunlock (lock); ++ } ++ } + if (__res_initstamp != resp->_u._ext.initstamp) { + if (resp->nscount > 0) + __res_iclose (resp, true); diff --git a/packages/glibc/2.14/190-localedef-mmap.patch b/packages/glibc/2.14/190-localedef-mmap.patch new file mode 100644 index 0000000..f3914cd --- /dev/null +++ b/packages/glibc/2.14/190-localedef-mmap.patch @@ -0,0 +1,39 @@ +sniped from Debian +http://bugs.gentoo.org/289615 + +2009-10-27 Aurelien Jarno + + * locale/programs/locarchive.c: use MMAP_SHARED to reserve memory + used later with MMAP_FIXED | MMAP_SHARED to cope with different + alignment restrictions. + +diff -durN glibc-2.13.orig/locale/programs/locarchive.c glibc-2.13/locale/programs/locarchive.c +--- glibc-2.13.orig/locale/programs/locarchive.c 2009-04-27 16:07:47.000000000 +0200 ++++ glibc-2.13/locale/programs/locarchive.c 2009-11-13 00:50:01.000000000 +0100 +@@ -134,7 +134,7 @@ + size_t reserved = RESERVE_MMAP_SIZE; + int xflags = 0; + if (total < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else +@@ -396,7 +396,7 @@ + size_t reserved = RESERVE_MMAP_SIZE; + int xflags = 0; + if (total < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else +@@ -614,7 +614,7 @@ + int xflags = 0; + void *p; + if (st.st_size < reserved +- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON, ++ && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_SHARED | MAP_ANON, + -1, 0)) != MAP_FAILED)) + xflags = MAP_FIXED; + else diff --git a/packages/glibc/2.14/200-fadvise64_64.patch b/packages/glibc/2.14/200-fadvise64_64.patch new file mode 100644 index 0000000..71bca38 --- /dev/null +++ b/packages/glibc/2.14/200-fadvise64_64.patch @@ -0,0 +1,28 @@ +ripped from Debian + + sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 +@@ -35,6 +35,19 @@ + return INTERNAL_SYSCALL_ERRNO (ret, err); + return 0; + #else ++# ifdef __NR_fadvise64_64 ++ INTERNAL_SYSCALL_DECL (err); ++ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, ++ __LONG_LONG_PAIR ((long) (offset >> 31), ++ (long) offset), ++ __LONG_LONG_PAIR ((long) (len >> 31), ++ (long) len), ++ advise); ++ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) ++ return INTERNAL_SYSCALL_ERRNO (ret, err); ++ return 0; ++# else + return ENOSYS; ++# endif + #endif + } diff --git a/packages/glibc/2.14/220-section-comments.patch b/packages/glibc/2.14/220-section-comments.patch new file mode 100644 index 0000000..d717829 --- /dev/null +++ b/packages/glibc/2.14/220-section-comments.patch @@ -0,0 +1,24 @@ +http://sources.redhat.com/ml/binutils/2004-04/msg00665.html + +fixes building on some architectures (like m68k/arm/cris/etc...) because +it does the right thing + +diff -durN glibc-2.13.orig/include/libc-symbols.h glibc-2.13/include/libc-symbols.h +--- glibc-2.13.orig/include/libc-symbols.h 2009-03-14 00:51:46.000000000 +0100 ++++ glibc-2.13/include/libc-symbols.h 2009-11-13 00:50:07.000000000 +0100 +@@ -239,12 +239,12 @@ + # define __make_section_unallocated(section_string) + # endif + +-/* Tacking on "\n\t#" to the section name makes gcc put it's bogus ++/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus + section attributes on what looks like a comment to the assembler. */ + # ifdef HAVE_SECTION_QUOTES +-# define __sec_comment "\"\n\t#\"" ++# define __sec_comment "\"\n#APP\n\t#\"" + # else +-# define __sec_comment "\n\t#" ++# define __sec_comment "\n#APP\n\t#" + # endif + # define link_warning(symbol, msg) \ + __make_section_unallocated (".gnu.warning." #symbol) \ diff --git a/packages/glibc/2.14/230-no-inline-gmon.patch b/packages/glibc/2.14/230-no-inline-gmon.patch new file mode 100644 index 0000000..fa33c2b --- /dev/null +++ b/packages/glibc/2.14/230-no-inline-gmon.patch @@ -0,0 +1,36 @@ +http://bugs.gentoo.org/196245 +http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html + +Attached is a patch to add __attribute__ ((noinline)) to +call_gmon_start. + +Without this patch, the sec script that processed initfini.s removes a +part of inlined call_gmon_start, causing undefined label errors. + +This patch solves the problem by forcing gcc not to inline +call_gmon_start with __attribute__ ((noinline)). + +Tested by building for arm-none-lixux-gnueabi. OK to apply? + +Kazu Hirata + +2006-05-07 Kazu Hirata <kazu@codesourcery.com> + + * sysdeps/generic/initfini.c (call_gmon_start): Add + __attribute__ ((noinline)). + +Index: sysdeps/generic/initfini.c +=================================================================== + +diff -durN glibc-2.13.orig/sysdeps/generic/initfini.c glibc-2.13/sysdeps/generic/initfini.c +--- glibc-2.13.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200 ++++ glibc-2.13/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100 +@@ -70,7 +70,7 @@ + /* The beginning of _init: */ + asm ("\n/*@_init_PROLOG_BEGINS*/"); + +-static void ++static void __attribute__ ((noinline)) + call_gmon_start(void) + { + extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ diff --git a/packages/glibc/2.14/240-check_native-headers.patch b/packages/glibc/2.14/240-check_native-headers.patch new file mode 100644 index 0000000..c936f71 --- /dev/null +++ b/packages/glibc/2.14/240-check_native-headers.patch @@ -0,0 +1,17 @@ +many ports hit this warning: +../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' +../sysdeps/unix/sysv/linux/check_native.c:46: warning: implicit declaration of function 'memset' + +snipped from suse + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/check_native.c glibc-2.13/sysdeps/unix/sysv/linux/check_native.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/check_native.c 2007-11-24 04:12:17.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/check_native.c 2009-11-13 00:50:11.000000000 +0100 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + #include + #include + #include diff --git a/packages/glibc/2.14/260-assume-pipe2.patch b/packages/glibc/2.14/260-assume-pipe2.patch new file mode 100644 index 0000000..42e8f4e --- /dev/null +++ b/packages/glibc/2.14/260-assume-pipe2.patch @@ -0,0 +1,40 @@ +http://bugs.gentoo.org/250342 +http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 + +we cant assume sock_cloexec and pipe2 are bound together as the former defines +are found in glibc only while the latter are a combo of kernel headers and +glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub +inside of glibc, we hit a problem. for example: + +#include +#include +main() +{ + getgrnam("portage"); + if (!popen("ls", "r")) + perror("popen()"); +} + +getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both +__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against +older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS +stub for it. so popen() will always fail as glibc assumes pipe2() works. + +diff -durN glibc-2.13.orig/socket/have_sock_cloexec.c glibc-2.13/socket/have_sock_cloexec.c +--- glibc-2.13.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 ++++ glibc-2.13/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 +@@ -16,9 +16,14 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#include + #include + #include + + #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC + int __have_sock_cloexec; + #endif ++ ++#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 ++int __have_pipe2; ++#endif diff --git a/packages/glibc/2.14/270-china.patch b/packages/glibc/2.14/270-china.patch new file mode 100644 index 0000000..41d7759 --- /dev/null +++ b/packages/glibc/2.14/270-china.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.13.orig/localedata/locales/zh_TW glibc-2.13/localedata/locales/zh_TW +--- glibc-2.13.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 ++++ glibc-2.13/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 +@@ -1,7 +1,7 @@ + comment_char % + escape_char / + % +-% Chinese language locale for Taiwan R.O.C. ++% Chinese language locale for Taiwan + % charmap: BIG5-CP950 + % + % Original Author: +@@ -17,7 +17,7 @@ + % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf + + LC_IDENTIFICATION +-title "Chinese locale for Taiwan R.O.C." ++title "Chinese locale for Taiwan" + source "" + address "" + contact "" +@@ -25,7 +25,7 @@ + tel "" + fax "" + language "Chinese" +-territory "Taiwan R.O.C." ++territory "Taiwan" + revision "0.2" + date "2000-08-02" + % diff --git a/packages/glibc/2.14/280-new-valencian-locale.patch b/packages/glibc/2.14/280-new-valencian-locale.patch new file mode 100644 index 0000000..4cdd108 --- /dev/null +++ b/packages/glibc/2.14/280-new-valencian-locale.patch @@ -0,0 +1,115 @@ +http://bugs.gentoo.org/show_bug.cgi?id=131815 +http://sourceware.org/bugzilla/show_bug.cgi?id=2522 + +diff -durN glibc-2.13.orig/localedata/SUPPORTED glibc-2.13/localedata/SUPPORTED +--- glibc-2.13.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 ++++ glibc-2.13/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 +@@ -72,6 +72,8 @@ + ca_ES.UTF-8/UTF-8 \ + ca_ES/ISO-8859-1 \ + ca_ES@euro/ISO-8859-15 \ ++ca_ES.UTF-8@valencia/UTF-8 \ ++ca_ES@valencia/ISO-8859-15 \ + ca_FR.UTF-8/UTF-8 \ + ca_FR/ISO-8859-15 \ + ca_IT.UTF-8/UTF-8 \ +diff -durN glibc-2.13.orig/localedata/locales/ca_ES@valencia glibc-2.13/localedata/locales/ca_ES@valencia +--- glibc-2.13.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.13/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 +@@ -0,0 +1,96 @@ ++comment_char % ++escape_char / ++% ++% Valencian (southern Catalan) locale for Spain with Euro ++% ++% Note that this locale is almost the same as ca_ES@euro. The point of having ++% a separate locale is only for PO translations, which have a lot of social ++% support and are very appreciated by the Valencian-speaking community. ++% ++% Contact: Jordi Mallach ++% Email: jordi@gnu.org ++% Tel: ++% Fax: ++% Language: ca ++% Territory: ES ++% Option: euro ++% Revision: 1.0 ++% Date: 2006-04-06 ++% Application: general ++% Users: general ++% Repertoiremap: mnemonic,ds ++% Charset: ISO-8859-15 ++% Distribution and use is free, also ++% for commercial purposes. ++ ++LC_IDENTIFICATION ++title "Valencian (southern Catalan) locale for Spain with Euro" ++source "" ++address "" ++contact "Jordi Mallach" ++email "jordi@gnu.org" ++tel "" ++fax "" ++language "Catalan" ++territory "Spain" ++revision "1.0" ++date "2006-04-06" ++% ++category "ca_ES@valencia:2006";LC_IDENTIFICATION ++category "ca_ES@valencia:2006";LC_CTYPE ++category "ca_ES@valencia:2006";LC_COLLATE ++category "ca_ES@valencia:2006";LC_MONETARY ++category "ca_ES@valencia:2006";LC_NUMERIC ++category "ca_ES@valencia:2006";LC_TIME ++category "ca_ES@valencia:2006";LC_MESSAGES ++category "ca_ES@valencia:2006";LC_PAPER ++category "ca_ES@valencia:2006";LC_NAME ++category "ca_ES@valencia:2006";LC_ADDRESS ++category "ca_ES@valencia:2006";LC_TELEPHONE ++category "ca_ES@valencia:2006";LC_MEASUREMENT ++ ++END LC_IDENTIFICATION ++ ++LC_CTYPE ++copy "i18n" ++END LC_CTYPE ++ ++LC_COLLATE ++copy "ca_ES" ++END LC_COLLATE ++ ++LC_MONETARY ++copy "ca_ES" ++END LC_MONETARY ++ ++LC_NUMERIC ++copy "ca_ES" ++END LC_NUMERIC ++ ++LC_TIME ++copy "ca_ES" ++END LC_TIME ++ ++LC_MESSAGES ++copy "ca_ES" ++END LC_MESSAGES ++ ++LC_PAPER ++copy "ca_ES" ++END LC_PAPER ++ ++LC_NAME ++copy "ca_ES" ++END LC_NAME ++ ++LC_ADDRESS ++copy "ca_ES" ++END LC_ADDRESS ++ ++LC_TELEPHONE ++copy "ca_ES" ++END LC_TELEPHONE ++ ++LC_MEASUREMENT ++copy "ca_ES" ++END LC_MEASUREMENT diff --git a/packages/glibc/2.14/300-nscd-one-fork.patch b/packages/glibc/2.14/300-nscd-one-fork.patch new file mode 100644 index 0000000..adc9b3f --- /dev/null +++ b/packages/glibc/2.14/300-nscd-one-fork.patch @@ -0,0 +1,40 @@ +only fork one to assist in stop-start-daemon assumptions about daemon behavior + +http://bugs.gentoo.org/190785 + +diff -durN glibc-2.13.orig/nscd/nscd.c glibc-2.13/nscd/nscd.c +--- glibc-2.13.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 ++++ glibc-2.13/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 +@@ -182,6 +182,9 @@ + if (pid != 0) + exit (0); + ++ if (write_pid (_PATH_NSCDPID) < 0) ++ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); ++ + int nullfd = open (_PATH_DEVNULL, O_RDWR); + if (nullfd != -1) + { +@@ -231,12 +234,6 @@ + for (i = min_close_fd; i < getdtablesize (); i++) + close (i); + +- pid = fork (); +- if (pid == -1) +- error (EXIT_FAILURE, errno, _("cannot fork")); +- if (pid != 0) +- exit (0); +- + setsid (); + + if (chdir ("/") != 0) +@@ -245,9 +242,6 @@ + + openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); + +- if (write_pid (_PATH_NSCDPID) < 0) +- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); +- + if (!init_logfile ()) + dbg_log (_("Could not create log file")); + diff --git a/packages/glibc/2.14/310-hppa-nptl-carlos.patch b/packages/glibc/2.14/310-hppa-nptl-carlos.patch new file mode 100644 index 0000000..4c028b2 --- /dev/null +++ b/packages/glibc/2.14/310-hppa-nptl-carlos.patch @@ -0,0 +1,246 @@ + + +diff -durN glibc-2.13.orig/elf/rtld.c glibc-2.13/elf/rtld.c +--- glibc-2.13.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 ++++ glibc-2.13/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 +@@ -392,14 +392,14 @@ + know it is available. We do not have to clear the memory if we + do not have to use the temporary bootstrap_map. Global variables + are initialized to zero by default. */ +-#ifndef DONT_USE_BOOTSTRAP_MAP ++#if !defined DONT_USE_BOOTSTRAP_MAP + # ifdef HAVE_BUILTIN_MEMSET + __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); + # else +- for (size_t cnt = 0; +- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); +- ++cnt) +- bootstrap_map.l_info[cnt] = 0; ++ /* Clear the whole bootstrap_map structure */ ++ for (char *cnt = (char *)&(bootstrap_map); ++ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); ++ *cnt++ = '\0'); + # endif + # if USE___THREAD + bootstrap_map.l_tls_modid = 0; +diff -durN glibc-2.13.orig/include/atomic.h glibc-2.13/include/atomic.h +--- glibc-2.13.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 ++++ glibc-2.13/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 +@@ -185,7 +185,7 @@ + __typeof (*(mem)) __atg5_value = (newvalue); \ + \ + do \ +- __atg5_oldval = *__atg5_memp; \ ++ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ + __atg5_oldval), 0)); \ +@@ -206,7 +206,7 @@ + __typeof (*(mem)) __atg6_value = (value); \ + \ + do \ +- __atg6_oldval = *__atg6_memp; \ ++ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ + __atg6_oldval \ +@@ -224,7 +224,7 @@ + __typeof (*(mem)) __atg7_value = (value); \ + \ + do \ +- __atg7_oldv = *__atg7_memp; \ ++ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ + __atg7_oldv \ +@@ -242,7 +242,7 @@ + __typeof (mem) __atg8_memp = (mem); \ + __typeof (*(mem)) __atg8_value = (value); \ + do { \ +- __atg8_oldval = *__atg8_memp; \ ++ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ + if (__atg8_oldval >= __atg8_value) \ + break; \ + } while (__builtin_expect \ +@@ -259,7 +259,7 @@ + __typeof (mem) __atg9_memp = (mem); \ + __typeof (*(mem)) __atg9_value = (value); \ + do { \ +- __atg9_oldv = *__atg9_memp; \ ++ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ + if (__atg9_oldv >= __atg9_value) \ + break; \ + } while (__builtin_expect \ +@@ -277,7 +277,7 @@ + __typeof (mem) __atg10_memp = (mem); \ + __typeof (*(mem)) __atg10_value = (value); \ + do { \ +- __atg10_oldval = *__atg10_memp; \ ++ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ + if (__atg10_oldval <= __atg10_value) \ + break; \ + } while (__builtin_expect \ +@@ -361,7 +361,7 @@ + \ + do \ + { \ +- __atg11_oldval = *__atg11_memp; \ ++ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ + if (__builtin_expect (__atg11_oldval <= 0, 0)) \ + break; \ + } \ +@@ -400,7 +400,7 @@ + __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ + \ + do \ +- __atg14_old = (*__atg14_memp); \ ++ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ + __atg14_old | __atg14_mask,\ +@@ -418,7 +418,7 @@ + __typeof (*(mem)) __atg15_mask = (mask); \ + \ + do \ +- __atg15_old = (*__atg15_memp); \ ++ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ + __atg15_old & __atg15_mask, \ +@@ -450,7 +450,7 @@ + __typeof (*(mem)) __atg16_mask = (mask); \ + \ + do \ +- __atg16_old = (*__atg16_memp); \ ++ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ + __atg16_old & __atg16_mask,\ +@@ -468,7 +468,7 @@ + __typeof (*(mem)) __atg17_mask = (mask); \ + \ + do \ +- __atg17_old = (*__atg17_memp); \ ++ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ + __atg17_old | __atg17_mask, \ +@@ -484,7 +484,7 @@ + __typeof (*(mem)) __atg18_mask = (mask); \ + \ + do \ +- __atg18_old = (*__atg18_memp); \ ++ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ + __atg18_old | __atg18_mask,\ +@@ -500,7 +500,7 @@ + __typeof (*(mem)) __atg19_mask = (mask); \ + \ + do \ +- __atg19_old = (*__atg19_memp); \ ++ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ + __atg19_old | __atg19_mask,\ +diff -durN glibc-2.13.orig/nptl/Makefile glibc-2.13/nptl/Makefile +--- glibc-2.13.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 ++++ glibc-2.13/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -265,9 +265,9 @@ + # Files which must not be linked with libpthread. + tests-nolibpthread = tst-unload + +-# This sets the stack resource limit to 1023kb, which is not a multiple +-# of the page size since every architecture's page size is > 1k. +-tst-oddstacklimit-ENV = ; ulimit -s 1023; ++# This sets the stack resource limit to 8193kb, which is not a multiple ++# of the page size since every architecture's page size is 4096 bytes. ++tst-oddstacklimit-ENV = ; ulimit -s 8193; + + distribute = eintr.c tst-cleanup4aux.c + +@@ -426,6 +426,35 @@ + CFLAGS-tst-cleanupx4.c += -fexceptions + CFLAGS-tst-oncex3.c += -fexceptions + CFLAGS-tst-oncex4.c += -fexceptions ++ ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed ++LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) ++ + CFLAGS-tst-align.c += $(stack-align-test-flags) + CFLAGS-tst-align3.c += $(stack-align-test-flags) + CFLAGS-tst-initializers1.c = -W -Wall -Werror +diff -durN glibc-2.13.orig/nptl/pthread_barrier_wait.c glibc-2.13/nptl/pthread_barrier_wait.c +--- glibc-2.13.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 ++++ glibc-2.13/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 +@@ -64,7 +64,7 @@ + do + lll_futex_wait (&ibarrier->curr_event, event, + ibarrier->private ^ FUTEX_PRIVATE_FLAG); +- while (event == ibarrier->curr_event); ++ while (event == *(volatile unsigned int *)&ibarrier->curr_event); + } + + /* Make sure the init_count is stored locally or in a register. */ +diff -durN glibc-2.13.orig/nptl/sysdeps/pthread/Makefile glibc-2.13/nptl/sysdeps/pthread/Makefile +--- glibc-2.13.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 ++++ glibc-2.13/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -33,7 +33,9 @@ + + ifeq ($(have-forced-unwind),yes) + tests += tst-mqueue8x ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed + CFLAGS-tst-mqueue8x.c += -fexceptions ++LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) + endif + endif + +diff -durN glibc-2.13.orig/stdio-common/Makefile glibc-2.13/stdio-common/Makefile +--- glibc-2.13.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 ++++ glibc-2.13/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -82,7 +82,7 @@ + $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' + endif + +-CFLAGS-vfprintf.c = -Wno-uninitialized ++CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch + CFLAGS-vfwprintf.c = -Wno-uninitialized + CFLAGS-tst-printf.c = -Wno-format + CFLAGS-tstdiomisc.c = -Wno-format +diff -durN glibc-2.13.orig/sunrpc/clnt_udp.c glibc-2.13/sunrpc/clnt_udp.c +--- glibc-2.13.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 ++++ glibc-2.13/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 +@@ -456,7 +456,7 @@ + while (inlen < 0 && errno == EINTR); + if (inlen < 0) + { +- if (errno == EWOULDBLOCK) ++ if (errno == EWOULDBLOCK || errno == EAGAIN) + continue; + cu->cu_error.re_errno = errno; + return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/packages/glibc/2.14/340-dl_execstack-PaX-support.patch b/packages/glibc/2.14/340-dl_execstack-PaX-support.patch new file mode 100644 index 0000000..2402af0 --- /dev/null +++ b/packages/glibc/2.14/340-dl_execstack-PaX-support.patch @@ -0,0 +1,66 @@ + With latest versions of glibc, a lot of apps failed on a PaX enabled + system with: + cannot enable executable stack as shared object requires: Permission denied + + This is due to PaX 'exec-protecting' the stack, and ld.so then trying + to make the stack executable due to some libraries not containing the + PT_GNU_STACK section. Bug #32960. (12 Nov 2003). + + Patch also NPTL. Bug #116086. (20 Dec 2005). + +diff -durN glibc-2.13.orig/nptl/allocatestack.c glibc-2.13/nptl/allocatestack.c +--- glibc-2.13.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 ++++ glibc-2.13/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -329,7 +329,8 @@ + # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" + #endif + if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) +- return errno; ++ if (errno != EACCES) /* PAX is enabled */ ++ return errno; + + return 0; + } +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -63,7 +63,10 @@ + else + # endif + { +- result = errno; ++ if (errno == EACCES) /* PAX is enabled */ ++ result = 0; ++ else ++ result = errno; + goto out; + } + } +@@ -89,7 +92,12 @@ + page -= size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; +@@ -115,7 +123,12 @@ + page += size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; diff --git a/packages/glibc/2.14/350-pre20040117-pt_pax.patch b/packages/glibc/2.14/350-pre20040117-pt_pax.patch new file mode 100644 index 0000000..f8f6b83 --- /dev/null +++ b/packages/glibc/2.14/350-pre20040117-pt_pax.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.13.orig/elf/elf.h glibc-2.13/elf/elf.h +--- glibc-2.13.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 ++++ glibc-2.13/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 +@@ -580,6 +580,7 @@ + #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ + #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ + #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ ++#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ + #define PT_LOSUNW 0x6ffffffa + #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ + #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ +@@ -593,6 +594,18 @@ + #define PF_X (1 << 0) /* Segment is executable */ + #define PF_W (1 << 1) /* Segment is writable */ + #define PF_R (1 << 2) /* Segment is readable */ ++#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ ++#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ ++#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ ++#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ ++#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ ++#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ ++#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ ++#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ ++#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ ++#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ ++#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ ++#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ + #define PF_MASKOS 0x0ff00000 /* OS-specific */ + #define PF_MASKPROC 0xf0000000 /* Processor-specific */ + diff --git a/packages/glibc/2.14/360-tests-sandbox-libdl-paths.patch b/packages/glibc/2.14/360-tests-sandbox-libdl-paths.patch new file mode 100644 index 0000000..9f78c52 --- /dev/null +++ b/packages/glibc/2.14/360-tests-sandbox-libdl-paths.patch @@ -0,0 +1,193 @@ +when glibc runs its tests, it does so by invoking the local library loader. +in Gentoo, we build/run inside of our "sandbox" which itself is linked against +libdl (so that it can load libraries and pull out symbols). the trouble +is that when you upgrade from an older glibc to the new one, often times +internal symbols change name or abi. this is normally OK as you cannot use +libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so +we always say "keep all of the glibc libraries from the same build". but +when glibc runs its tests, it uses dynamic paths to point to its new local +copies of libraries. if the test doesnt use libdl, then glibc doesnt add +its path, and when sandbox triggers the loading of libdl, glibc does so +from the host system system. this gets us into the case of all libraries +are from the locally compiled version of glibc except for libdl.so. + +Fix by Wormo + +http://bugs.gentoo.org/56898 + +diff -durN glibc-2.13.orig/grp/tst_fgetgrent.sh glibc-2.13/grp/tst_fgetgrent.sh +--- glibc-2.13.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 ++++ glibc-2.13/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,7 +24,8 @@ + rtld_installed_name=$1; shift + + testout=${common_objpfx}/grp/tst_fgetgrent.out +-library_path=${common_objpfx} ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn + + result=0 + +diff -durN glibc-2.13.orig/iconvdata/run-iconv-test.sh glibc-2.13/iconvdata/run-iconv-test.sh +--- glibc-2.13.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 ++++ glibc-2.13/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -34,7 +34,7 @@ + export GCONV_PATH + + # We have to have some directories in the library path. +-LIBPATH=$codir:$codir/iconvdata ++LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn + + # How the start the iconv(1) program. + ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ +diff -durN glibc-2.13.orig/iconvdata/tst-table.sh glibc-2.13/iconvdata/tst-table.sh +--- glibc-2.13.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 ++++ glibc-2.13/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -59,8 +59,11 @@ + irreversible=${charset}.irreversible + fi + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # iconv in one direction. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-table-from ${charset} \ + > ${objpfx}tst-${charset}.table + +diff -durN glibc-2.13.orig/intl/tst-codeset.sh glibc-2.13/intl/tst-codeset.sh +--- glibc-2.13.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 ++++ glibc-2.13/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -37,6 +37,9 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + ${common_objpfx}elf/ld.so --library-path $common_objpfx \ + ${objpfx}tst-codeset > ${objpfx}tst-codeset.out + +diff -durN glibc-2.13.orig/intl/tst-gettext.sh glibc-2.13/intl/tst-gettext.sh +--- glibc-2.13.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 ++++ glibc-2.13/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -51,9 +51,12 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. + MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.13.orig/intl/tst-gettext2.sh glibc-2.13/intl/tst-gettext2.sh +--- glibc-2.13.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 ++++ glibc-2.13/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -65,8 +65,11 @@ + LOCPATH=${objpfx}domaindir + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && + cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.13.orig/malloc/tst-mtrace.sh glibc-2.13/malloc/tst-mtrace.sh +--- glibc-2.13.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 ++++ glibc-2.13/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,9 +24,12 @@ + status=0 + trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ + LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${common_objpfx}malloc/tst-mtrace || status=1 + + if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then +diff -durN glibc-2.13.orig/nptl/tst-tls6.sh glibc-2.13/nptl/tst-tls6.sh +--- glibc-2.13.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 ++++ glibc-2.13/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -5,8 +5,8 @@ + rtld_installed_name=$1; shift + logfile=$common_objpfx/nptl/tst-tls6.out + +-# We have to find libc and nptl +-library_path=${common_objpfx}:${common_objpfx}nptl ++# We have to find libc and nptl (also libdl in case sandbox is in use) ++library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn + tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}/nptl/tst-tls5" + +diff -durN glibc-2.13.orig/posix/globtest.sh glibc-2.13/posix/globtest.sh +--- glibc-2.13.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 ++++ glibc-2.13/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -18,7 +18,7 @@ + esac + + # We have to find the libc and the NSS modules. +-library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod ++library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn + + # Since we use `sort' we must make sure to use the same locale everywhere. + LC_ALL=C +diff -durN glibc-2.13.orig/posix/tst-getconf.sh glibc-2.13/posix/tst-getconf.sh +--- glibc-2.13.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 ++++ glibc-2.13/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -10,7 +10,10 @@ + else + rtld_installed_name=$1; shift + runit() { +- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" ++ ++ # make sure libdl is also in path in case sandbox is in use ++ library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" + } + fi + +diff -durN glibc-2.13.orig/posix/wordexp-tst.sh glibc-2.13/posix/wordexp-tst.sh +--- glibc-2.13.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 ++++ glibc-2.13/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -19,8 +19,11 @@ + " + export IFS + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + failed=0 +-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ ++${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 + cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 + wordexp returned 0 diff --git a/packages/glibc/2.14/380-dont-build-timezone.patch b/packages/glibc/2.14/380-dont-build-timezone.patch new file mode 100644 index 0000000..11c358e --- /dev/null +++ b/packages/glibc/2.14/380-dont-build-timezone.patch @@ -0,0 +1,14 @@ +timezone data has been split into the package sys-libs/timezone-data + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 ++++ glibc-2.13/Makeconfig 2009-11-13 00:50:41.000000000 +0100 +@@ -944,7 +944,7 @@ + stdlib stdio-common libio malloc string wcsmbs time dirent \ + grp pwd posix io termios resource misc socket sysvipc gmon \ + gnulib iconv iconvdata wctype manual shadow gshadow po argp \ +- crypt nss localedata timezone rt conform debug \ ++ crypt nss localedata rt conform debug \ + $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) + + ifndef avoid-generated diff --git a/packages/glibc/2.14/400-alpha-xstat.patch b/packages/glibc/2.14/400-alpha-xstat.patch new file mode 100644 index 0000000..6e4ab8f --- /dev/null +++ b/packages/glibc/2.14/400-alpha-xstat.patch @@ -0,0 +1,15 @@ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 +@@ -386,6 +386,11 @@ + # define __ASSUME_GETDENTS32_D_TYPE 1 + #endif + ++/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ ++#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ ++# define __ASSUME_STAT64_SYSCALL 1 ++#endif ++ + /* Starting with version 2.5.3, the initial location returned by `brk' + after exec is always rounded up to the next page. */ + #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/packages/glibc/2.14/430-alpha-creat.patch b/packages/glibc/2.14/430-alpha-creat.patch new file mode 100644 index 0000000..da6ddda --- /dev/null +++ b/packages/glibc/2.14/430-alpha-creat.patch @@ -0,0 +1,14 @@ +alpha does not have a __NR_creat + +http://bugs.gentoo.org/227275 +http://sourceware.org/bugzilla/show_bug.cgi?id=6650 + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 +@@ -1 +1,5 @@ + /* Defined as alias for the syscall. */ ++#include ++#ifndef __NR_creat ++#include "../../../../../io/creat64.c" ++#endif diff --git a/packages/glibc/2.14/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc/2.14/490-alpha_alpha-add-fdatasync-support.patch new file mode 100644 index 0000000..372f34c --- /dev/null +++ b/packages/glibc/2.14/490-alpha_alpha-add-fdatasync-support.patch @@ -0,0 +1,126 @@ +2009-07-25 Aurelien Jarno + + * sysdeps/unix/sysv/linux/kernel-features.h: define + __ASSUME_FDATASYNC. + * sysdeps/unix/sysv/linux/fdatasync.c: New file. + * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with + -fexceptions. + * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. + + sysdeps/unix/sysv/linux/Makefile | 1 + sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ + sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ + sysdeps/unix/sysv/linux/syscalls.list | 1 + 4 files changed, 76 insertions(+), 1 deletion(-) + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.13/sysdeps/unix/sysv/linux/Makefile +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 +@@ -20,6 +20,7 @@ + setfsuid setfsgid makedev epoll_pwait signalfd \ + eventfd eventfd_read eventfd_write prlimit + ++CFLAGS-fdatasync.c = -fexceptions + CFLAGS-gethostid.c = -fexceptions + + sysdep_headers += sys/mount.h sys/acct.h sys/sysctl.h \ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 +@@ -0,0 +1,69 @@ ++/* fdatasync -- synchronize at least the data part of a file with ++ the underlying media. Linux version. ++ ++ Copyright (C) 2007 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC ++static int __have_no_fdatasync; ++#endif ++ ++static int ++do_fdatasync (int fd) ++{ ++#ifdef __ASSUME_FDATASYNC ++ return INLINE_SYSCALL (fdatasync, 1, fd); ++#elif defined __NR_fdatasync ++ if (!__builtin_expect (__have_no_fdatasync, 0)) ++ { ++ int result = INLINE_SYSCALL (fdatasync, 1, fd); ++ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) ++ return result; ++ ++ __have_no_fdatasync = 1; ++ } ++#endif ++ return INLINE_SYSCALL (fsync, 1, fd); ++} ++ ++int ++__fdatasync (int fd) ++{ ++ if (SINGLE_THREAD_P) ++ return do_fdatasync (fd); ++ ++ int oldtype = LIBC_CANCEL_ASYNC (); ++ ++ int result = do_fdatasync (fd); ++ ++ LIBC_CANCEL_RESET (oldtype); ++ ++ return result; ++} ++ ++weak_alias (__fdatasync, fdatasync) ++ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 +@@ -459,6 +459,12 @@ + # define __ASSUME_FUTEX_LOCK_PI 1 + #endif + ++/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it ++ was already present in 2.0 kernels on other architectures. */ ++#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) ++# define __ASSUME_FDATASYNC 1 ++#endif ++ + /* Support for utimensat syscall was added in 2.6.22, on SH + only after 2.6.22-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020616 \ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 +@@ -11,7 +11,6 @@ + epoll_create1 EXTRA epoll_create1 i:i epoll_create1 + epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl + epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait +-fdatasync - fdatasync Ci:i fdatasync + flock - flock i:ii __flock flock + fork - fork i: __libc_fork __fork fork + get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/packages/glibc/2.14/560-ppc-atomic.patch b/packages/glibc/2.14/560-ppc-atomic.patch new file mode 100644 index 0000000..ee1cb90 --- /dev/null +++ b/packages/glibc/2.14/560-ppc-atomic.patch @@ -0,0 +1,415 @@ +sniped from suse + +Index: sysdeps/powerpc/bits/atomic.h +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v +retrieving revision 1.17 +diff -u -a -p -r1.17 atomic.h + +diff -durN glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h glibc-2.13/sysdeps/powerpc/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -85,14 +85,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -102,14 +102,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -118,12 +118,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -132,11 +132,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -144,12 +144,12 @@ + #define __arch_atomic_exchange_and_add_32(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stwcx. %1,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -157,12 +157,12 @@ + #define __arch_atomic_increment_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -170,27 +170,27 @@ + #define __arch_atomic_decrement_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_32(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ + " cmpwi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stwcx. %1,0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -60,14 +60,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp, __tmp2; \ + __asm __volatile (" clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -61,14 +61,14 @@ + unsigned int __tmp, __tmp2; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ + " clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -82,14 +82,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -98,14 +98,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -115,14 +115,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -132,14 +132,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -148,12 +148,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -162,11 +162,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -174,12 +174,12 @@ + #define __arch_atomic_exchange_and_add_64(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stdcx. %1,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -187,12 +187,12 @@ + #define __arch_atomic_increment_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -200,27 +200,27 @@ + #define __arch_atomic_decrement_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_64(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ + " cmpdi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stdcx. %1,0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) diff --git a/packages/glibc/2.14/630-mips_shn_undef-hack.patch b/packages/glibc/2.14/630-mips_shn_undef-hack.patch new file mode 100644 index 0000000..791d76c --- /dev/null +++ b/packages/glibc/2.14/630-mips_shn_undef-hack.patch @@ -0,0 +1,16 @@ +diff -durN glibc-2.13.orig/elf/dl-lookup.c glibc-2.13/elf/dl-lookup.c +--- glibc-2.13.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 ++++ glibc-2.13/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 +@@ -301,6 +301,12 @@ + /* FALLTHROUGH */ + case STB_GLOBAL: + success: ++#ifdef __mips__ ++ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF ++ symbols, we skip them. */ ++ if (sym->st_shndx == SHN_UNDEF) ++ break; ++#endif + /* Global definition. Just what we need. */ + result->s = sym; + result->m = (struct link_map *) map; diff --git a/packages/glibc/2.14/640-alpha-atfcts.patch b/packages/glibc/2.14/640-alpha-atfcts.patch new file mode 100644 index 0000000..7a8a94a --- /dev/null +++ b/packages/glibc/2.14/640-alpha-atfcts.patch @@ -0,0 +1,12 @@ +--- glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 +@@ -437,7 +437,8 @@ + the code. On PPC they were introduced in 2.6.17-rc1, + on SH in 2.6.19-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020611 \ +- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) ++ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ ++ && (!defined __alpha__) + # define __ASSUME_ATFCTS 1 + #endif + diff --git a/packages/glibc/2.14/650-syslog.patch b/packages/glibc/2.14/650-syslog.patch new file mode 100644 index 0000000..c20cafc --- /dev/null +++ b/packages/glibc/2.14/650-syslog.patch @@ -0,0 +1,12 @@ +diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c +--- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 ++++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 +@@ -152,7 +152,7 @@ + #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID + /* Check for invalid bits. */ + if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { +- syslog(INTERNALLOG, ++ __syslog(INTERNALLOG, + "syslog: unknown facility/priority: %x", pri); + pri &= LOG_PRIMASK|LOG_FACMASK; + } diff --git a/packages/glibc/2.14/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc/2.14/660-debug-readlink_chk-readklinkat_chk.patch new file mode 100644 index 0000000..a5a7052 --- /dev/null +++ b/packages/glibc/2.14/660-debug-readlink_chk-readklinkat_chk.patch @@ -0,0 +1,24 @@ +diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c +--- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 ++++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 +@@ -25,7 +25,7 @@ + + + ssize_t +-__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) ++__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) + { + if (len > buflen) + __chk_fail (); +diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c +--- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 ++++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 +@@ -21,7 +21,7 @@ + + + ssize_t +-__readlinkat_chk (int fd, const char *path, void *buf, size_t len, ++__readlinkat_chk (int fd, const char *path, char *buf, size_t len, + size_t buflen) + { + if (len > buflen) diff --git a/packages/glibc/2.15/100-respect-env-CPPFLAGS.patch b/packages/glibc/2.15/100-respect-env-CPPFLAGS.patch new file mode 100644 index 0000000..3798cb2 --- /dev/null +++ b/packages/glibc/2.15/100-respect-env-CPPFLAGS.patch @@ -0,0 +1,14 @@ +Respect environment CPPFLAGS when we run ./configure so we can inject +random -D things without having to set CFLAGS/ASFLAGS + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 ++++ glibc-2.13/Makeconfig 2009-11-13 00:49:41.000000000 +0100 +@@ -697,6 +697,7 @@ + $(foreach lib,$(libof-$(basename $(@F))) \ + $(libof-$(field.le_next)) + ++#define LIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = LIST_FIRST((head)); \ ++ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + /* + * List access methods. + */ +@@ -197,6 +202,16 @@ + #define SLIST_FOREACH(var, head, field) \ + for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) + ++#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = SLIST_FIRST((head)); \ ++ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ ++#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ ++ for ((varp) = &SLIST_FIRST((head)); \ ++ ((var) = *(varp)) != NULL; \ ++ (varp) = &SLIST_NEXT((var), field)) ++ + /* + * Singly-linked List access methods. + */ +@@ -242,6 +257,12 @@ + (head)->stqh_last = &(elm)->field.stqe_next; \ + } while (/*CONSTCOND*/0) + ++#define STAILQ_LAST(head, type, field) \ ++ (STAILQ_EMPTY((head)) ? \ ++ NULL : \ ++ ((struct type *)(void *) \ ++ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) ++ + #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ + if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ + (head)->stqh_last = &(elm)->field.stqe_next; \ +@@ -271,6 +292,11 @@ + (var); \ + (var) = ((var)->field.stqe_next)) + ++#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = STAILQ_FIRST((head)); \ ++ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define STAILQ_CONCAT(head1, head2) do { \ + if (!STAILQ_EMPTY((head2))) { \ + *(head1)->stqh_last = (head2)->stqh_first; \ +@@ -437,11 +463,21 @@ + (var); \ + (var) = ((var)->field.tqe_next)) + ++#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = TAILQ_FIRST((head)); \ ++ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ + for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ + (var); \ + (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) + ++#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ ++ for ((var) = TAILQ_LAST((head), headname); \ ++ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_CONCAT(head1, head2, field) do { \ + if (!TAILQ_EMPTY(head2)) { \ + *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/packages/glibc/2.15/160-manual-no-perl.patch b/packages/glibc/2.15/160-manual-no-perl.patch new file mode 100644 index 0000000..5e2b807 --- /dev/null +++ b/packages/glibc/2.15/160-manual-no-perl.patch @@ -0,0 +1,24 @@ +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.13.orig/manual/Makefile glibc-2.13/manual/Makefile +--- glibc-2.13.orig/manual/Makefile 2006-01-08 07:43:47.000000000 +0100 ++++ glibc-2.13/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/packages/glibc/2.15/170-localedef-fix-trampoline.patch b/packages/glibc/2.15/170-localedef-fix-trampoline.patch new file mode 100644 index 0000000..3cc6559 --- /dev/null +++ b/packages/glibc/2.15/170-localedef-fix-trampoline.patch @@ -0,0 +1,53 @@ +# DP: Description: Fix localedef segfault when run under exec-shield, +# PaX or similar. (#231438, #198099) +# DP: Dpatch Author: James Troup +# DP: Patch Author: (probably) Jakub Jelinek +# DP: Upstream status: Unknown +# DP: Status Details: Unknown +# DP: Date: 2004-03-16 +diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h +--- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 ++++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 +@@ -203,6 +203,42 @@ + } + } + } ++ ++/* GCC ATM seems to do a poor job with pointers to nested functions passed ++ to inlined functions. Help it a little bit with this hack. */ ++#define wchead_table_iterate(tp, fn) \ ++do \ ++ { \ ++ struct wchead_table *t = (tp); \ ++ uint32_t index1; \ ++ for (index1 = 0; index1 < t->level1_size; index1++) \ ++ { \ ++ uint32_t lookup1 = t->level1[index1]; \ ++ if (lookup1 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup1_shifted = lookup1 << t->q; \ ++ uint32_t index2; \ ++ for (index2 = 0; index2 < (1 << t->q); index2++) \ ++ { \ ++ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ ++ if (lookup2 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup2_shifted = lookup2 << t->p; \ ++ uint32_t index3; \ ++ for (index3 = 0; index3 < (1 << t->p); index3++) \ ++ { \ ++ struct element_t *lookup3 \ ++ = t->level3[index3 + lookup2_shifted]; \ ++ if (lookup3 != NULL) \ ++ fn ((((index1 << t->q) + index2) << t->p) + index3, \ ++ lookup3); \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } while (0) ++ + #endif + + #ifndef NO_FINALIZE diff --git a/packages/glibc/2.15/180-resolv-dynamic.patch b/packages/glibc/2.15/180-resolv-dynamic.patch new file mode 100644 index 0000000..e916bce --- /dev/null +++ b/packages/glibc/2.15/180-resolv-dynamic.patch @@ -0,0 +1,39 @@ +ripped from SuSE + +if /etc/resolv.conf is updated, then make sure applications +already running get the updated information. + +http://bugs.gentoo.org/177416 + +diff -durN glibc-2.13.orig/resolv/res_libc.c glibc-2.13/resolv/res_libc.c +--- glibc-2.13.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 ++++ glibc-2.13/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + + /* The following bit is copied from res_data.c (where it is #ifdef'ed +@@ -95,6 +96,20 @@ + __res_maybe_init (res_state resp, int preinit) + { + if (resp->options & RES_INIT) { ++ static time_t last_mtime, last_check; ++ time_t now; ++ struct stat statbuf; ++ ++ time (&now); ++ if (now != last_check) { ++ last_check = now; ++ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { ++ last_mtime = statbuf.st_mtime; ++ atomicinclock (lock); ++ atomicinc (__res_initstamp); ++ atomicincunlock (lock); ++ } ++ } + if (__res_initstamp != resp->_u._ext.initstamp) { + if (resp->nscount > 0) + __res_iclose (resp, true); diff --git a/packages/glibc/2.15/200-fadvise64_64.patch b/packages/glibc/2.15/200-fadvise64_64.patch new file mode 100644 index 0000000..71bca38 --- /dev/null +++ b/packages/glibc/2.15/200-fadvise64_64.patch @@ -0,0 +1,28 @@ +ripped from Debian + + sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 +@@ -35,6 +35,19 @@ + return INTERNAL_SYSCALL_ERRNO (ret, err); + return 0; + #else ++# ifdef __NR_fadvise64_64 ++ INTERNAL_SYSCALL_DECL (err); ++ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, ++ __LONG_LONG_PAIR ((long) (offset >> 31), ++ (long) offset), ++ __LONG_LONG_PAIR ((long) (len >> 31), ++ (long) len), ++ advise); ++ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) ++ return INTERNAL_SYSCALL_ERRNO (ret, err); ++ return 0; ++# else + return ENOSYS; ++# endif + #endif + } diff --git a/packages/glibc/2.15/220-section-comments.patch b/packages/glibc/2.15/220-section-comments.patch new file mode 100644 index 0000000..d717829 --- /dev/null +++ b/packages/glibc/2.15/220-section-comments.patch @@ -0,0 +1,24 @@ +http://sources.redhat.com/ml/binutils/2004-04/msg00665.html + +fixes building on some architectures (like m68k/arm/cris/etc...) because +it does the right thing + +diff -durN glibc-2.13.orig/include/libc-symbols.h glibc-2.13/include/libc-symbols.h +--- glibc-2.13.orig/include/libc-symbols.h 2009-03-14 00:51:46.000000000 +0100 ++++ glibc-2.13/include/libc-symbols.h 2009-11-13 00:50:07.000000000 +0100 +@@ -239,12 +239,12 @@ + # define __make_section_unallocated(section_string) + # endif + +-/* Tacking on "\n\t#" to the section name makes gcc put it's bogus ++/* Tacking on "\n#APP\n\t#" to the section name makes gcc put it's bogus + section attributes on what looks like a comment to the assembler. */ + # ifdef HAVE_SECTION_QUOTES +-# define __sec_comment "\"\n\t#\"" ++# define __sec_comment "\"\n#APP\n\t#\"" + # else +-# define __sec_comment "\n\t#" ++# define __sec_comment "\n#APP\n\t#" + # endif + # define link_warning(symbol, msg) \ + __make_section_unallocated (".gnu.warning." #symbol) \ diff --git a/packages/glibc/2.15/230-no-inline-gmon.patch b/packages/glibc/2.15/230-no-inline-gmon.patch new file mode 100644 index 0000000..fa33c2b --- /dev/null +++ b/packages/glibc/2.15/230-no-inline-gmon.patch @@ -0,0 +1,36 @@ +http://bugs.gentoo.org/196245 +http://sourceware.org/ml/libc-alpha/2006-05/msg00017.html + +Attached is a patch to add __attribute__ ((noinline)) to +call_gmon_start. + +Without this patch, the sec script that processed initfini.s removes a +part of inlined call_gmon_start, causing undefined label errors. + +This patch solves the problem by forcing gcc not to inline +call_gmon_start with __attribute__ ((noinline)). + +Tested by building for arm-none-lixux-gnueabi. OK to apply? + +Kazu Hirata + +2006-05-07 Kazu Hirata <kazu@codesourcery.com> + + * sysdeps/generic/initfini.c (call_gmon_start): Add + __attribute__ ((noinline)). + +Index: sysdeps/generic/initfini.c +=================================================================== + +diff -durN glibc-2.13.orig/sysdeps/generic/initfini.c glibc-2.13/sysdeps/generic/initfini.c +--- glibc-2.13.orig/sysdeps/generic/initfini.c 2007-06-17 20:02:40.000000000 +0200 ++++ glibc-2.13/sysdeps/generic/initfini.c 2009-11-13 00:50:09.000000000 +0100 +@@ -70,7 +70,7 @@ + /* The beginning of _init: */ + asm ("\n/*@_init_PROLOG_BEGINS*/"); + +-static void ++static void __attribute__ ((noinline)) + call_gmon_start(void) + { + extern void __gmon_start__ (void) __attribute__ ((weak)); /*weak_extern (__gmon_start__);*/ diff --git a/packages/glibc/2.15/260-assume-pipe2.patch b/packages/glibc/2.15/260-assume-pipe2.patch new file mode 100644 index 0000000..42e8f4e --- /dev/null +++ b/packages/glibc/2.15/260-assume-pipe2.patch @@ -0,0 +1,40 @@ +http://bugs.gentoo.org/250342 +http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 + +we cant assume sock_cloexec and pipe2 are bound together as the former defines +are found in glibc only while the latter are a combo of kernel headers and +glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub +inside of glibc, we hit a problem. for example: + +#include +#include +main() +{ + getgrnam("portage"); + if (!popen("ls", "r")) + perror("popen()"); +} + +getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both +__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against +older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS +stub for it. so popen() will always fail as glibc assumes pipe2() works. + +diff -durN glibc-2.13.orig/socket/have_sock_cloexec.c glibc-2.13/socket/have_sock_cloexec.c +--- glibc-2.13.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 ++++ glibc-2.13/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 +@@ -16,9 +16,14 @@ + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + ++#include + #include + #include + + #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC + int __have_sock_cloexec; + #endif ++ ++#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 ++int __have_pipe2; ++#endif diff --git a/packages/glibc/2.15/270-china.patch b/packages/glibc/2.15/270-china.patch new file mode 100644 index 0000000..41d7759 --- /dev/null +++ b/packages/glibc/2.15/270-china.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.13.orig/localedata/locales/zh_TW glibc-2.13/localedata/locales/zh_TW +--- glibc-2.13.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 ++++ glibc-2.13/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 +@@ -1,7 +1,7 @@ + comment_char % + escape_char / + % +-% Chinese language locale for Taiwan R.O.C. ++% Chinese language locale for Taiwan + % charmap: BIG5-CP950 + % + % Original Author: +@@ -17,7 +17,7 @@ + % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf + + LC_IDENTIFICATION +-title "Chinese locale for Taiwan R.O.C." ++title "Chinese locale for Taiwan" + source "" + address "" + contact "" +@@ -25,7 +25,7 @@ + tel "" + fax "" + language "Chinese" +-territory "Taiwan R.O.C." ++territory "Taiwan" + revision "0.2" + date "2000-08-02" + % diff --git a/packages/glibc/2.15/280-new-valencian-locale.patch b/packages/glibc/2.15/280-new-valencian-locale.patch new file mode 100644 index 0000000..4cdd108 --- /dev/null +++ b/packages/glibc/2.15/280-new-valencian-locale.patch @@ -0,0 +1,115 @@ +http://bugs.gentoo.org/show_bug.cgi?id=131815 +http://sourceware.org/bugzilla/show_bug.cgi?id=2522 + +diff -durN glibc-2.13.orig/localedata/SUPPORTED glibc-2.13/localedata/SUPPORTED +--- glibc-2.13.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 ++++ glibc-2.13/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 +@@ -72,6 +72,8 @@ + ca_ES.UTF-8/UTF-8 \ + ca_ES/ISO-8859-1 \ + ca_ES@euro/ISO-8859-15 \ ++ca_ES.UTF-8@valencia/UTF-8 \ ++ca_ES@valencia/ISO-8859-15 \ + ca_FR.UTF-8/UTF-8 \ + ca_FR/ISO-8859-15 \ + ca_IT.UTF-8/UTF-8 \ +diff -durN glibc-2.13.orig/localedata/locales/ca_ES@valencia glibc-2.13/localedata/locales/ca_ES@valencia +--- glibc-2.13.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.13/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 +@@ -0,0 +1,96 @@ ++comment_char % ++escape_char / ++% ++% Valencian (southern Catalan) locale for Spain with Euro ++% ++% Note that this locale is almost the same as ca_ES@euro. The point of having ++% a separate locale is only for PO translations, which have a lot of social ++% support and are very appreciated by the Valencian-speaking community. ++% ++% Contact: Jordi Mallach ++% Email: jordi@gnu.org ++% Tel: ++% Fax: ++% Language: ca ++% Territory: ES ++% Option: euro ++% Revision: 1.0 ++% Date: 2006-04-06 ++% Application: general ++% Users: general ++% Repertoiremap: mnemonic,ds ++% Charset: ISO-8859-15 ++% Distribution and use is free, also ++% for commercial purposes. ++ ++LC_IDENTIFICATION ++title "Valencian (southern Catalan) locale for Spain with Euro" ++source "" ++address "" ++contact "Jordi Mallach" ++email "jordi@gnu.org" ++tel "" ++fax "" ++language "Catalan" ++territory "Spain" ++revision "1.0" ++date "2006-04-06" ++% ++category "ca_ES@valencia:2006";LC_IDENTIFICATION ++category "ca_ES@valencia:2006";LC_CTYPE ++category "ca_ES@valencia:2006";LC_COLLATE ++category "ca_ES@valencia:2006";LC_MONETARY ++category "ca_ES@valencia:2006";LC_NUMERIC ++category "ca_ES@valencia:2006";LC_TIME ++category "ca_ES@valencia:2006";LC_MESSAGES ++category "ca_ES@valencia:2006";LC_PAPER ++category "ca_ES@valencia:2006";LC_NAME ++category "ca_ES@valencia:2006";LC_ADDRESS ++category "ca_ES@valencia:2006";LC_TELEPHONE ++category "ca_ES@valencia:2006";LC_MEASUREMENT ++ ++END LC_IDENTIFICATION ++ ++LC_CTYPE ++copy "i18n" ++END LC_CTYPE ++ ++LC_COLLATE ++copy "ca_ES" ++END LC_COLLATE ++ ++LC_MONETARY ++copy "ca_ES" ++END LC_MONETARY ++ ++LC_NUMERIC ++copy "ca_ES" ++END LC_NUMERIC ++ ++LC_TIME ++copy "ca_ES" ++END LC_TIME ++ ++LC_MESSAGES ++copy "ca_ES" ++END LC_MESSAGES ++ ++LC_PAPER ++copy "ca_ES" ++END LC_PAPER ++ ++LC_NAME ++copy "ca_ES" ++END LC_NAME ++ ++LC_ADDRESS ++copy "ca_ES" ++END LC_ADDRESS ++ ++LC_TELEPHONE ++copy "ca_ES" ++END LC_TELEPHONE ++ ++LC_MEASUREMENT ++copy "ca_ES" ++END LC_MEASUREMENT diff --git a/packages/glibc/2.15/300-nscd-one-fork.patch b/packages/glibc/2.15/300-nscd-one-fork.patch new file mode 100644 index 0000000..adc9b3f --- /dev/null +++ b/packages/glibc/2.15/300-nscd-one-fork.patch @@ -0,0 +1,40 @@ +only fork one to assist in stop-start-daemon assumptions about daemon behavior + +http://bugs.gentoo.org/190785 + +diff -durN glibc-2.13.orig/nscd/nscd.c glibc-2.13/nscd/nscd.c +--- glibc-2.13.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 ++++ glibc-2.13/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 +@@ -182,6 +182,9 @@ + if (pid != 0) + exit (0); + ++ if (write_pid (_PATH_NSCDPID) < 0) ++ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); ++ + int nullfd = open (_PATH_DEVNULL, O_RDWR); + if (nullfd != -1) + { +@@ -231,12 +234,6 @@ + for (i = min_close_fd; i < getdtablesize (); i++) + close (i); + +- pid = fork (); +- if (pid == -1) +- error (EXIT_FAILURE, errno, _("cannot fork")); +- if (pid != 0) +- exit (0); +- + setsid (); + + if (chdir ("/") != 0) +@@ -245,9 +242,6 @@ + + openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); + +- if (write_pid (_PATH_NSCDPID) < 0) +- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); +- + if (!init_logfile ()) + dbg_log (_("Could not create log file")); + diff --git a/packages/glibc/2.15/310-hppa-nptl-carlos.patch b/packages/glibc/2.15/310-hppa-nptl-carlos.patch new file mode 100644 index 0000000..4c028b2 --- /dev/null +++ b/packages/glibc/2.15/310-hppa-nptl-carlos.patch @@ -0,0 +1,246 @@ + + +diff -durN glibc-2.13.orig/elf/rtld.c glibc-2.13/elf/rtld.c +--- glibc-2.13.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 ++++ glibc-2.13/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 +@@ -392,14 +392,14 @@ + know it is available. We do not have to clear the memory if we + do not have to use the temporary bootstrap_map. Global variables + are initialized to zero by default. */ +-#ifndef DONT_USE_BOOTSTRAP_MAP ++#if !defined DONT_USE_BOOTSTRAP_MAP + # ifdef HAVE_BUILTIN_MEMSET + __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); + # else +- for (size_t cnt = 0; +- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); +- ++cnt) +- bootstrap_map.l_info[cnt] = 0; ++ /* Clear the whole bootstrap_map structure */ ++ for (char *cnt = (char *)&(bootstrap_map); ++ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); ++ *cnt++ = '\0'); + # endif + # if USE___THREAD + bootstrap_map.l_tls_modid = 0; +diff -durN glibc-2.13.orig/include/atomic.h glibc-2.13/include/atomic.h +--- glibc-2.13.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 ++++ glibc-2.13/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 +@@ -185,7 +185,7 @@ + __typeof (*(mem)) __atg5_value = (newvalue); \ + \ + do \ +- __atg5_oldval = *__atg5_memp; \ ++ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ + __atg5_oldval), 0)); \ +@@ -206,7 +206,7 @@ + __typeof (*(mem)) __atg6_value = (value); \ + \ + do \ +- __atg6_oldval = *__atg6_memp; \ ++ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ + __atg6_oldval \ +@@ -224,7 +224,7 @@ + __typeof (*(mem)) __atg7_value = (value); \ + \ + do \ +- __atg7_oldv = *__atg7_memp; \ ++ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ + __atg7_oldv \ +@@ -242,7 +242,7 @@ + __typeof (mem) __atg8_memp = (mem); \ + __typeof (*(mem)) __atg8_value = (value); \ + do { \ +- __atg8_oldval = *__atg8_memp; \ ++ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ + if (__atg8_oldval >= __atg8_value) \ + break; \ + } while (__builtin_expect \ +@@ -259,7 +259,7 @@ + __typeof (mem) __atg9_memp = (mem); \ + __typeof (*(mem)) __atg9_value = (value); \ + do { \ +- __atg9_oldv = *__atg9_memp; \ ++ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ + if (__atg9_oldv >= __atg9_value) \ + break; \ + } while (__builtin_expect \ +@@ -277,7 +277,7 @@ + __typeof (mem) __atg10_memp = (mem); \ + __typeof (*(mem)) __atg10_value = (value); \ + do { \ +- __atg10_oldval = *__atg10_memp; \ ++ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ + if (__atg10_oldval <= __atg10_value) \ + break; \ + } while (__builtin_expect \ +@@ -361,7 +361,7 @@ + \ + do \ + { \ +- __atg11_oldval = *__atg11_memp; \ ++ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ + if (__builtin_expect (__atg11_oldval <= 0, 0)) \ + break; \ + } \ +@@ -400,7 +400,7 @@ + __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ + \ + do \ +- __atg14_old = (*__atg14_memp); \ ++ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ + __atg14_old | __atg14_mask,\ +@@ -418,7 +418,7 @@ + __typeof (*(mem)) __atg15_mask = (mask); \ + \ + do \ +- __atg15_old = (*__atg15_memp); \ ++ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ + __atg15_old & __atg15_mask, \ +@@ -450,7 +450,7 @@ + __typeof (*(mem)) __atg16_mask = (mask); \ + \ + do \ +- __atg16_old = (*__atg16_memp); \ ++ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ + __atg16_old & __atg16_mask,\ +@@ -468,7 +468,7 @@ + __typeof (*(mem)) __atg17_mask = (mask); \ + \ + do \ +- __atg17_old = (*__atg17_memp); \ ++ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ + __atg17_old | __atg17_mask, \ +@@ -484,7 +484,7 @@ + __typeof (*(mem)) __atg18_mask = (mask); \ + \ + do \ +- __atg18_old = (*__atg18_memp); \ ++ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ + __atg18_old | __atg18_mask,\ +@@ -500,7 +500,7 @@ + __typeof (*(mem)) __atg19_mask = (mask); \ + \ + do \ +- __atg19_old = (*__atg19_memp); \ ++ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ + __atg19_old | __atg19_mask,\ +diff -durN glibc-2.13.orig/nptl/Makefile glibc-2.13/nptl/Makefile +--- glibc-2.13.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 ++++ glibc-2.13/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -265,9 +265,9 @@ + # Files which must not be linked with libpthread. + tests-nolibpthread = tst-unload + +-# This sets the stack resource limit to 1023kb, which is not a multiple +-# of the page size since every architecture's page size is > 1k. +-tst-oddstacklimit-ENV = ; ulimit -s 1023; ++# This sets the stack resource limit to 8193kb, which is not a multiple ++# of the page size since every architecture's page size is 4096 bytes. ++tst-oddstacklimit-ENV = ; ulimit -s 8193; + + distribute = eintr.c tst-cleanup4aux.c + +@@ -426,6 +426,35 @@ + CFLAGS-tst-cleanupx4.c += -fexceptions + CFLAGS-tst-oncex3.c += -fexceptions + CFLAGS-tst-oncex4.c += -fexceptions ++ ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed ++LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) ++ + CFLAGS-tst-align.c += $(stack-align-test-flags) + CFLAGS-tst-align3.c += $(stack-align-test-flags) + CFLAGS-tst-initializers1.c = -W -Wall -Werror +diff -durN glibc-2.13.orig/nptl/pthread_barrier_wait.c glibc-2.13/nptl/pthread_barrier_wait.c +--- glibc-2.13.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 ++++ glibc-2.13/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 +@@ -64,7 +64,7 @@ + do + lll_futex_wait (&ibarrier->curr_event, event, + ibarrier->private ^ FUTEX_PRIVATE_FLAG); +- while (event == ibarrier->curr_event); ++ while (event == *(volatile unsigned int *)&ibarrier->curr_event); + } + + /* Make sure the init_count is stored locally or in a register. */ +diff -durN glibc-2.13.orig/nptl/sysdeps/pthread/Makefile glibc-2.13/nptl/sysdeps/pthread/Makefile +--- glibc-2.13.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 ++++ glibc-2.13/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -33,7 +33,9 @@ + + ifeq ($(have-forced-unwind),yes) + tests += tst-mqueue8x ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed + CFLAGS-tst-mqueue8x.c += -fexceptions ++LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) + endif + endif + +diff -durN glibc-2.13.orig/stdio-common/Makefile glibc-2.13/stdio-common/Makefile +--- glibc-2.13.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 ++++ glibc-2.13/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -82,7 +82,7 @@ + $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' + endif + +-CFLAGS-vfprintf.c = -Wno-uninitialized ++CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch + CFLAGS-vfwprintf.c = -Wno-uninitialized + CFLAGS-tst-printf.c = -Wno-format + CFLAGS-tstdiomisc.c = -Wno-format +diff -durN glibc-2.13.orig/sunrpc/clnt_udp.c glibc-2.13/sunrpc/clnt_udp.c +--- glibc-2.13.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 ++++ glibc-2.13/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 +@@ -456,7 +456,7 @@ + while (inlen < 0 && errno == EINTR); + if (inlen < 0) + { +- if (errno == EWOULDBLOCK) ++ if (errno == EWOULDBLOCK || errno == EAGAIN) + continue; + cu->cu_error.re_errno = errno; + return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/packages/glibc/2.15/340-dl_execstack-PaX-support.patch b/packages/glibc/2.15/340-dl_execstack-PaX-support.patch new file mode 100644 index 0000000..2402af0 --- /dev/null +++ b/packages/glibc/2.15/340-dl_execstack-PaX-support.patch @@ -0,0 +1,66 @@ + With latest versions of glibc, a lot of apps failed on a PaX enabled + system with: + cannot enable executable stack as shared object requires: Permission denied + + This is due to PaX 'exec-protecting' the stack, and ld.so then trying + to make the stack executable due to some libraries not containing the + PT_GNU_STACK section. Bug #32960. (12 Nov 2003). + + Patch also NPTL. Bug #116086. (20 Dec 2005). + +diff -durN glibc-2.13.orig/nptl/allocatestack.c glibc-2.13/nptl/allocatestack.c +--- glibc-2.13.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 ++++ glibc-2.13/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -329,7 +329,8 @@ + # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" + #endif + if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) +- return errno; ++ if (errno != EACCES) /* PAX is enabled */ ++ return errno; + + return 0; + } +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -63,7 +63,10 @@ + else + # endif + { +- result = errno; ++ if (errno == EACCES) /* PAX is enabled */ ++ result = 0; ++ else ++ result = errno; + goto out; + } + } +@@ -89,7 +92,12 @@ + page -= size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; +@@ -115,7 +123,12 @@ + page += size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; diff --git a/packages/glibc/2.15/350-pre20040117-pt_pax.patch b/packages/glibc/2.15/350-pre20040117-pt_pax.patch new file mode 100644 index 0000000..f8f6b83 --- /dev/null +++ b/packages/glibc/2.15/350-pre20040117-pt_pax.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.13.orig/elf/elf.h glibc-2.13/elf/elf.h +--- glibc-2.13.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 ++++ glibc-2.13/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 +@@ -580,6 +580,7 @@ + #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ + #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ + #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ ++#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ + #define PT_LOSUNW 0x6ffffffa + #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ + #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ +@@ -593,6 +594,18 @@ + #define PF_X (1 << 0) /* Segment is executable */ + #define PF_W (1 << 1) /* Segment is writable */ + #define PF_R (1 << 2) /* Segment is readable */ ++#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ ++#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ ++#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ ++#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ ++#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ ++#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ ++#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ ++#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ ++#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ ++#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ ++#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ ++#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ + #define PF_MASKOS 0x0ff00000 /* OS-specific */ + #define PF_MASKPROC 0xf0000000 /* Processor-specific */ + diff --git a/packages/glibc/2.15/360-tests-sandbox-libdl-paths.patch b/packages/glibc/2.15/360-tests-sandbox-libdl-paths.patch new file mode 100644 index 0000000..9f78c52 --- /dev/null +++ b/packages/glibc/2.15/360-tests-sandbox-libdl-paths.patch @@ -0,0 +1,193 @@ +when glibc runs its tests, it does so by invoking the local library loader. +in Gentoo, we build/run inside of our "sandbox" which itself is linked against +libdl (so that it can load libraries and pull out symbols). the trouble +is that when you upgrade from an older glibc to the new one, often times +internal symbols change name or abi. this is normally OK as you cannot use +libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so +we always say "keep all of the glibc libraries from the same build". but +when glibc runs its tests, it uses dynamic paths to point to its new local +copies of libraries. if the test doesnt use libdl, then glibc doesnt add +its path, and when sandbox triggers the loading of libdl, glibc does so +from the host system system. this gets us into the case of all libraries +are from the locally compiled version of glibc except for libdl.so. + +Fix by Wormo + +http://bugs.gentoo.org/56898 + +diff -durN glibc-2.13.orig/grp/tst_fgetgrent.sh glibc-2.13/grp/tst_fgetgrent.sh +--- glibc-2.13.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 ++++ glibc-2.13/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,7 +24,8 @@ + rtld_installed_name=$1; shift + + testout=${common_objpfx}/grp/tst_fgetgrent.out +-library_path=${common_objpfx} ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn + + result=0 + +diff -durN glibc-2.13.orig/iconvdata/run-iconv-test.sh glibc-2.13/iconvdata/run-iconv-test.sh +--- glibc-2.13.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 ++++ glibc-2.13/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -34,7 +34,7 @@ + export GCONV_PATH + + # We have to have some directories in the library path. +-LIBPATH=$codir:$codir/iconvdata ++LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn + + # How the start the iconv(1) program. + ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ +diff -durN glibc-2.13.orig/iconvdata/tst-table.sh glibc-2.13/iconvdata/tst-table.sh +--- glibc-2.13.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 ++++ glibc-2.13/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -59,8 +59,11 @@ + irreversible=${charset}.irreversible + fi + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # iconv in one direction. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-table-from ${charset} \ + > ${objpfx}tst-${charset}.table + +diff -durN glibc-2.13.orig/intl/tst-codeset.sh glibc-2.13/intl/tst-codeset.sh +--- glibc-2.13.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 ++++ glibc-2.13/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -37,6 +37,9 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + ${common_objpfx}elf/ld.so --library-path $common_objpfx \ + ${objpfx}tst-codeset > ${objpfx}tst-codeset.out + +diff -durN glibc-2.13.orig/intl/tst-gettext.sh glibc-2.13/intl/tst-gettext.sh +--- glibc-2.13.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 ++++ glibc-2.13/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -51,9 +51,12 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. + MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.13.orig/intl/tst-gettext2.sh glibc-2.13/intl/tst-gettext2.sh +--- glibc-2.13.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 ++++ glibc-2.13/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -65,8 +65,11 @@ + LOCPATH=${objpfx}domaindir + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && + cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.13.orig/malloc/tst-mtrace.sh glibc-2.13/malloc/tst-mtrace.sh +--- glibc-2.13.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 ++++ glibc-2.13/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,9 +24,12 @@ + status=0 + trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ + LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${common_objpfx}malloc/tst-mtrace || status=1 + + if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then +diff -durN glibc-2.13.orig/nptl/tst-tls6.sh glibc-2.13/nptl/tst-tls6.sh +--- glibc-2.13.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 ++++ glibc-2.13/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -5,8 +5,8 @@ + rtld_installed_name=$1; shift + logfile=$common_objpfx/nptl/tst-tls6.out + +-# We have to find libc and nptl +-library_path=${common_objpfx}:${common_objpfx}nptl ++# We have to find libc and nptl (also libdl in case sandbox is in use) ++library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn + tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}/nptl/tst-tls5" + +diff -durN glibc-2.13.orig/posix/globtest.sh glibc-2.13/posix/globtest.sh +--- glibc-2.13.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 ++++ glibc-2.13/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -18,7 +18,7 @@ + esac + + # We have to find the libc and the NSS modules. +-library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod ++library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn + + # Since we use `sort' we must make sure to use the same locale everywhere. + LC_ALL=C +diff -durN glibc-2.13.orig/posix/tst-getconf.sh glibc-2.13/posix/tst-getconf.sh +--- glibc-2.13.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 ++++ glibc-2.13/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -10,7 +10,10 @@ + else + rtld_installed_name=$1; shift + runit() { +- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" ++ ++ # make sure libdl is also in path in case sandbox is in use ++ library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" + } + fi + +diff -durN glibc-2.13.orig/posix/wordexp-tst.sh glibc-2.13/posix/wordexp-tst.sh +--- glibc-2.13.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 ++++ glibc-2.13/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -19,8 +19,11 @@ + " + export IFS + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + failed=0 +-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ ++${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 + cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 + wordexp returned 0 diff --git a/packages/glibc/2.15/380-dont-build-timezone.patch b/packages/glibc/2.15/380-dont-build-timezone.patch new file mode 100644 index 0000000..11c358e --- /dev/null +++ b/packages/glibc/2.15/380-dont-build-timezone.patch @@ -0,0 +1,14 @@ +timezone data has been split into the package sys-libs/timezone-data + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 ++++ glibc-2.13/Makeconfig 2009-11-13 00:50:41.000000000 +0100 +@@ -944,7 +944,7 @@ + stdlib stdio-common libio malloc string wcsmbs time dirent \ + grp pwd posix io termios resource misc socket sysvipc gmon \ + gnulib iconv iconvdata wctype manual shadow gshadow po argp \ +- crypt nss localedata timezone rt conform debug \ ++ crypt nss localedata rt conform debug \ + $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) + + ifndef avoid-generated diff --git a/packages/glibc/2.15/400-alpha-xstat.patch b/packages/glibc/2.15/400-alpha-xstat.patch new file mode 100644 index 0000000..6e4ab8f --- /dev/null +++ b/packages/glibc/2.15/400-alpha-xstat.patch @@ -0,0 +1,15 @@ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 +@@ -386,6 +386,11 @@ + # define __ASSUME_GETDENTS32_D_TYPE 1 + #endif + ++/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ ++#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ ++# define __ASSUME_STAT64_SYSCALL 1 ++#endif ++ + /* Starting with version 2.5.3, the initial location returned by `brk' + after exec is always rounded up to the next page. */ + #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/packages/glibc/2.15/430-alpha-creat.patch b/packages/glibc/2.15/430-alpha-creat.patch new file mode 100644 index 0000000..da6ddda --- /dev/null +++ b/packages/glibc/2.15/430-alpha-creat.patch @@ -0,0 +1,14 @@ +alpha does not have a __NR_creat + +http://bugs.gentoo.org/227275 +http://sourceware.org/bugzilla/show_bug.cgi?id=6650 + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 +@@ -1 +1,5 @@ + /* Defined as alias for the syscall. */ ++#include ++#ifndef __NR_creat ++#include "../../../../../io/creat64.c" ++#endif diff --git a/packages/glibc/2.15/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc/2.15/490-alpha_alpha-add-fdatasync-support.patch new file mode 100644 index 0000000..acf250d --- /dev/null +++ b/packages/glibc/2.15/490-alpha_alpha-add-fdatasync-support.patch @@ -0,0 +1,126 @@ +2009-07-25 Aurelien Jarno + + * sysdeps/unix/sysv/linux/kernel-features.h: define + __ASSUME_FDATASYNC. + * sysdeps/unix/sysv/linux/fdatasync.c: New file. + * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with + -fexceptions. + * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. + + sysdeps/unix/sysv/linux/Makefile | 1 + sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ + sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ + sysdeps/unix/sysv/linux/syscalls.list | 1 + 4 files changed, 76 insertions(+), 1 deletion(-) + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.13/sysdeps/unix/sysv/linux/Makefile +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 +@@ -21,6 +21,7 @@ + setfsuid setfsgid makedev epoll_pwait signalfd \ + eventfd eventfd_read eventfd_write prlimit + ++CFLAGS-fdatasync.c = -fexceptions + CFLAGS-gethostid.c = -fexceptions + CFLAGS-tst-writev.c += "-DARTIFICIAL_LIMIT=0x80000000-__getpagesize()" + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 +@@ -0,0 +1,69 @@ ++/* fdatasync -- synchronize at least the data part of a file with ++ the underlying media. Linux version. ++ ++ Copyright (C) 2007 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC ++static int __have_no_fdatasync; ++#endif ++ ++static int ++do_fdatasync (int fd) ++{ ++#ifdef __ASSUME_FDATASYNC ++ return INLINE_SYSCALL (fdatasync, 1, fd); ++#elif defined __NR_fdatasync ++ if (!__builtin_expect (__have_no_fdatasync, 0)) ++ { ++ int result = INLINE_SYSCALL (fdatasync, 1, fd); ++ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) ++ return result; ++ ++ __have_no_fdatasync = 1; ++ } ++#endif ++ return INLINE_SYSCALL (fsync, 1, fd); ++} ++ ++int ++__fdatasync (int fd) ++{ ++ if (SINGLE_THREAD_P) ++ return do_fdatasync (fd); ++ ++ int oldtype = LIBC_CANCEL_ASYNC (); ++ ++ int result = do_fdatasync (fd); ++ ++ LIBC_CANCEL_RESET (oldtype); ++ ++ return result; ++} ++ ++weak_alias (__fdatasync, fdatasync) ++ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 +@@ -459,6 +459,12 @@ + # define __ASSUME_FUTEX_LOCK_PI 1 + #endif + ++/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it ++ was already present in 2.0 kernels on other architectures. */ ++#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) ++# define __ASSUME_FDATASYNC 1 ++#endif ++ + /* Support for utimensat syscall was added in 2.6.22, on SH + only after 2.6.22-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020616 \ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 +@@ -11,7 +11,6 @@ + epoll_create1 EXTRA epoll_create1 i:i epoll_create1 + epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl + epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait +-fdatasync - fdatasync Ci:i fdatasync + flock - flock i:ii __flock flock + fork - fork i: __libc_fork __fork fork + get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/packages/glibc/2.15/560-ppc-atomic.patch b/packages/glibc/2.15/560-ppc-atomic.patch new file mode 100644 index 0000000..ee1cb90 --- /dev/null +++ b/packages/glibc/2.15/560-ppc-atomic.patch @@ -0,0 +1,415 @@ +sniped from suse + +Index: sysdeps/powerpc/bits/atomic.h +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v +retrieving revision 1.17 +diff -u -a -p -r1.17 atomic.h + +diff -durN glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h glibc-2.13/sysdeps/powerpc/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -85,14 +85,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -102,14 +102,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -118,12 +118,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -132,11 +132,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -144,12 +144,12 @@ + #define __arch_atomic_exchange_and_add_32(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stwcx. %1,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -157,12 +157,12 @@ + #define __arch_atomic_increment_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -170,27 +170,27 @@ + #define __arch_atomic_decrement_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_32(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ + " cmpwi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stwcx. %1,0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -60,14 +60,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp, __tmp2; \ + __asm __volatile (" clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -61,14 +61,14 @@ + unsigned int __tmp, __tmp2; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ + " clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -82,14 +82,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -98,14 +98,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -115,14 +115,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -132,14 +132,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -148,12 +148,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -162,11 +162,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -174,12 +174,12 @@ + #define __arch_atomic_exchange_and_add_64(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stdcx. %1,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -187,12 +187,12 @@ + #define __arch_atomic_increment_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -200,27 +200,27 @@ + #define __arch_atomic_decrement_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_64(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ + " cmpdi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stdcx. %1,0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) diff --git a/packages/glibc/2.15/630-mips_shn_undef-hack.patch b/packages/glibc/2.15/630-mips_shn_undef-hack.patch new file mode 100644 index 0000000..791d76c --- /dev/null +++ b/packages/glibc/2.15/630-mips_shn_undef-hack.patch @@ -0,0 +1,16 @@ +diff -durN glibc-2.13.orig/elf/dl-lookup.c glibc-2.13/elf/dl-lookup.c +--- glibc-2.13.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 ++++ glibc-2.13/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 +@@ -301,6 +301,12 @@ + /* FALLTHROUGH */ + case STB_GLOBAL: + success: ++#ifdef __mips__ ++ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF ++ symbols, we skip them. */ ++ if (sym->st_shndx == SHN_UNDEF) ++ break; ++#endif + /* Global definition. Just what we need. */ + result->s = sym; + result->m = (struct link_map *) map; diff --git a/packages/glibc/2.15/640-alpha-atfcts.patch b/packages/glibc/2.15/640-alpha-atfcts.patch new file mode 100644 index 0000000..7a8a94a --- /dev/null +++ b/packages/glibc/2.15/640-alpha-atfcts.patch @@ -0,0 +1,12 @@ +--- glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 +@@ -437,7 +437,8 @@ + the code. On PPC they were introduced in 2.6.17-rc1, + on SH in 2.6.19-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020611 \ +- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) ++ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ ++ && (!defined __alpha__) + # define __ASSUME_ATFCTS 1 + #endif + diff --git a/packages/glibc/2.15/650-syslog.patch b/packages/glibc/2.15/650-syslog.patch new file mode 100644 index 0000000..c20cafc --- /dev/null +++ b/packages/glibc/2.15/650-syslog.patch @@ -0,0 +1,12 @@ +diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c +--- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 ++++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 +@@ -152,7 +152,7 @@ + #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID + /* Check for invalid bits. */ + if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { +- syslog(INTERNALLOG, ++ __syslog(INTERNALLOG, + "syslog: unknown facility/priority: %x", pri); + pri &= LOG_PRIMASK|LOG_FACMASK; + } diff --git a/packages/glibc/2.15/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc/2.15/660-debug-readlink_chk-readklinkat_chk.patch new file mode 100644 index 0000000..a5a7052 --- /dev/null +++ b/packages/glibc/2.15/660-debug-readlink_chk-readklinkat_chk.patch @@ -0,0 +1,24 @@ +diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c +--- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 ++++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 +@@ -25,7 +25,7 @@ + + + ssize_t +-__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) ++__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) + { + if (len > buflen) + __chk_fail (); +diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c +--- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 ++++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 +@@ -21,7 +21,7 @@ + + + ssize_t +-__readlinkat_chk (int fd, const char *path, void *buf, size_t len, ++__readlinkat_chk (int fd, const char *path, char *buf, size_t len, + size_t buflen) + { + if (len > buflen) diff --git a/packages/glibc/2.16.0/100-respect-env-CPPFLAGS.patch b/packages/glibc/2.16.0/100-respect-env-CPPFLAGS.patch new file mode 100644 index 0000000..dce491c --- /dev/null +++ b/packages/glibc/2.16.0/100-respect-env-CPPFLAGS.patch @@ -0,0 +1,14 @@ +Respect environment CPPFLAGS when we run ./configure so we can inject +random -D things without having to set CFLAGS/ASFLAGS + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-05-09 23:57:56.000000000 +0200 ++++ glibc-2.13/Makeconfig 2009-11-13 00:49:41.000000000 +0100 +@@ -668,6 +668,7 @@ + $(foreach lib,$(libof-$(basename $(@F))) \ + $(libof-$(field.le_next)) + ++#define LIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = LIST_FIRST((head)); \ ++ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + /* + * List access methods. + */ +@@ -197,6 +202,16 @@ + #define SLIST_FOREACH(var, head, field) \ + for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next) + ++#define SLIST_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = SLIST_FIRST((head)); \ ++ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ ++#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \ ++ for ((varp) = &SLIST_FIRST((head)); \ ++ ((var) = *(varp)) != NULL; \ ++ (varp) = &SLIST_NEXT((var), field)) ++ + /* + * Singly-linked List access methods. + */ +@@ -242,6 +257,12 @@ + (head)->stqh_last = &(elm)->field.stqe_next; \ + } while (/*CONSTCOND*/0) + ++#define STAILQ_LAST(head, type, field) \ ++ (STAILQ_EMPTY((head)) ? \ ++ NULL : \ ++ ((struct type *)(void *) \ ++ ((char *)((head)->stqh_last) - __offsetof(struct type, field)))) ++ + #define STAILQ_INSERT_AFTER(head, listelm, elm, field) do { \ + if (((elm)->field.stqe_next = (listelm)->field.stqe_next) == NULL)\ + (head)->stqh_last = &(elm)->field.stqe_next; \ +@@ -271,6 +292,11 @@ + (var); \ + (var) = ((var)->field.stqe_next)) + ++#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = STAILQ_FIRST((head)); \ ++ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define STAILQ_CONCAT(head1, head2) do { \ + if (!STAILQ_EMPTY((head2))) { \ + *(head1)->stqh_last = (head2)->stqh_first; \ +@@ -437,11 +463,21 @@ + (var); \ + (var) = ((var)->field.tqe_next)) + ++#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ ++ for ((var) = TAILQ_FIRST((head)); \ ++ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_FOREACH_REVERSE(var, head, headname, field) \ + for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \ + (var); \ + (var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last))) + ++#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \ ++ for ((var) = TAILQ_LAST((head), headname); \ ++ (var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \ ++ (var) = (tvar)) ++ + #define TAILQ_CONCAT(head1, head2, field) do { \ + if (!TAILQ_EMPTY(head2)) { \ + *(head1)->tqh_last = (head2)->tqh_first; \ diff --git a/packages/glibc/2.16.0/170-localedef-fix-trampoline.patch b/packages/glibc/2.16.0/170-localedef-fix-trampoline.patch new file mode 100644 index 0000000..3cc6559 --- /dev/null +++ b/packages/glibc/2.16.0/170-localedef-fix-trampoline.patch @@ -0,0 +1,53 @@ +# DP: Description: Fix localedef segfault when run under exec-shield, +# PaX or similar. (#231438, #198099) +# DP: Dpatch Author: James Troup +# DP: Patch Author: (probably) Jakub Jelinek +# DP: Upstream status: Unknown +# DP: Status Details: Unknown +# DP: Date: 2004-03-16 +diff -durN glibc-2.13.orig/locale/programs/3level.h glibc-2.13/locale/programs/3level.h +--- glibc-2.13.orig/locale/programs/3level.h 2007-07-16 02:54:59.000000000 +0200 ++++ glibc-2.13/locale/programs/3level.h 2009-11-13 00:49:56.000000000 +0100 +@@ -203,6 +203,42 @@ + } + } + } ++ ++/* GCC ATM seems to do a poor job with pointers to nested functions passed ++ to inlined functions. Help it a little bit with this hack. */ ++#define wchead_table_iterate(tp, fn) \ ++do \ ++ { \ ++ struct wchead_table *t = (tp); \ ++ uint32_t index1; \ ++ for (index1 = 0; index1 < t->level1_size; index1++) \ ++ { \ ++ uint32_t lookup1 = t->level1[index1]; \ ++ if (lookup1 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup1_shifted = lookup1 << t->q; \ ++ uint32_t index2; \ ++ for (index2 = 0; index2 < (1 << t->q); index2++) \ ++ { \ ++ uint32_t lookup2 = t->level2[index2 + lookup1_shifted]; \ ++ if (lookup2 != ((uint32_t) ~0)) \ ++ { \ ++ uint32_t lookup2_shifted = lookup2 << t->p; \ ++ uint32_t index3; \ ++ for (index3 = 0; index3 < (1 << t->p); index3++) \ ++ { \ ++ struct element_t *lookup3 \ ++ = t->level3[index3 + lookup2_shifted]; \ ++ if (lookup3 != NULL) \ ++ fn ((((index1 << t->q) + index2) << t->p) + index3, \ ++ lookup3); \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } \ ++ } while (0) ++ + #endif + + #ifndef NO_FINALIZE diff --git a/packages/glibc/2.16.0/180-resolv-dynamic.patch b/packages/glibc/2.16.0/180-resolv-dynamic.patch new file mode 100644 index 0000000..e916bce --- /dev/null +++ b/packages/glibc/2.16.0/180-resolv-dynamic.patch @@ -0,0 +1,39 @@ +ripped from SuSE + +if /etc/resolv.conf is updated, then make sure applications +already running get the updated information. + +http://bugs.gentoo.org/177416 + +diff -durN glibc-2.13.orig/resolv/res_libc.c glibc-2.13/resolv/res_libc.c +--- glibc-2.13.orig/resolv/res_libc.c 2009-02-07 05:27:42.000000000 +0100 ++++ glibc-2.13/resolv/res_libc.c 2009-11-13 00:49:59.000000000 +0100 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + + /* The following bit is copied from res_data.c (where it is #ifdef'ed +@@ -95,6 +96,20 @@ + __res_maybe_init (res_state resp, int preinit) + { + if (resp->options & RES_INIT) { ++ static time_t last_mtime, last_check; ++ time_t now; ++ struct stat statbuf; ++ ++ time (&now); ++ if (now != last_check) { ++ last_check = now; ++ if (stat (_PATH_RESCONF, &statbuf) == 0 && last_mtime != statbuf.st_mtime) { ++ last_mtime = statbuf.st_mtime; ++ atomicinclock (lock); ++ atomicinc (__res_initstamp); ++ atomicincunlock (lock); ++ } ++ } + if (__res_initstamp != resp->_u._ext.initstamp) { + if (resp->nscount > 0) + __res_iclose (resp, true); diff --git a/packages/glibc/2.16.0/200-fadvise64_64.patch b/packages/glibc/2.16.0/200-fadvise64_64.patch new file mode 100644 index 0000000..71bca38 --- /dev/null +++ b/packages/glibc/2.16.0/200-fadvise64_64.patch @@ -0,0 +1,28 @@ +ripped from Debian + + sysdeps/unix/sysv/linux/posix_fadvise.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/posix_fadvise.c 2003-08-17 02:36:22.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/posix_fadvise.c 2009-11-13 00:50:03.000000000 +0100 +@@ -35,6 +35,19 @@ + return INTERNAL_SYSCALL_ERRNO (ret, err); + return 0; + #else ++# ifdef __NR_fadvise64_64 ++ INTERNAL_SYSCALL_DECL (err); ++ int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd, ++ __LONG_LONG_PAIR ((long) (offset >> 31), ++ (long) offset), ++ __LONG_LONG_PAIR ((long) (len >> 31), ++ (long) len), ++ advise); ++ if (INTERNAL_SYSCALL_ERROR_P (ret, err)) ++ return INTERNAL_SYSCALL_ERRNO (ret, err); ++ return 0; ++# else + return ENOSYS; ++# endif + #endif + } diff --git a/packages/glibc/2.16.0/260-assume-pipe2.patch b/packages/glibc/2.16.0/260-assume-pipe2.patch new file mode 100644 index 0000000..54f0382 --- /dev/null +++ b/packages/glibc/2.16.0/260-assume-pipe2.patch @@ -0,0 +1,40 @@ +http://bugs.gentoo.org/250342 +http://sources.redhat.com/bugzilla/show_bug.cgi?id=9685 + +we cant assume sock_cloexec and pipe2 are bound together as the former defines +are found in glibc only while the latter are a combo of kernel headers and +glibc. so if we do a runtime detection of SOCK_CLOEXEC, but pipe2() is a stub +inside of glibc, we hit a problem. for example: + +#include +#include +main() +{ + getgrnam("portage"); + if (!popen("ls", "r")) + perror("popen()"); +} + +getgrnam() will detect that the kernel supports SOCK_CLOEXEC and then set both +__have_sock_cloexec and __have_pipe2 to true. but if glibc was built against +older kernel headers where __NR_pipe2 does not exist, glibc will have a ENOSYS +stub for it. so popen() will always fail as glibc assumes pipe2() works. + +diff -durN glibc-2.16.0.orig/socket/have_sock_cloexec.c glibc-2.16.0/socket/have_sock_cloexec.c +--- glibc-2.16.0.orig/socket/have_sock_cloexec.c 2008-07-25 18:46:23.000000000 +0200 ++++ glibc-2.16.0/socket/have_sock_cloexec.c 2009-11-13 00:50:15.000000000 +0100 +@@ -15,9 +15,14 @@ + License along with the GNU C Library; if not, see + . */ + ++#include + #include + #include + + #if defined SOCK_CLOEXEC && !defined __ASSUME_SOCK_CLOEXEC + int __have_sock_cloexec; + #endif ++ ++#if defined O_CLOEXEC && !defined __ASSUME_PIPE2 ++int __have_pipe2; ++#endif diff --git a/packages/glibc/2.16.0/270-china.patch b/packages/glibc/2.16.0/270-china.patch new file mode 100644 index 0000000..41d7759 --- /dev/null +++ b/packages/glibc/2.16.0/270-china.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.13.orig/localedata/locales/zh_TW glibc-2.13/localedata/locales/zh_TW +--- glibc-2.13.orig/localedata/locales/zh_TW 2004-11-01 00:42:28.000000000 +0100 ++++ glibc-2.13/localedata/locales/zh_TW 2009-11-13 00:50:17.000000000 +0100 +@@ -1,7 +1,7 @@ + comment_char % + escape_char / + % +-% Chinese language locale for Taiwan R.O.C. ++% Chinese language locale for Taiwan + % charmap: BIG5-CP950 + % + % Original Author: +@@ -17,7 +17,7 @@ + % Reference: http://wwwold.dkuug.dk/JTC1/SC22/WG20/docs/n690.pdf + + LC_IDENTIFICATION +-title "Chinese locale for Taiwan R.O.C." ++title "Chinese locale for Taiwan" + source "" + address "" + contact "" +@@ -25,7 +25,7 @@ + tel "" + fax "" + language "Chinese" +-territory "Taiwan R.O.C." ++territory "Taiwan" + revision "0.2" + date "2000-08-02" + % diff --git a/packages/glibc/2.16.0/280-new-valencian-locale.patch b/packages/glibc/2.16.0/280-new-valencian-locale.patch new file mode 100644 index 0000000..4cdd108 --- /dev/null +++ b/packages/glibc/2.16.0/280-new-valencian-locale.patch @@ -0,0 +1,115 @@ +http://bugs.gentoo.org/show_bug.cgi?id=131815 +http://sourceware.org/bugzilla/show_bug.cgi?id=2522 + +diff -durN glibc-2.13.orig/localedata/SUPPORTED glibc-2.13/localedata/SUPPORTED +--- glibc-2.13.orig/localedata/SUPPORTED 2009-04-18 10:43:52.000000000 +0200 ++++ glibc-2.13/localedata/SUPPORTED 2009-11-13 00:50:20.000000000 +0100 +@@ -72,6 +72,8 @@ + ca_ES.UTF-8/UTF-8 \ + ca_ES/ISO-8859-1 \ + ca_ES@euro/ISO-8859-15 \ ++ca_ES.UTF-8@valencia/UTF-8 \ ++ca_ES@valencia/ISO-8859-15 \ + ca_FR.UTF-8/UTF-8 \ + ca_FR/ISO-8859-15 \ + ca_IT.UTF-8/UTF-8 \ +diff -durN glibc-2.13.orig/localedata/locales/ca_ES@valencia glibc-2.13/localedata/locales/ca_ES@valencia +--- glibc-2.13.orig/localedata/locales/ca_ES@valencia 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.13/localedata/locales/ca_ES@valencia 2009-11-13 00:50:20.000000000 +0100 +@@ -0,0 +1,96 @@ ++comment_char % ++escape_char / ++% ++% Valencian (southern Catalan) locale for Spain with Euro ++% ++% Note that this locale is almost the same as ca_ES@euro. The point of having ++% a separate locale is only for PO translations, which have a lot of social ++% support and are very appreciated by the Valencian-speaking community. ++% ++% Contact: Jordi Mallach ++% Email: jordi@gnu.org ++% Tel: ++% Fax: ++% Language: ca ++% Territory: ES ++% Option: euro ++% Revision: 1.0 ++% Date: 2006-04-06 ++% Application: general ++% Users: general ++% Repertoiremap: mnemonic,ds ++% Charset: ISO-8859-15 ++% Distribution and use is free, also ++% for commercial purposes. ++ ++LC_IDENTIFICATION ++title "Valencian (southern Catalan) locale for Spain with Euro" ++source "" ++address "" ++contact "Jordi Mallach" ++email "jordi@gnu.org" ++tel "" ++fax "" ++language "Catalan" ++territory "Spain" ++revision "1.0" ++date "2006-04-06" ++% ++category "ca_ES@valencia:2006";LC_IDENTIFICATION ++category "ca_ES@valencia:2006";LC_CTYPE ++category "ca_ES@valencia:2006";LC_COLLATE ++category "ca_ES@valencia:2006";LC_MONETARY ++category "ca_ES@valencia:2006";LC_NUMERIC ++category "ca_ES@valencia:2006";LC_TIME ++category "ca_ES@valencia:2006";LC_MESSAGES ++category "ca_ES@valencia:2006";LC_PAPER ++category "ca_ES@valencia:2006";LC_NAME ++category "ca_ES@valencia:2006";LC_ADDRESS ++category "ca_ES@valencia:2006";LC_TELEPHONE ++category "ca_ES@valencia:2006";LC_MEASUREMENT ++ ++END LC_IDENTIFICATION ++ ++LC_CTYPE ++copy "i18n" ++END LC_CTYPE ++ ++LC_COLLATE ++copy "ca_ES" ++END LC_COLLATE ++ ++LC_MONETARY ++copy "ca_ES" ++END LC_MONETARY ++ ++LC_NUMERIC ++copy "ca_ES" ++END LC_NUMERIC ++ ++LC_TIME ++copy "ca_ES" ++END LC_TIME ++ ++LC_MESSAGES ++copy "ca_ES" ++END LC_MESSAGES ++ ++LC_PAPER ++copy "ca_ES" ++END LC_PAPER ++ ++LC_NAME ++copy "ca_ES" ++END LC_NAME ++ ++LC_ADDRESS ++copy "ca_ES" ++END LC_ADDRESS ++ ++LC_TELEPHONE ++copy "ca_ES" ++END LC_TELEPHONE ++ ++LC_MEASUREMENT ++copy "ca_ES" ++END LC_MEASUREMENT diff --git a/packages/glibc/2.16.0/300-nscd-one-fork.patch b/packages/glibc/2.16.0/300-nscd-one-fork.patch new file mode 100644 index 0000000..13b2861 --- /dev/null +++ b/packages/glibc/2.16.0/300-nscd-one-fork.patch @@ -0,0 +1,43 @@ +only fork one to assist in stop-start-daemon assumptions about daemon behavior + +http://bugs.gentoo.org/190785 + +diff -durN glibc-2.13.orig/nscd/nscd.c glibc-2.13/nscd/nscd.c +--- glibc-2.13.orig/nscd/nscd.c 2009-02-06 21:10:27.000000000 +0100 ++++ glibc-2.13/nscd/nscd.c 2009-11-13 00:50:24.000000000 +0100 +@@ -203,6 +203,9 @@ + exit (0); + } + ++ if (write_pid (_PATH_NSCDPID) < 0) ++ dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); ++ + int nullfd = open (_PATH_DEVNULL, O_RDWR); + if (nullfd != -1) + { +@@ -252,15 +255,6 @@ + for (i = min_close_fd; i < getdtablesize (); i++) + close (i); + +- if (run_mode == RUN_DAEMONIZE) +- { +- pid = fork (); +- if (pid == -1) +- error (EXIT_FAILURE, errno, _("cannot fork")); +- if (pid != 0) +- exit (0); +- } +- + setsid (); + + if (chdir ("/") != 0) +@@ -245,9 +242,6 @@ + + openlog ("nscd", LOG_CONS | LOG_ODELAY, LOG_DAEMON); + +- if (write_pid (_PATH_NSCDPID) < 0) +- dbg_log ("%s: %s", _PATH_NSCDPID, strerror (errno)); +- + if (!init_logfile ()) + dbg_log (_("Could not create log file")); + diff --git a/packages/glibc/2.16.0/310-hppa-nptl-carlos.patch b/packages/glibc/2.16.0/310-hppa-nptl-carlos.patch new file mode 100644 index 0000000..11e8a65 --- /dev/null +++ b/packages/glibc/2.16.0/310-hppa-nptl-carlos.patch @@ -0,0 +1,246 @@ + + +diff -durN glibc-2.13.orig/elf/rtld.c glibc-2.13/elf/rtld.c +--- glibc-2.13.orig/elf/rtld.c 2009-04-17 02:00:08.000000000 +0200 ++++ glibc-2.13/elf/rtld.c 2009-11-13 00:50:26.000000000 +0100 +@@ -392,14 +392,14 @@ + know it is available. We do not have to clear the memory if we + do not have to use the temporary bootstrap_map. Global variables + are initialized to zero by default. */ +-#ifndef DONT_USE_BOOTSTRAP_MAP ++#if !defined DONT_USE_BOOTSTRAP_MAP + # ifdef HAVE_BUILTIN_MEMSET + __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info)); + # else +- for (size_t cnt = 0; +- cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]); +- ++cnt) +- bootstrap_map.l_info[cnt] = 0; ++ /* Clear the whole bootstrap_map structure */ ++ for (char *cnt = (char *)&(bootstrap_map); ++ cnt < ((char *)&(bootstrap_map) + sizeof (bootstrap_map)); ++ *cnt++ = '\0'); + # endif + # if USE___THREAD + bootstrap_map.l_tls_modid = 0; +diff -durN glibc-2.13.orig/include/atomic.h glibc-2.13/include/atomic.h +--- glibc-2.13.orig/include/atomic.h 2009-02-09 00:49:53.000000000 +0100 ++++ glibc-2.13/include/atomic.h 2009-11-13 00:50:26.000000000 +0100 +@@ -185,7 +185,7 @@ + __typeof (*(mem)) __atg5_value = (newvalue); \ + \ + do \ +- __atg5_oldval = *__atg5_memp; \ ++ __atg5_oldval = *(volatile __typeof (mem))__atg5_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg5_memp, __atg5_value, \ + __atg5_oldval), 0)); \ +@@ -206,7 +206,7 @@ + __typeof (*(mem)) __atg6_value = (value); \ + \ + do \ +- __atg6_oldval = *__atg6_memp; \ ++ __atg6_oldval = *(volatile __typeof (mem))__atg6_memp; \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg6_memp, \ + __atg6_oldval \ +@@ -224,7 +224,7 @@ + __typeof (*(mem)) __atg7_value = (value); \ + \ + do \ +- __atg7_oldv = *__atg7_memp; \ ++ __atg7_oldv = *(volatile __typeof (mem))__atg7_memp; \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg7_memp, \ + __atg7_oldv \ +@@ -242,7 +242,7 @@ + __typeof (mem) __atg8_memp = (mem); \ + __typeof (*(mem)) __atg8_value = (value); \ + do { \ +- __atg8_oldval = *__atg8_memp; \ ++ __atg8_oldval = *(volatile __typeof (mem))__atg8_memp; \ + if (__atg8_oldval >= __atg8_value) \ + break; \ + } while (__builtin_expect \ +@@ -259,7 +259,7 @@ + __typeof (mem) __atg9_memp = (mem); \ + __typeof (*(mem)) __atg9_value = (value); \ + do { \ +- __atg9_oldv = *__atg9_memp; \ ++ __atg9_oldv = *(volatile __typeof (mem))__atg9_memp; \ + if (__atg9_oldv >= __atg9_value) \ + break; \ + } while (__builtin_expect \ +@@ -277,7 +277,7 @@ + __typeof (mem) __atg10_memp = (mem); \ + __typeof (*(mem)) __atg10_value = (value); \ + do { \ +- __atg10_oldval = *__atg10_memp; \ ++ __atg10_oldval = *(volatile __typeof (mem))__atg10_memp; \ + if (__atg10_oldval <= __atg10_value) \ + break; \ + } while (__builtin_expect \ +@@ -361,7 +361,7 @@ + \ + do \ + { \ +- __atg11_oldval = *__atg11_memp; \ ++ __atg11_oldval = *(volatile __typeof (mem))__atg11_memp; \ + if (__builtin_expect (__atg11_oldval <= 0, 0)) \ + break; \ + } \ +@@ -400,7 +400,7 @@ + __typeof (*(mem)) __atg14_mask = ((__typeof (*(mem))) 1 << (bit)); \ + \ + do \ +- __atg14_old = (*__atg14_memp); \ ++ __atg14_old = (*(volatile __typeof (mem))__atg14_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg14_memp, \ + __atg14_old | __atg14_mask,\ +@@ -418,7 +418,7 @@ + __typeof (*(mem)) __atg15_mask = (mask); \ + \ + do \ +- __atg15_old = (*__atg15_memp); \ ++ __atg15_old = (*(volatile __typeof (mem))__atg15_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg15_memp, \ + __atg15_old & __atg15_mask, \ +@@ -450,7 +450,7 @@ + __typeof (*(mem)) __atg16_mask = (mask); \ + \ + do \ +- __atg16_old = (*__atg16_memp); \ ++ __atg16_old = (*(volatile __typeof (mem))__atg16_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg16_memp, \ + __atg16_old & __atg16_mask,\ +@@ -468,7 +468,7 @@ + __typeof (*(mem)) __atg17_mask = (mask); \ + \ + do \ +- __atg17_old = (*__atg17_memp); \ ++ __atg17_old = (*(volatile __typeof (mem))__atg17_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg17_memp, \ + __atg17_old | __atg17_mask, \ +@@ -484,7 +484,7 @@ + __typeof (*(mem)) __atg18_mask = (mask); \ + \ + do \ +- __atg18_old = (*__atg18_memp); \ ++ __atg18_old = (*(volatile __typeof (mem))__atg18_memp); \ + while (__builtin_expect \ + (catomic_compare_and_exchange_bool_acq (__atg18_memp, \ + __atg18_old | __atg18_mask,\ +@@ -500,7 +500,7 @@ + __typeof (*(mem)) __atg19_mask = (mask); \ + \ + do \ +- __atg19_old = (*__atg19_memp); \ ++ __atg19_old = (*(volatile __typeof (mem))__atg19_memp); \ + while (__builtin_expect \ + (atomic_compare_and_exchange_bool_acq (__atg19_memp, \ + __atg19_old | __atg19_mask,\ +diff -durN glibc-2.13.orig/nptl/Makefile glibc-2.13/nptl/Makefile +--- glibc-2.13.orig/nptl/Makefile 2008-11-12 14:38:23.000000000 +0100 ++++ glibc-2.13/nptl/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -266,9 +266,9 @@ + # Files which must not be linked with libpthread. + tests-nolibpthread = tst-unload + +-# This sets the stack resource limit to 1023kb, which is not a multiple +-# of the page size since every architecture's page size is > 1k. +-tst-oddstacklimit-ENV = ; ulimit -s 1023; ++# This sets the stack resource limit to 8193kb, which is not a multiple ++# of the page size since every architecture's page size is 4096 bytes. ++tst-oddstacklimit-ENV = ; ulimit -s 8193; + + gen-as-const-headers = pthread-errnos.sym + +@@ -426,6 +426,35 @@ + CFLAGS-tst-cleanupx4.c += -fexceptions + CFLAGS-tst-oncex3.c += -fexceptions + CFLAGS-tst-oncex4.c += -fexceptions ++ ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed ++LDFLAGS-tst-cancelx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx5 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx6 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx7 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx8 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx9 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx10 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx11 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx12 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx13 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx14 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx15 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx16 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx17 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx18 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx20 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cancelx21 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx0 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx1 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx2 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-cleanupx4 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex3 += $(ldflags-libgcc_s) ++LDFLAGS-tst-oncex4 += $(ldflags-libgcc_s) ++ + CFLAGS-tst-align.c += $(stack-align-test-flags) + CFLAGS-tst-align3.c += $(stack-align-test-flags) + CFLAGS-tst-initializers1.c = -W -Wall -Werror +diff -durN glibc-2.13.orig/nptl/pthread_barrier_wait.c glibc-2.13/nptl/pthread_barrier_wait.c +--- glibc-2.13.orig/nptl/pthread_barrier_wait.c 2007-08-01 06:18:50.000000000 +0200 ++++ glibc-2.13/nptl/pthread_barrier_wait.c 2009-11-13 00:50:26.000000000 +0100 +@@ -64,7 +64,7 @@ + do + lll_futex_wait (&ibarrier->curr_event, event, + ibarrier->private ^ FUTEX_PRIVATE_FLAG); +- while (event == ibarrier->curr_event); ++ while (event == *(volatile unsigned int *)&ibarrier->curr_event); + } + + /* Make sure the init_count is stored locally or in a register. */ +diff -durN glibc-2.13.orig/nptl/sysdeps/pthread/Makefile glibc-2.13/nptl/sysdeps/pthread/Makefile +--- glibc-2.13.orig/nptl/sysdeps/pthread/Makefile 2006-02-28 08:09:41.000000000 +0100 ++++ glibc-2.13/nptl/sysdeps/pthread/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -33,7 +33,9 @@ + + ifeq ($(have-forced-unwind),yes) + tests += tst-mqueue8x ++ldflags-libgcc_s = --as-needed -lgcc_s --no-as-needed + CFLAGS-tst-mqueue8x.c += -fexceptions ++LDFLAGS-tst-mqueue8x += $(ldflags-libgcc_s) + endif + endif + +diff -durN glibc-2.13.orig/stdio-common/Makefile glibc-2.13/stdio-common/Makefile +--- glibc-2.13.orig/stdio-common/Makefile 2009-04-11 07:29:56.000000000 +0200 ++++ glibc-2.13/stdio-common/Makefile 2009-11-13 00:50:26.000000000 +0100 +@@ -82,7 +82,7 @@ + $(SHELL) -e tst-printf.sh $(common-objpfx) '$(run-program-prefix)' + endif + +-CFLAGS-vfprintf.c = -Wno-uninitialized ++CFLAGS-vfprintf.c = -Wno-uninitialized -fno-delayed-branch + CFLAGS-vfwprintf.c = -Wno-uninitialized + CFLAGS-tst-printf.c = -Wno-format + CFLAGS-tstdiomisc.c = -Wno-format +diff -durN glibc-2.13.orig/sunrpc/clnt_udp.c glibc-2.13/sunrpc/clnt_udp.c +--- glibc-2.13.orig/sunrpc/clnt_udp.c 2008-07-26 10:42:44.000000000 +0200 ++++ glibc-2.13/sunrpc/clnt_udp.c 2009-11-13 00:50:26.000000000 +0100 +@@ -456,7 +456,7 @@ + while (inlen < 0 && errno == EINTR); + if (inlen < 0) + { +- if (errno == EWOULDBLOCK) ++ if (errno == EWOULDBLOCK || errno == EAGAIN) + continue; + cu->cu_error.re_errno = errno; + return (cu->cu_error.re_status = RPC_CANTRECV); diff --git a/packages/glibc/2.16.0/340-dl_execstack-PaX-support.patch b/packages/glibc/2.16.0/340-dl_execstack-PaX-support.patch new file mode 100644 index 0000000..2402af0 --- /dev/null +++ b/packages/glibc/2.16.0/340-dl_execstack-PaX-support.patch @@ -0,0 +1,66 @@ + With latest versions of glibc, a lot of apps failed on a PaX enabled + system with: + cannot enable executable stack as shared object requires: Permission denied + + This is due to PaX 'exec-protecting' the stack, and ld.so then trying + to make the stack executable due to some libraries not containing the + PT_GNU_STACK section. Bug #32960. (12 Nov 2003). + + Patch also NPTL. Bug #116086. (20 Dec 2005). + +diff -durN glibc-2.13.orig/nptl/allocatestack.c glibc-2.13/nptl/allocatestack.c +--- glibc-2.13.orig/nptl/allocatestack.c 2009-01-29 21:34:16.000000000 +0100 ++++ glibc-2.13/nptl/allocatestack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -329,7 +329,8 @@ + # error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP" + #endif + if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0) +- return errno; ++ if (errno != EACCES) /* PAX is enabled */ ++ return errno; + + return 0; + } +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/dl-execstack.c 2006-01-08 09:21:15.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/dl-execstack.c 2009-11-13 00:50:33.000000000 +0100 +@@ -63,7 +63,10 @@ + else + # endif + { +- result = errno; ++ if (errno == EACCES) /* PAX is enabled */ ++ result = 0; ++ else ++ result = errno; + goto out; + } + } +@@ -89,7 +92,12 @@ + page -= size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; +@@ -115,7 +123,12 @@ + page += size; + else + { +- if (errno != ENOMEM) /* Unexpected failure mode. */ ++ if (errno == EACCES) /* PAX is enabled */ ++ { ++ result = 0; ++ goto out; ++ } ++ else if (errno != ENOMEM) /* Unexpected failure mode. */ + { + result = errno; + goto out; diff --git a/packages/glibc/2.16.0/350-pre20040117-pt_pax.patch b/packages/glibc/2.16.0/350-pre20040117-pt_pax.patch new file mode 100644 index 0000000..f8f6b83 --- /dev/null +++ b/packages/glibc/2.16.0/350-pre20040117-pt_pax.patch @@ -0,0 +1,32 @@ + + +diff -durN glibc-2.13.orig/elf/elf.h glibc-2.13/elf/elf.h +--- glibc-2.13.orig/elf/elf.h 2009-04-15 02:15:54.000000000 +0200 ++++ glibc-2.13/elf/elf.h 2009-11-13 00:50:35.000000000 +0100 +@@ -580,6 +580,7 @@ + #define PT_GNU_EH_FRAME 0x6474e550 /* GCC .eh_frame_hdr segment */ + #define PT_GNU_STACK 0x6474e551 /* Indicates stack executability */ + #define PT_GNU_RELRO 0x6474e552 /* Read-only after relocation */ ++#define PT_PAX_FLAGS 0x65041580 /* Indicates PaX flag markings */ + #define PT_LOSUNW 0x6ffffffa + #define PT_SUNWBSS 0x6ffffffa /* Sun Specific segment */ + #define PT_SUNWSTACK 0x6ffffffb /* Stack segment */ +@@ -593,6 +594,18 @@ + #define PF_X (1 << 0) /* Segment is executable */ + #define PF_W (1 << 1) /* Segment is writable */ + #define PF_R (1 << 2) /* Segment is readable */ ++#define PF_PAGEEXEC (1 << 4) /* Enable PAGEEXEC */ ++#define PF_NOPAGEEXEC (1 << 5) /* Disable PAGEEXEC */ ++#define PF_SEGMEXEC (1 << 6) /* Enable SEGMEXEC */ ++#define PF_NOSEGMEXEC (1 << 7) /* Disable SEGMEXEC */ ++#define PF_MPROTECT (1 << 8) /* Enable MPROTECT */ ++#define PF_NOMPROTECT (1 << 9) /* Disable MPROTECT */ ++#define PF_RANDEXEC (1 << 10) /* Enable RANDEXEC */ ++#define PF_NORANDEXEC (1 << 11) /* Disable RANDEXEC */ ++#define PF_EMUTRAMP (1 << 12) /* Enable EMUTRAMP */ ++#define PF_NOEMUTRAMP (1 << 13) /* Disable EMUTRAMP */ ++#define PF_RANDMMAP (1 << 14) /* Enable RANDMMAP */ ++#define PF_NORANDMMAP (1 << 15) /* Disable RANDMMAP */ + #define PF_MASKOS 0x0ff00000 /* OS-specific */ + #define PF_MASKPROC 0xf0000000 /* Processor-specific */ + diff --git a/packages/glibc/2.16.0/360-tests-sandbox-libdl-paths.patch b/packages/glibc/2.16.0/360-tests-sandbox-libdl-paths.patch new file mode 100644 index 0000000..9f78c52 --- /dev/null +++ b/packages/glibc/2.16.0/360-tests-sandbox-libdl-paths.patch @@ -0,0 +1,193 @@ +when glibc runs its tests, it does so by invoking the local library loader. +in Gentoo, we build/run inside of our "sandbox" which itself is linked against +libdl (so that it can load libraries and pull out symbols). the trouble +is that when you upgrade from an older glibc to the new one, often times +internal symbols change name or abi. this is normally OK as you cannot use +libc.so from say version 2.3.6 but libpthread.so from say version 2.5, so +we always say "keep all of the glibc libraries from the same build". but +when glibc runs its tests, it uses dynamic paths to point to its new local +copies of libraries. if the test doesnt use libdl, then glibc doesnt add +its path, and when sandbox triggers the loading of libdl, glibc does so +from the host system system. this gets us into the case of all libraries +are from the locally compiled version of glibc except for libdl.so. + +Fix by Wormo + +http://bugs.gentoo.org/56898 + +diff -durN glibc-2.13.orig/grp/tst_fgetgrent.sh glibc-2.13/grp/tst_fgetgrent.sh +--- glibc-2.13.orig/grp/tst_fgetgrent.sh 2001-07-06 06:54:46.000000000 +0200 ++++ glibc-2.13/grp/tst_fgetgrent.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,7 +24,8 @@ + rtld_installed_name=$1; shift + + testout=${common_objpfx}/grp/tst_fgetgrent.out +-library_path=${common_objpfx} ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn + + result=0 + +diff -durN glibc-2.13.orig/iconvdata/run-iconv-test.sh glibc-2.13/iconvdata/run-iconv-test.sh +--- glibc-2.13.orig/iconvdata/run-iconv-test.sh 2008-05-15 03:59:44.000000000 +0200 ++++ glibc-2.13/iconvdata/run-iconv-test.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -34,7 +34,7 @@ + export GCONV_PATH + + # We have to have some directories in the library path. +-LIBPATH=$codir:$codir/iconvdata ++LIBPATH=$codir:$codir/iconvdata:$codir/dlfcn + + # How the start the iconv(1) program. + ICONV='$codir/elf/ld.so --library-path $LIBPATH --inhibit-rpath ${from}.so \ +diff -durN glibc-2.13.orig/iconvdata/tst-table.sh glibc-2.13/iconvdata/tst-table.sh +--- glibc-2.13.orig/iconvdata/tst-table.sh 2002-04-24 23:39:35.000000000 +0200 ++++ glibc-2.13/iconvdata/tst-table.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -59,8 +59,11 @@ + irreversible=${charset}.irreversible + fi + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # iconv in one direction. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-table-from ${charset} \ + > ${objpfx}tst-${charset}.table + +diff -durN glibc-2.13.orig/intl/tst-codeset.sh glibc-2.13/intl/tst-codeset.sh +--- glibc-2.13.orig/intl/tst-codeset.sh 2005-04-06 04:18:35.000000000 +0200 ++++ glibc-2.13/intl/tst-codeset.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -37,6 +37,9 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + ${common_objpfx}elf/ld.so --library-path $common_objpfx \ + ${objpfx}tst-codeset > ${objpfx}tst-codeset.out + +diff -durN glibc-2.13.orig/intl/tst-gettext.sh glibc-2.13/intl/tst-gettext.sh +--- glibc-2.13.orig/intl/tst-gettext.sh 2004-08-15 21:28:18.000000000 +0200 ++++ glibc-2.13/intl/tst-gettext.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -51,9 +51,12 @@ + LOCPATH=${common_objpfx}localedata + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. + MALLOC_TRACE=$malloc_trace LOCPATH=${objpfx}localedir:$LOCPATH \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext > ${objpfx}tst-gettext.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.13.orig/intl/tst-gettext2.sh glibc-2.13/intl/tst-gettext2.sh +--- glibc-2.13.orig/intl/tst-gettext2.sh 2005-05-04 19:54:48.000000000 +0200 ++++ glibc-2.13/intl/tst-gettext2.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -65,8 +65,11 @@ + LOCPATH=${objpfx}domaindir + export LOCPATH + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + # Now run the test. +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${objpfx}tst-gettext2 > ${objpfx}tst-gettext2.out ${objpfx}domaindir && + cmp ${objpfx}tst-gettext2.out - < ${objpfx}tst-translit.out ${objpfx}domaindir + + exit $? +diff -durN glibc-2.13.orig/malloc/tst-mtrace.sh glibc-2.13/malloc/tst-mtrace.sh +--- glibc-2.13.orig/malloc/tst-mtrace.sh 2005-10-15 01:40:35.000000000 +0200 ++++ glibc-2.13/malloc/tst-mtrace.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -24,9 +24,12 @@ + status=0 + trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15 + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \ + LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \ +-${common_objpfx}elf/ld.so --library-path $common_objpfx \ ++${common_objpfx}elf/ld.so --library-path $library_path \ + ${common_objpfx}malloc/tst-mtrace || status=1 + + if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then +diff -durN glibc-2.13.orig/nptl/tst-tls6.sh glibc-2.13/nptl/tst-tls6.sh +--- glibc-2.13.orig/nptl/tst-tls6.sh 2003-09-03 00:02:59.000000000 +0200 ++++ glibc-2.13/nptl/tst-tls6.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -5,8 +5,8 @@ + rtld_installed_name=$1; shift + logfile=$common_objpfx/nptl/tst-tls6.out + +-# We have to find libc and nptl +-library_path=${common_objpfx}:${common_objpfx}nptl ++# We have to find libc and nptl (also libdl in case sandbox is in use) ++library_path=${common_objpfx}:${common_objpfx}nptl:${common_objpfx}/dlfcn + tst_tls5="${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}/nptl/tst-tls5" + +diff -durN glibc-2.13.orig/posix/globtest.sh glibc-2.13/posix/globtest.sh +--- glibc-2.13.orig/posix/globtest.sh 2008-12-06 07:05:39.000000000 +0100 ++++ glibc-2.13/posix/globtest.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -18,7 +18,7 @@ + esac + + # We have to find the libc and the NSS modules. +-library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod ++library_path=${common_objpfx}:${common_objpfx}nss:${common_objpfx}nis:${common_objpfx}db2:${common_objpfx}hesiod:${common_objpfx}/dlfcn + + # Since we use `sort' we must make sure to use the same locale everywhere. + LC_ALL=C +diff -durN glibc-2.13.orig/posix/tst-getconf.sh glibc-2.13/posix/tst-getconf.sh +--- glibc-2.13.orig/posix/tst-getconf.sh 2002-09-01 13:11:25.000000000 +0200 ++++ glibc-2.13/posix/tst-getconf.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -10,7 +10,10 @@ + else + rtld_installed_name=$1; shift + runit() { +- ${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} "$@" ++ ++ # make sure libdl is also in path in case sandbox is in use ++ library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ ${elf_objpfx}${rtld_installed_name} --library-path ${library_path} "$@" + } + fi + +diff -durN glibc-2.13.orig/posix/wordexp-tst.sh glibc-2.13/posix/wordexp-tst.sh +--- glibc-2.13.orig/posix/wordexp-tst.sh 2000-10-20 18:23:30.000000000 +0200 ++++ glibc-2.13/posix/wordexp-tst.sh 2009-11-13 00:50:37.000000000 +0100 +@@ -19,8 +19,11 @@ + " + export IFS + ++# make sure libdl is also in path in case sandbox is in use ++library_path=${common_objpfx}:${common_objpfx}/dlfcn ++ + failed=0 +-${elf_objpfx}${rtld_installed_name} --library-path ${common_objpfx} \ ++${elf_objpfx}${rtld_installed_name} --library-path ${library_path} \ + ${common_objpfx}posix/wordexp-test '$*' > ${testout}1 + cat <<"EOF" | cmp - ${testout}1 >> $logfile || failed=1 + wordexp returned 0 diff --git a/packages/glibc/2.16.0/380-dont-build-timezone.patch b/packages/glibc/2.16.0/380-dont-build-timezone.patch new file mode 100644 index 0000000..11c358e --- /dev/null +++ b/packages/glibc/2.16.0/380-dont-build-timezone.patch @@ -0,0 +1,14 @@ +timezone data has been split into the package sys-libs/timezone-data + +diff -durN glibc-2.13.orig/Makeconfig glibc-2.13/Makeconfig +--- glibc-2.13.orig/Makeconfig 2009-11-13 00:50:13.000000000 +0100 ++++ glibc-2.13/Makeconfig 2009-11-13 00:50:41.000000000 +0100 +@@ -944,7 +944,7 @@ + stdlib stdio-common libio malloc string wcsmbs time dirent \ + grp pwd posix io termios resource misc socket sysvipc gmon \ + gnulib iconv iconvdata wctype manual shadow gshadow po argp \ +- crypt nss localedata timezone rt conform debug \ ++ crypt nss localedata rt conform debug \ + $(add-on-subdirs) $(dlfcn) $(binfmt-subdir) + + ifndef avoid-generated diff --git a/packages/glibc/2.16.0/400-alpha-xstat.patch b/packages/glibc/2.16.0/400-alpha-xstat.patch new file mode 100644 index 0000000..6e4ab8f --- /dev/null +++ b/packages/glibc/2.16.0/400-alpha-xstat.patch @@ -0,0 +1,15 @@ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-05-09 08:54:20.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 +@@ -386,6 +386,11 @@ + # define __ASSUME_GETDENTS32_D_TYPE 1 + #endif + ++/* Starting with version 2.6.4, alpha stat64 syscalls are available. */ ++#if __LINUX_KERNEL_VERSION >= 0x020604 && defined __alpha__ ++# define __ASSUME_STAT64_SYSCALL 1 ++#endif ++ + /* Starting with version 2.5.3, the initial location returned by `brk' + after exec is always rounded up to the next page. */ + #if __LINUX_KERNEL_VERSION >= 132355 diff --git a/packages/glibc/2.16.0/430-alpha-creat.patch b/packages/glibc/2.16.0/430-alpha-creat.patch new file mode 100644 index 0000000..da6ddda --- /dev/null +++ b/packages/glibc/2.16.0/430-alpha-creat.patch @@ -0,0 +1,14 @@ +alpha does not have a __NR_creat + +http://bugs.gentoo.org/227275 +http://sourceware.org/bugzilla/show_bug.cgi?id=6650 + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2007-11-10 20:34:26.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/wordsize-64/creat64.c 2009-11-13 00:50:51.000000000 +0100 +@@ -1 +1,5 @@ + /* Defined as alias for the syscall. */ ++#include ++#ifndef __NR_creat ++#include "../../../../../io/creat64.c" ++#endif diff --git a/packages/glibc/2.16.0/490-alpha_alpha-add-fdatasync-support.patch b/packages/glibc/2.16.0/490-alpha_alpha-add-fdatasync-support.patch new file mode 100644 index 0000000..acf250d --- /dev/null +++ b/packages/glibc/2.16.0/490-alpha_alpha-add-fdatasync-support.patch @@ -0,0 +1,126 @@ +2009-07-25 Aurelien Jarno + + * sysdeps/unix/sysv/linux/kernel-features.h: define + __ASSUME_FDATASYNC. + * sysdeps/unix/sysv/linux/fdatasync.c: New file. + * sysdeps/unix/sysv/linux/Makefile: compile fdatasync.c with + -fexceptions. + * sysdeps/unix/sysv/linux/syscalls.list: Remove fdatasync. + + sysdeps/unix/sysv/linux/Makefile | 1 + sysdeps/unix/sysv/linux/fdatasync.c | 69 ++++++++++++++++++++++++++++++ + sysdeps/unix/sysv/linux/kernel-features.h | 6 ++ + sysdeps/unix/sysv/linux/syscalls.list | 1 + 4 files changed, 76 insertions(+), 1 deletion(-) + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile glibc-2.13/sysdeps/unix/sysv/linux/Makefile +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/Makefile 2009-03-02 17:15:13.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/Makefile 2009-11-13 00:51:04.000000000 +0100 +@@ -21,6 +21,7 @@ + setfsuid setfsgid makedev epoll_pwait signalfd \ + eventfd eventfd_read eventfd_write prlimit + ++CFLAGS-fdatasync.c = -fexceptions + CFLAGS-gethostid.c = -fexceptions + CFLAGS-tst-writev.c += "-DARTIFICIAL_LIMIT=0x80000000-__getpagesize()" + +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/fdatasync.c 1970-01-01 01:00:00.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/fdatasync.c 2009-11-13 00:51:04.000000000 +0100 +@@ -0,0 +1,69 @@ ++/* fdatasync -- synchronize at least the data part of a file with ++ the underlying media. Linux version. ++ ++ Copyright (C) 2007 Free Software Foundation, Inc. ++ This file is part of the GNU C Library. ++ ++ The GNU C Library is free software; you can redistribute it and/or ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++#if defined __NR_fdatasync && !defined __ASSUME_FDATASYNC ++static int __have_no_fdatasync; ++#endif ++ ++static int ++do_fdatasync (int fd) ++{ ++#ifdef __ASSUME_FDATASYNC ++ return INLINE_SYSCALL (fdatasync, 1, fd); ++#elif defined __NR_fdatasync ++ if (!__builtin_expect (__have_no_fdatasync, 0)) ++ { ++ int result = INLINE_SYSCALL (fdatasync, 1, fd); ++ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS) ++ return result; ++ ++ __have_no_fdatasync = 1; ++ } ++#endif ++ return INLINE_SYSCALL (fsync, 1, fd); ++} ++ ++int ++__fdatasync (int fd) ++{ ++ if (SINGLE_THREAD_P) ++ return do_fdatasync (fd); ++ ++ int oldtype = LIBC_CANCEL_ASYNC (); ++ ++ int result = do_fdatasync (fd); ++ ++ LIBC_CANCEL_RESET (oldtype); ++ ++ return result; ++} ++ ++weak_alias (__fdatasync, fdatasync) ++ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:50:45.000000000 +0100 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2009-11-13 00:51:04.000000000 +0100 +@@ -459,6 +459,12 @@ + # define __ASSUME_FUTEX_LOCK_PI 1 + #endif + ++/* Support for fsyncdata syscall was added in 2.6.22 on alpha, but it ++ was already present in 2.0 kernels on other architectures. */ ++#if (!defined __alpha || __LINUX_KERNEL_VERSION >= 0x020616) ++# define __ASSUME_FDATASYNC 1 ++#endif ++ + /* Support for utimensat syscall was added in 2.6.22, on SH + only after 2.6.22-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020616 \ +diff -durN glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list +--- glibc-2.13.orig/sysdeps/unix/sysv/linux/syscalls.list 2008-08-02 01:29:08.000000000 +0200 ++++ glibc-2.13/sysdeps/unix/sysv/linux/syscalls.list 2009-11-13 00:51:04.000000000 +0100 +@@ -11,7 +11,6 @@ + epoll_create1 EXTRA epoll_create1 i:i epoll_create1 + epoll_ctl EXTRA epoll_ctl i:iiip epoll_ctl + epoll_wait EXTRA epoll_wait Ci:ipii epoll_wait +-fdatasync - fdatasync Ci:i fdatasync + flock - flock i:ii __flock flock + fork - fork i: __libc_fork __fork fork + get_kernel_syms EXTRA get_kernel_syms i:p get_kernel_syms diff --git a/packages/glibc/2.16.0/560-ppc-atomic.patch b/packages/glibc/2.16.0/560-ppc-atomic.patch new file mode 100644 index 0000000..ee1cb90 --- /dev/null +++ b/packages/glibc/2.16.0/560-ppc-atomic.patch @@ -0,0 +1,415 @@ +sniped from suse + +Index: sysdeps/powerpc/bits/atomic.h +=================================================================== +RCS file: /cvs/glibc/libc/sysdeps/powerpc/bits/atomic.h,v +retrieving revision 1.17 +diff -u -a -p -r1.17 atomic.h + +diff -durN glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h glibc-2.13/sysdeps/powerpc/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/bits/atomic.h 2007-03-26 22:15:28.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -85,14 +85,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -102,14 +102,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpw %0,%2\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -118,12 +118,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -132,11 +132,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stwcx. %3,0,%2\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stwcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -144,12 +144,12 @@ + #define __arch_atomic_exchange_and_add_32(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stwcx. %1,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -157,12 +157,12 @@ + #define __arch_atomic_increment_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -170,27 +170,27 @@ + #define __arch_atomic_decrement_val_32(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: lwarx %0,0,%2\n" \ ++ __asm __volatile ("1: lwarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stwcx. %0,0,%2\n" \ ++ " stwcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_32(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: lwarx %0,0,%3\n" \ ++ __asm __volatile ("1: lwarx %0,%y2\n" \ + " cmpwi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stwcx. %1,0,%3\n" \ ++ " stwcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*mem) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/powerpc32/bits/atomic.h 2007-03-26 22:15:45.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/powerpc32/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile ( \ +- "1: lwarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -60,14 +60,14 @@ + ({ \ + unsigned int __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: lwarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stwcx. %3,0,%1\n" \ ++ " stwcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +diff -durN glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h +--- glibc-2.13.orig/sysdeps/powerpc/powerpc64/bits/atomic.h 2007-03-26 22:16:03.000000000 +0200 ++++ glibc-2.13/sysdeps/powerpc/powerpc64/bits/atomic.h 2009-11-13 00:51:19.000000000 +0100 +@@ -44,14 +44,14 @@ + ({ \ + unsigned int __tmp, __tmp2; \ + __asm __volatile (" clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -61,14 +61,14 @@ + unsigned int __tmp, __tmp2; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ + " clrldi %1,%1,32\n" \ +- "1: lwarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: lwarx %0,%y2" MUTEX_HINT_REL "\n" \ + " subf. %0,%1,%0\n" \ + " bne 2f\n" \ +- " stwcx. %4,0,%2\n" \ ++ " stwcx. %4,%y2\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp), "=r" (__tmp2) \ +- : "b" (mem), "1" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "=r" (__tmp2), "+Z" (*(mem)) \ ++ : "1" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -82,14 +82,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -98,14 +98,14 @@ + ({ \ + unsigned long __tmp; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " subf. %0,%2,%0\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (mem), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp != 0; \ + }) +@@ -115,14 +115,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile ( \ +- "1: ldarx %0,0,%1" MUTEX_HINT_ACQ "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -132,14 +132,14 @@ + __typeof (*(mem)) __tmp; \ + __typeof (mem) __memp = (mem); \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%1" MUTEX_HINT_REL "\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ + " cmpd %0,%2\n" \ + " bne 2f\n" \ +- " stdcx. %3,0,%1\n" \ ++ " stdcx. %3,%y1\n" \ + " bne- 1b\n" \ + "2: " \ +- : "=&r" (__tmp) \ +- : "b" (__memp), "r" (oldval), "r" (newval) \ ++ : "=&r" (__tmp), "+Z" (*__memp) \ ++ : "r" (oldval), "r" (newval) \ + : "cr0", "memory"); \ + __tmp; \ + }) +@@ -148,12 +148,12 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_ACQ "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_ACQ "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b\n" \ + " " __ARCH_ACQ_INSTR \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -162,11 +162,11 @@ + ({ \ + __typeof (*mem) __val; \ + __asm __volatile (__ARCH_REL_INSTR "\n" \ +- "1: ldarx %0,0,%2" MUTEX_HINT_REL "\n" \ +- " stdcx. %3,0,%2\n" \ ++ "1: ldarx %0,%y1" MUTEX_HINT_REL "\n" \ ++ " stdcx. %2,%y1\n" \ + " bne- 1b" \ +- : "=&r" (__val), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&r" (__val), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -174,12 +174,12 @@ + #define __arch_atomic_exchange_and_add_64(mem, value) \ + ({ \ + __typeof (*mem) __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ +- " add %1,%0,%4\n" \ +- " stdcx. %1,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ ++ " add %1,%0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "r" (value), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : "r" (value) \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -187,12 +187,12 @@ + #define __arch_atomic_increment_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " addi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) +@@ -200,27 +200,27 @@ + #define __arch_atomic_decrement_val_64(mem) \ + ({ \ + __typeof (*(mem)) __val; \ +- __asm __volatile ("1: ldarx %0,0,%2\n" \ ++ __asm __volatile ("1: ldarx %0,%y1\n" \ + " subi %0,%0,1\n" \ +- " stdcx. %0,0,%2\n" \ ++ " stdcx. %0,%y1\n" \ + " bne- 1b" \ +- : "=&b" (__val), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) + + #define __arch_atomic_decrement_if_positive_64(mem) \ + ({ int __val, __tmp; \ +- __asm __volatile ("1: ldarx %0,0,%3\n" \ ++ __asm __volatile ("1: ldarx %0,%y2\n" \ + " cmpdi 0,%0,0\n" \ + " addi %1,%0,-1\n" \ + " ble 2f\n" \ +- " stdcx. %1,0,%3\n" \ ++ " stdcx. %1,%y2\n" \ + " bne- 1b\n" \ + "2: " __ARCH_ACQ_INSTR \ +- : "=&b" (__val), "=&r" (__tmp), "=m" (*mem) \ +- : "b" (mem), "m" (*mem) \ ++ : "=&b" (__val), "=&r" (__tmp), "+Z" (*(mem)) \ ++ : \ + : "cr0", "memory"); \ + __val; \ + }) diff --git a/packages/glibc/2.16.0/630-mips_shn_undef-hack.patch b/packages/glibc/2.16.0/630-mips_shn_undef-hack.patch new file mode 100644 index 0000000..791d76c --- /dev/null +++ b/packages/glibc/2.16.0/630-mips_shn_undef-hack.patch @@ -0,0 +1,16 @@ +diff -durN glibc-2.13.orig/elf/dl-lookup.c glibc-2.13/elf/dl-lookup.c +--- glibc-2.13.orig/elf/dl-lookup.c 2009-03-30 23:14:32.000000000 +0200 ++++ glibc-2.13/elf/dl-lookup.c 2009-11-13 00:51:36.000000000 +0100 +@@ -301,6 +301,12 @@ + /* FALLTHROUGH */ + case STB_GLOBAL: + success: ++#ifdef __mips__ ++ /* HACK: MIPS marks its lazy evaluation stubs with SHN_UNDEF ++ symbols, we skip them. */ ++ if (sym->st_shndx == SHN_UNDEF) ++ break; ++#endif + /* Global definition. Just what we need. */ + result->s = sym; + result->m = (struct link_map *) map; diff --git a/packages/glibc/2.16.0/640-alpha-atfcts.patch b/packages/glibc/2.16.0/640-alpha-atfcts.patch new file mode 100644 index 0000000..7a8a94a --- /dev/null +++ b/packages/glibc/2.16.0/640-alpha-atfcts.patch @@ -0,0 +1,12 @@ +--- glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h 2010-07-27 14:34:39.000000000 +0300 ++++ glibc-2.13/sysdeps/unix/sysv/linux/kernel-features.h.new 2011-03-10 18:54:37.686795979 +0200 +@@ -437,7 +437,8 @@ + the code. On PPC they were introduced in 2.6.17-rc1, + on SH in 2.6.19-rc1. */ + #if __LINUX_KERNEL_VERSION >= 0x020611 \ +- && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) ++ && (!defined __sh__ || __LINUX_KERNEL_VERSION >= 0x020613) \ ++ && (!defined __alpha__) + # define __ASSUME_ATFCTS 1 + #endif + diff --git a/packages/glibc/2.16.0/650-syslog.patch b/packages/glibc/2.16.0/650-syslog.patch new file mode 100644 index 0000000..c20cafc --- /dev/null +++ b/packages/glibc/2.16.0/650-syslog.patch @@ -0,0 +1,12 @@ +diff -durN glibc-cvs-2.9.orig/misc/syslog.c glibc-cvs-2.9/misc/syslog.c +--- glibc-cvs-2.9.orig/misc/syslog.c 2009-06-01 10:16:50.000000000 +0200 ++++ glibc-cvs-2.9/misc/syslog.c 2009-06-01 10:17:20.000000000 +0200 +@@ -152,7 +152,7 @@ + #define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID + /* Check for invalid bits. */ + if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { +- syslog(INTERNALLOG, ++ __syslog(INTERNALLOG, + "syslog: unknown facility/priority: %x", pri); + pri &= LOG_PRIMASK|LOG_FACMASK; + } diff --git a/packages/glibc/2.16.0/660-debug-readlink_chk-readklinkat_chk.patch b/packages/glibc/2.16.0/660-debug-readlink_chk-readklinkat_chk.patch new file mode 100644 index 0000000..a5a7052 --- /dev/null +++ b/packages/glibc/2.16.0/660-debug-readlink_chk-readklinkat_chk.patch @@ -0,0 +1,24 @@ +diff -dur glibc-cvs-2.9.orig/debug/readlink_chk.c glibc-cvs-2.9/debug/readlink_chk.c +--- glibc-cvs-2.9.orig/debug/readlink_chk.c 2005-03-01 01:41:15.000000000 +0100 ++++ glibc-cvs-2.9/debug/readlink_chk.c 2009-06-01 10:59:37.000000000 +0200 +@@ -25,7 +25,7 @@ + + + ssize_t +-__readlink_chk (const char *path, void *buf, size_t len, size_t buflen) ++__readlink_chk (const char *path, char *buf, size_t len, size_t buflen) + { + if (len > buflen) + __chk_fail (); +diff -dur glibc-cvs-2.9.orig/debug/readlinkat_chk.c glibc-cvs-2.9/debug/readlinkat_chk.c +--- glibc-cvs-2.9.orig/debug/readlinkat_chk.c 2006-04-24 18:56:12.000000000 +0200 ++++ glibc-cvs-2.9/debug/readlinkat_chk.c 2009-06-01 11:07:26.000000000 +0200 +@@ -21,7 +21,7 @@ + + + ssize_t +-__readlinkat_chk (int fd, const char *path, void *buf, size_t len, ++__readlinkat_chk (int fd, const char *path, char *buf, size_t len, + size_t buflen) + { + if (len > buflen) diff --git a/packages/gmp/5.0.5/110-get-mpn_sub_1-size-argument-right.patch b/packages/gmp/5.0.5/110-get-mpn_sub_1-size-argument-right.patch deleted file mode 100644 index 2e0a1af..0000000 --- a/packages/gmp/5.0.5/110-get-mpn_sub_1-size-argument-right.patch +++ /dev/null @@ -1,38 +0,0 @@ - -# HG changeset patch -# User Torbjorn Granlund -# Date 1310730221 -7200 -# Node ID 538dfce27f410b910d5e2f011119269e224d16a3 -# Parent 03ed209dd7efd4f4fff0ce297bb3a8f7e7ba2366 -(mpn_dcpi1_bdiv_q): Get mpn_sub_1 size argument right. - -diff -r 03ed209dd7ef -r 538dfce27f41 mpn/generic/dcpi1_bdiv_q.c ---- a/mpn/generic/dcpi1_bdiv_q.c Thu Jun 16 12:22:24 2011 +0200 -+++ b/mpn/generic/dcpi1_bdiv_q.c Fri Jul 15 13:43:41 2011 +0200 -@@ -7,7 +7,7 @@ - SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST - GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. - --Copyright 2006, 2007, 2009, 2010 Free Software Foundation, Inc. -+Copyright 2006, 2007, 2009, 2010, 2011 Free Software Foundation, Inc. - - This file is part of the GNU MP Library. - -@@ -28,7 +28,6 @@ - #include "gmp-impl.h" - - -- - mp_size_t - mpn_dcpi1_bdiv_q_n_itch (mp_size_t n) - { -@@ -130,7 +129,7 @@ - qn = nn - qn; - while (qn > dn) - { -- mpn_sub_1 (np + dn, np + dn, qn, cy); -+ mpn_sub_1 (np + dn, np + dn, qn - dn, cy); - cy = mpn_dcpi1_bdiv_qr_n (qp, np, dp, dn, dinv, tp); - qp += dn; - np += dn; - diff --git a/packages/gmp/6.0.0a/version.desc b/packages/gmp/6.0.0a/version.desc index fcfe389..71fe2fa 100644 --- a/packages/gmp/6.0.0a/version.desc +++ b/packages/gmp/6.0.0a/version.desc @@ -1 +1,2 @@ obsolete='yes' +archive_dirname='gmp-6.0.0' diff --git a/scripts/functions b/scripts/functions index 26ff88a..1be7af4 100644 --- a/scripts/functions +++ b/scripts/functions @@ -2019,8 +2019,5 @@ CT_DoGetPkgVersion() # Get the version of the package (main or fork) CT_GetPkgVersion() { - local pkg="${1}" - shift - - CT_PackageRun "${pkg}" CT_DoGetPkgVersion + CT_PackageRun "${1}" CT_DoGetPkgVersion } -- cgit v0.10.2-6-g49f6