diff --git a/.gitignore b/.gitignore index e794a91..090442b 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,5 @@ glibc-2.14-394-g8f3b1ff /glibc-2.16.90-05699367.tar.gz /glibc-2.16.90-c30e8edf-fedora.tar.gz /glibc-2.16.90-c30e8edf.tar.gz +/glibc-2.16.90-54a41734-fedora.tar.gz +/glibc-2.16.90-54a41734.tar.gz diff --git a/glibc-fedora-elf-rh737223.patch b/glibc-fedora-elf-rh737223.patch index c20ba96..5ae6e3a 100644 --- a/glibc-fedora-elf-rh737223.patch +++ b/glibc-fedora-elf-rh737223.patch @@ -1,27 +1,15 @@ -From 0c95ab64cb4ec0d22bb222647d9d20c7b4903e38 Mon Sep 17 00:00:00 2001 -From: Andreas Schwab -Date: Fri, 7 Oct 2011 09:31:27 +0200 -Subject: [PATCH] Horrible workaround for horribly broken software - -* Tue Oct 11 2011 Andreas Schwab - 2.14.90-11 -- Horrible workaround for horribly broken software (#737223) - ---- - elf/rtld.c | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) - -diff --git a/elf/rtld.c b/elf/rtld.c -index 978c609..8422b9f 100644 ---- a/elf/rtld.c -+++ b/elf/rtld.c -@@ -1404,7 +1404,9 @@ of this helper program; chances are you did not intend to run this program.\n\ - char *copy = malloc (len); - if (copy == NULL) - _dl_fatal_printf ("out of memory\n"); -- l->l_libname->name = l->l_name = memcpy (copy, dsoname, len); -+ l->l_libname->name = memcpy (copy, dsoname, len); -+ if (GLRO(dl_debug_mask)) -+ l->l_name = copy; - } +Binary files a/elf/.rtld.c.rej.swp and b/elf/.rtld.c.rej.swp differ +diff -Nrup a/elf/setup-vdso.h b/elf/setup-vdso.h +--- a/elf/setup-vdso.h 2012-10-10 21:34:38.000000000 -0600 ++++ b/elf/setup-vdso.h 2012-10-11 09:43:14.152958832 -0600 +@@ -93,7 +93,9 @@ setup_vdso (struct link_map *main_map __ + char *copy = malloc (len); + if (copy == NULL) + _dl_fatal_printf ("out of memory\n"); +- l->l_libname->name = l->l_name = memcpy (copy, dsoname, len); ++ l->l_libname->name = memcpy (copy, dsoname, len); ++ if (GLRO(dl_debug_mask)) ++ l->l_name = copy; + } - /* Add the vDSO to the object list. */ + /* Add the vDSO to the object list. */ diff --git a/glibc-rh552960-2.patch b/glibc-rh552960-2.patch deleted file mode 100644 index c541073..0000000 --- a/glibc-rh552960-2.patch +++ /dev/null @@ -1,434 +0,0 @@ -diff -Nrup a/nptl/Makefile b/nptl/Makefile ---- a/nptl/Makefile 2012-10-05 07:42:57.935825028 -0600 -+++ b/nptl/Makefile 2012-10-05 07:44:08.989533264 -0600 -@@ -206,7 +206,7 @@ tests = tst-typesizes \ - tst-cond1 tst-cond2 tst-cond3 tst-cond4 tst-cond5 tst-cond6 tst-cond7 \ - tst-cond8 tst-cond9 tst-cond10 tst-cond11 tst-cond12 tst-cond13 \ - tst-cond14 tst-cond15 tst-cond16 tst-cond17 tst-cond18 tst-cond19 \ -- tst-cond20 tst-cond21 tst-cond22 tst-cond23 tst-cond24 \ -+ tst-cond20 tst-cond21 tst-cond22 tst-cond23 tst-cond24 tst-cond25 \ - tst-cond-except \ - tst-robust1 tst-robust2 tst-robust3 tst-robust4 tst-robust5 \ - tst-robust6 tst-robust7 tst-robust8 tst-robust9 \ -@@ -276,6 +276,7 @@ gen-as-const-headers = pthread-errnos.sy - LDFLAGS-pthread.so = -Wl,--enable-new-dtags,-z,nodelete,-z,initfirst - - LDFLAGS-tst-cond24 = -lrt -+LDFLAGS-tst-cond25 = -lrt - - include ../Makeconfig - -diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S ---- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S 2012-10-05 07:22:36.000000000 -0600 -+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S 2012-10-05 07:43:27.448703838 -0600 -@@ -649,10 +649,24 @@ __condvar_tw_cleanup: - movl $0x7fffffff, %edx - ENTER_KERNEL - -+ /* Lock the mutex only if we don't own it already. This only happens -+ in case of PI mutexes, if we got cancelled after a successful -+ return of the futex syscall and before disabling async -+ cancellation. */ - 5: movl 24+FRAME_SIZE(%esp), %eax -- call __pthread_mutex_cond_lock -+ movl MUTEX_KIND(%eax), %ebx -+ andl $(ROBUST_BIT|PI_BIT), %ebx -+ cmpl $PI_BIT, %ebx -+ jne 8f - -- movl %esi, (%esp) -+ movl (%eax), %ebx -+ andl $TID_MASK, %ebx -+ cmpl %ebx, %gs:TID -+ je 9f -+ -+8: call __pthread_mutex_cond_lock -+ -+9: movl %esi, (%esp) - .LcallUR: - call _Unwind_Resume - hlt -diff -Nrup a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S ---- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-10-05 07:22:36.000000000 -0600 -+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S 2012-10-05 07:43:27.449703835 -0600 -@@ -566,10 +566,24 @@ __condvar_w_cleanup: - movl $0x7fffffff, %edx - ENTER_KERNEL - -+ /* Lock the mutex only if we don't own it already. This only happens -+ in case of PI mutexes, if we got cancelled after a successful -+ return of the futex syscall and before disabling async -+ cancellation. */ - 5: movl 24+FRAME_SIZE(%esp), %eax -- call __pthread_mutex_cond_lock -+ movl MUTEX_KIND(%eax), %ebx -+ andl $(ROBUST_BIT|PI_BIT), %ebx -+ cmpl $PI_BIT, %ebx -+ jne 8f - -- movl %esi, (%esp) -+ movl (%eax), %ebx -+ andl $TID_MASK, %ebx -+ cmpl %ebx, %gs:TID -+ je 9f -+ -+8: call __pthread_mutex_cond_lock -+ -+9: movl %esi, (%esp) - .LcallUR: - call _Unwind_Resume - hlt -diff -Nrup a/nptl/sysdeps/unix/sysv/linux/pthread-pi-defines.sym b/nptl/sysdeps/unix/sysv/linux/pthread-pi-defines.sym ---- a/nptl/sysdeps/unix/sysv/linux/pthread-pi-defines.sym 2012-10-05 07:22:36.000000000 -0600 -+++ b/nptl/sysdeps/unix/sysv/linux/pthread-pi-defines.sym 2012-10-05 07:43:27.487703680 -0600 -@@ -6,3 +6,4 @@ MUTEX_KIND offsetof (pthread_mutex_t, __ - ROBUST_BIT PTHREAD_MUTEX_ROBUST_NORMAL_NP - PI_BIT PTHREAD_MUTEX_PRIO_INHERIT_NP - PS_BIT PTHREAD_MUTEX_PSHARED_BIT -+TID_MASK FUTEX_TID_MASK -diff -Nrup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S ---- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S 2012-10-05 07:22:36.000000000 -0600 -+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S 2012-10-05 07:43:27.489703672 -0600 -@@ -771,10 +771,24 @@ __condvar_cleanup2: - movl $SYS_futex, %eax - syscall - -+ /* Lock the mutex only if we don't own it already. This only happens -+ in case of PI mutexes, if we got cancelled after a successful -+ return of the futex syscall and before disabling async -+ cancellation. */ - 5: movq 16(%rsp), %rdi -- callq __pthread_mutex_cond_lock -+ movl MUTEX_KIND(%rdi), %eax -+ andl $(ROBUST_BIT|PI_BIT), %eax -+ cmpl $PI_BIT, %eax -+ jne 7f - -- movq 24(%rsp), %rdi -+ movl (%rdi), %eax -+ andl $TID_MASK, %eax -+ cmpl %eax, %fs:TID -+ je 8f -+ -+7: callq __pthread_mutex_cond_lock -+ -+8: movq 24(%rsp), %rdi - movq FRAME_SIZE(%rsp), %r15 - movq FRAME_SIZE+8(%rsp), %r14 - movq FRAME_SIZE+16(%rsp), %r13 -diff -Nrup a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S ---- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-10-05 07:22:36.000000000 -0600 -+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S 2012-10-05 07:43:27.490703667 -0600 -@@ -495,10 +495,24 @@ __condvar_cleanup1: - movl $SYS_futex, %eax - syscall - -+ /* Lock the mutex only if we don't own it already. This only happens -+ in case of PI mutexes, if we got cancelled after a successful -+ return of the futex syscall and before disabling async -+ cancellation. */ - 5: movq 16(%rsp), %rdi -- callq __pthread_mutex_cond_lock -+ movl MUTEX_KIND(%rdi), %eax -+ andl $(ROBUST_BIT|PI_BIT), %eax -+ cmpl $PI_BIT, %eax -+ jne 7f - -- movq 24(%rsp), %rdi -+ movl (%rdi), %eax -+ andl $TID_MASK, %eax -+ cmpl %eax, %fs:TID -+ je 8f -+ -+7: callq __pthread_mutex_cond_lock -+ -+8: movq 24(%rsp), %rdi - .LcallUR: - call _Unwind_Resume@PLT - hlt -diff -Nrup a/nptl/tst-cond25.c b/nptl/tst-cond25.c ---- a/nptl/tst-cond25.c 1969-12-31 17:00:00.000000000 -0700 -+++ b/nptl/tst-cond25.c 2012-10-05 07:43:27.491703663 -0600 -@@ -0,0 +1,282 @@ -+/* Verify that condition variables synchronized by PI mutexes don't hang on -+ on cancellation. -+ Copyright (C) 2012 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, see -+ . */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define NUM 5 -+#define ITERS 10000 -+#define COUNT 100 -+ -+typedef void *(*thr_func) (void *); -+ -+pthread_mutex_t mutex; -+pthread_cond_t cond; -+ -+void cleanup (void *u) -+{ -+ /* pthread_cond_wait should always return with the mutex locked. */ -+ if (pthread_mutex_unlock (&mutex)) -+ abort (); -+} -+ -+void * -+signaller (void *u) -+{ -+ int i, ret = 0; -+ void *tret = NULL; -+ -+ for (i = 0; i < ITERS; i++) -+ { -+ if ((ret = pthread_mutex_lock (&mutex)) != 0) -+ { -+ tret = (void *)1; -+ printf ("signaller:mutex_lock failed: %s\n", strerror (ret)); -+ goto out; -+ } -+ if ((ret = pthread_cond_signal (&cond)) != 0) -+ { -+ tret = (void *)1; -+ printf ("signaller:signal failed: %s\n", strerror (ret)); -+ goto unlock_out; -+ } -+ if ((ret = pthread_mutex_unlock (&mutex)) != 0) -+ { -+ tret = (void *)1; -+ printf ("signaller:mutex_unlock failed: %s\n", strerror (ret)); -+ goto out; -+ } -+ pthread_testcancel (); -+ } -+ -+out: -+ return tret; -+ -+unlock_out: -+ if ((ret = pthread_mutex_unlock (&mutex)) != 0) -+ printf ("signaller:mutex_unlock[2] failed: %s\n", strerror (ret)); -+ goto out; -+} -+ -+void * -+waiter (void *u) -+{ -+ int i, ret = 0; -+ void *tret = NULL; -+ int seq = (int)u; -+ -+ for (i = 0; i < ITERS / NUM; i++) -+ { -+ if ((ret = pthread_mutex_lock (&mutex)) != 0) -+ { -+ tret = (void *)1; -+ printf ("waiter[%u]:mutex_lock failed: %s\n", seq, strerror (ret)); -+ goto out; -+ } -+ pthread_cleanup_push (cleanup, NULL); -+ -+ if ((ret = pthread_cond_wait (&cond, &mutex)) != 0) -+ { -+ tret = (void *)1; -+ printf ("waiter[%u]:wait failed: %s\n", seq, strerror (ret)); -+ goto unlock_out; -+ } -+ -+ if ((ret = pthread_mutex_unlock (&mutex)) != 0) -+ { -+ tret = (void *)1; -+ printf ("waiter[%u]:mutex_unlock failed: %s\n", seq, strerror (ret)); -+ goto out; -+ } -+ pthread_cleanup_pop (0); -+ } -+ -+out: -+ puts ("waiter tests done"); -+ return tret; -+ -+unlock_out: -+ if ((ret = pthread_mutex_unlock (&mutex)) != 0) -+ printf ("waiter:mutex_unlock[2] failed: %s\n", strerror (ret)); -+ goto out; -+} -+ -+void * -+timed_waiter (void *u) -+{ -+ int i, ret; -+ void *tret = NULL; -+ int seq = (int)u; -+ -+ for (i = 0; i < ITERS / NUM; i++) -+ { -+ struct timespec ts; -+ -+ if ((ret = clock_gettime(CLOCK_REALTIME, &ts)) != 0) -+ { -+ tret = (void *)1; -+ printf ("%u:clock_gettime failed: %s\n", seq, strerror (errno)); -+ goto out; -+ } -+ ts.tv_sec += 20; -+ -+ if ((ret = pthread_mutex_lock (&mutex)) != 0) -+ { -+ tret = (void *)1; -+ printf ("waiter[%u]:mutex_lock failed: %s\n", seq, strerror (ret)); -+ goto out; -+ } -+ pthread_cleanup_push (cleanup, NULL); -+ -+ /* We should not time out either. */ -+ if ((ret = pthread_cond_timedwait (&cond, &mutex, &ts)) != 0) -+ { -+ tret = (void *)1; -+ printf ("waiter[%u]:timedwait failed: %s\n", seq, strerror (ret)); -+ goto unlock_out; -+ } -+ if ((ret = pthread_mutex_unlock (&mutex)) != 0) -+ { -+ tret = (void *)1; -+ printf ("waiter[%u]:mutex_unlock failed: %s\n", seq, strerror (ret)); -+ goto out; -+ } -+ pthread_cleanup_pop (0); -+ } -+ -+out: -+ puts ("timed_waiter tests done"); -+ return tret; -+ -+unlock_out: -+ if ((ret = pthread_mutex_unlock (&mutex)) != 0) -+ printf ("waiter[%u]:mutex_unlock[2] failed: %s\n", seq, strerror (ret)); -+ goto out; -+} -+ -+int -+do_test_wait (thr_func f) -+{ -+ pthread_t w[NUM]; -+ pthread_t s; -+ pthread_mutexattr_t attr; -+ int i, j, ret = 0; -+ void *thr_ret; -+ -+ for (i = 0; i < COUNT; i++) -+ { -+ if ((ret = pthread_mutexattr_init (&attr)) != 0) -+ { -+ printf ("mutexattr_init failed: %s\n", strerror (ret)); -+ goto out; -+ } -+ -+ if ((ret = pthread_mutexattr_setprotocol (&attr, PTHREAD_PRIO_INHERIT)) != 0) -+ { -+ printf ("mutexattr_setprotocol failed: %s\n", strerror (ret)); -+ goto out; -+ } -+ -+ if ((ret = pthread_cond_init (&cond, NULL)) != 0) -+ { -+ printf ("cond_init failed: %s\n", strerror (ret)); -+ goto out; -+ } -+ -+ if ((ret = pthread_mutex_init (&mutex, &attr)) != 0) -+ { -+ printf ("mutex_init failed: %s\n", strerror (ret)); -+ goto out; -+ } -+ -+ for (j = 0; j < NUM; j++) -+ if ((ret = pthread_create (&w[j], NULL, f, (void *)j)) != 0) -+ { -+ printf ("waiter[%d]: create failed: %s\n", j, strerror (ret)); -+ goto out; -+ } -+ -+ if ((ret = pthread_create (&s, NULL, signaller, NULL)) != 0) -+ { -+ printf ("signaller: create failed: %s\n", strerror (ret)); -+ goto out; -+ } -+ -+ for (j = 0; j < NUM; j++) -+ { -+ if ((ret = pthread_cancel (w[j])) != 0) -+ { -+ printf ("waiter[%d]: cancel failed: %s\n", j, strerror (ret)); -+ goto out; -+ } -+ -+ if ((ret = pthread_join (w[j], &thr_ret)) != 0) -+ { -+ printf ("waiter[%d]: join failed: %s\n", j, strerror (ret)); -+ goto out; -+ } -+ -+ if (thr_ret != NULL && thr_ret != PTHREAD_CANCELED) -+ { -+ ret = 1; -+ goto out; -+ } -+ } -+ -+ /* The signalling thread could have ended before it was cancelled. */ -+ pthread_cancel (s); -+ -+ if ((ret = pthread_join (s, &thr_ret)) != 0) -+ { -+ printf ("signaller: join failed: %s\n", strerror (ret)); -+ goto out; -+ } -+ -+ if (thr_ret != NULL && thr_ret != PTHREAD_CANCELED) -+ { -+ ret = 1; -+ goto out; -+ } -+ } -+ -+out: -+ return ret; -+} -+ -+int -+do_test (int argc, char **argv) -+{ -+ int ret = do_test_wait (waiter); -+ -+ if (ret) -+ return ret; -+ -+ return do_test_wait (timed_waiter); -+} -+ -+#define TIMEOUT 5 -+#include "../test-skeleton.c" diff --git a/glibc-rh858274.patch b/glibc-rh858274.patch deleted file mode 100644 index 366c7cc..0000000 --- a/glibc-rh858274.patch +++ /dev/null @@ -1,383 +0,0 @@ -diff -Nrup a/NEWS b/NEWS ---- a/NEWS 2012-09-14 14:31:29.000000000 -0600 -+++ b/NEWS 2012-09-20 15:43:07.883932826 -0600 -@@ -27,9 +27,6 @@ Version 2.17 - * SystemTap static probes have been added into the dynamic linker. - Implemented by Gary Benson. - --* Optimizations of string functions strstr, strcasestr and memmem. -- Implemented by Maxim Kuvyrkov. -- - * The minimum Linux kernel version that this version of the GNU C Library - can be used with is 2.6.16. - -diff -Nrup a/string/Makefile b/string/Makefile ---- a/string/Makefile 2012-09-14 14:31:29.000000000 -0600 -+++ b/string/Makefile 2012-09-20 15:42:02.189221257 -0600 -@@ -1,4 +1,4 @@ --# Copyright (C) 1991-2002, 2005-2011, 2012 Free Software Foundation, Inc. -+# Copyright (C) 1991-2002, 2005-2010, 2011 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 -@@ -56,7 +56,9 @@ tests := tester inl-tester noinl-tester - tst-strtok tst-strxfrm bug-strcoll1 tst-strfry \ - bug-strtok1 $(addprefix test-,$(strop-tests)) \ - bug-envz1 tst-strxfrm2 tst-endian tst-svc2 \ -- bug-strstr1 bug-strcasestr1 bug-strchr1 tst-strtok_r -+ bug-strstr1 bug-strchr1 -+distribute := memcopy.h pagecopy.h tst-svc.expect test-string.h \ -+ str-two-way.h - - - include ../Rules -@@ -74,7 +76,6 @@ CFLAGS-stratcliff.c = -fno-builtin - CFLAGS-test-ffs.c = -fno-builtin - CFLAGS-tst-inlcall.c = -fno-builtin - CFLAGS-bug-strstr1.c = -fno-builtin --CFLAGS-bug-strcasestr1.c = -fno-builtin - - ifeq ($(cross-compiling),no) - tests: $(objpfx)tst-svc.out -diff -Nrup a/string/bug-strcasestr1.c b/string/bug-strcasestr1.c ---- a/string/bug-strcasestr1.c 2012-09-14 14:31:29.000000000 -0600 -+++ b/string/bug-strcasestr1.c 1969-12-31 17:00:00.000000000 -0700 -@@ -1,39 +0,0 @@ --/* Test for non-submitted strcasestr bug. -- Copyright (C) 2012 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, see -- . */ -- --#include --#include -- --#define TEST_FUNCTION do_test () --static int --do_test (void) --{ -- const char haystack[] = "AOKB"; -- const char needle[] = "OK"; -- const char *sub = strcasestr (haystack, needle); -- -- if (sub == NULL) -- { -- fprintf (stderr, "BUG: didn't find \"%s\" in \"%s\"\n", needle, haystack); -- return 1; -- } -- -- return 0; --} -- --#include "../test-skeleton.c" -diff -Nrup a/string/str-two-way.h b/string/str-two-way.h ---- a/string/str-two-way.h 2012-09-14 14:31:29.000000000 -0600 -+++ b/string/str-two-way.h 2012-09-20 15:41:31.478356212 -0600 -@@ -1,5 +1,5 @@ - /* Byte-wise substring search, using the Two-Way algorithm. -- Copyright (C) 2008-2012 Free Software Foundation, Inc. -+ Copyright (C) 2008, 2010 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Eric Blake , 2008. - -@@ -43,7 +43,6 @@ - - #include - #include --#include /* Defines MAX. */ - - /* We use the Two-Way string matching algorithm, which guarantees - linear complexity with constant space. Additionally, for long -@@ -68,6 +67,10 @@ - # define LONG_NEEDLE_THRESHOLD SIZE_MAX - #endif - -+#ifndef MAX -+# define MAX(a, b) ((a < b) ? (b) : (a)) -+#endif -+ - #ifndef CANON_ELEMENT - # define CANON_ELEMENT(c) c - #endif -@@ -75,19 +78,6 @@ - # define CMP_FUNC memcmp - #endif - --#ifndef AVAILABLE1 --# define AVAILABLE1(h, h_l, j, n_l) AVAILABLE (h, h_l, j, n_l) --#endif --#ifndef AVAILABLE2 --# define AVAILABLE2(h, h_l, j, n_l) (1) --#endif --#ifndef RET0_IF_0 --# define RET0_IF_0(a) /* nothing */ --#endif --#ifndef AVAILABLE1_USES_J --# define AVAILABLE1_USES_J (1) --#endif -- - /* Perform a critical factorization of NEEDLE, of length NEEDLE_LEN. - Return the index of the first byte in the right half, and set - *PERIOD to the global period of the right half. -@@ -243,24 +233,17 @@ two_way_short_needle (const unsigned cha - j = 0; - while (AVAILABLE (haystack, haystack_len, j, needle_len)) - { -- const unsigned char *pneedle; -- const unsigned char *phaystack; -- - /* Scan for matches in right half. */ - i = MAX (suffix, memory); -- pneedle = &needle[i]; -- phaystack = &haystack[i + j]; -- while (i < needle_len && (CANON_ELEMENT (*pneedle++) -- == CANON_ELEMENT (*phaystack++))) -+ while (i < needle_len && (CANON_ELEMENT (needle[i]) -+ == CANON_ELEMENT (haystack[i + j]))) - ++i; - if (needle_len <= i) - { - /* Scan for matches in left half. */ - i = suffix - 1; -- pneedle = &needle[i]; -- phaystack = &haystack[i + j]; -- while (memory < i + 1 && (CANON_ELEMENT (*pneedle--) -- == CANON_ELEMENT (*phaystack--))) -+ while (memory < i + 1 && (CANON_ELEMENT (needle[i]) -+ == CANON_ELEMENT (haystack[i + j]))) - --i; - if (i + 1 < memory + 1) - return (RETURN_TYPE) (haystack + j); -@@ -278,81 +261,32 @@ two_way_short_needle (const unsigned cha - } - else - { -- const unsigned char *phaystack = &haystack[suffix]; -- /* The comparison always starts from needle[suffix], so cache it -- and use an optimized first-character loop. */ -- unsigned char needle_suffix = CANON_ELEMENT (needle[suffix]); -- - /* The two halves of needle are distinct; no extra memory is - required, and any mismatch results in a maximal shift. */ - period = MAX (suffix, needle_len - suffix) + 1; - j = 0; -- while (AVAILABLE1 (haystack, haystack_len, j, needle_len)) -+ while (AVAILABLE (haystack, haystack_len, j, needle_len)) - { -- unsigned char haystack_char; -- const unsigned char *pneedle; -- -- /* TODO: The first-character loop can be sped up by adapting -- longword-at-a-time implementation of memchr/strchr. */ -- if (needle_suffix -- != (haystack_char = CANON_ELEMENT (*phaystack++))) -- { -- RET0_IF_0 (haystack_char); --#if AVAILABLE1_USES_J -- ++j; --#endif -- continue; -- } -- --#if !AVAILABLE1_USES_J -- /* Calculate J if it wasn't kept up-to-date in the first-character -- loop. */ -- j = phaystack - &haystack[suffix] - 1; --#endif -- - /* Scan for matches in right half. */ -- i = suffix + 1; -- pneedle = &needle[i]; -- while (i < needle_len) -- { -- if (CANON_ELEMENT (*pneedle++) -- != (haystack_char = CANON_ELEMENT (*phaystack++))) -- { -- RET0_IF_0 (haystack_char); -- break; -- } -- ++i; -- } -+ i = suffix; -+ while (i < needle_len && (CANON_ELEMENT (needle[i]) -+ == CANON_ELEMENT (haystack[i + j]))) -+ ++i; - if (needle_len <= i) - { - /* Scan for matches in left half. */ - i = suffix - 1; -- pneedle = &needle[i]; -- phaystack = &haystack[i + j]; -- while (i != SIZE_MAX) -- { -- if (CANON_ELEMENT (*pneedle--) -- != (haystack_char = CANON_ELEMENT (*phaystack--))) -- { -- RET0_IF_0 (haystack_char); -- break; -- } -- --i; -- } -+ while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) -+ == CANON_ELEMENT (haystack[i + j]))) -+ --i; - if (i == SIZE_MAX) - return (RETURN_TYPE) (haystack + j); - j += period; - } - else - j += i - suffix + 1; -- -- if (!AVAILABLE2 (haystack, haystack_len, j, needle_len)) -- break; -- -- phaystack = &haystack[suffix + j]; - } - } -- ret0: __attribute__ ((unused)) - return NULL; - } - -@@ -404,9 +338,6 @@ two_way_long_needle (const unsigned char - j = 0; - while (AVAILABLE (haystack, haystack_len, j, needle_len)) - { -- const unsigned char *pneedle; -- const unsigned char *phaystack; -- - /* Check the last byte first; if it does not match, then - shift to the next possible match location. */ - shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; -@@ -426,19 +357,15 @@ two_way_long_needle (const unsigned char - /* Scan for matches in right half. The last byte has - already been matched, by virtue of the shift table. */ - i = MAX (suffix, memory); -- pneedle = &needle[i]; -- phaystack = &haystack[i + j]; -- while (i < needle_len - 1 && (CANON_ELEMENT (*pneedle++) -- == CANON_ELEMENT (*phaystack++))) -+ while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) -+ == CANON_ELEMENT (haystack[i + j]))) - ++i; - if (needle_len - 1 <= i) - { - /* Scan for matches in left half. */ - i = suffix - 1; -- pneedle = &needle[i]; -- phaystack = &haystack[i + j]; -- while (memory < i + 1 && (CANON_ELEMENT (*pneedle--) -- == CANON_ELEMENT (*phaystack--))) -+ while (memory < i + 1 && (CANON_ELEMENT (needle[i]) -+ == CANON_ELEMENT (haystack[i + j]))) - --i; - if (i + 1 < memory + 1) - return (RETURN_TYPE) (haystack + j); -@@ -463,9 +390,6 @@ two_way_long_needle (const unsigned char - j = 0; - while (AVAILABLE (haystack, haystack_len, j, needle_len)) - { -- const unsigned char *pneedle; -- const unsigned char *phaystack; -- - /* Check the last byte first; if it does not match, then - shift to the next possible match location. */ - shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; -@@ -477,19 +401,15 @@ two_way_long_needle (const unsigned char - /* Scan for matches in right half. The last byte has - already been matched, by virtue of the shift table. */ - i = suffix; -- pneedle = &needle[i]; -- phaystack = &haystack[i + j]; -- while (i < needle_len - 1 && (CANON_ELEMENT (*pneedle++) -- == CANON_ELEMENT (*phaystack++))) -+ while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) -+ == CANON_ELEMENT (haystack[i + j]))) - ++i; - if (needle_len - 1 <= i) - { - /* Scan for matches in left half. */ - i = suffix - 1; -- pneedle = &needle[i]; -- phaystack = &haystack[i + j]; -- while (i != SIZE_MAX && (CANON_ELEMENT (*pneedle--) -- == CANON_ELEMENT (*phaystack--))) -+ while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) -+ == CANON_ELEMENT (haystack[i + j]))) - --i; - if (i == SIZE_MAX) - return (RETURN_TYPE) (haystack + j); -@@ -503,10 +423,6 @@ two_way_long_needle (const unsigned char - } - - #undef AVAILABLE --#undef AVAILABLE1 --#undef AVAILABLE2 --#undef AVAILABLE1_USES_J - #undef CANON_ELEMENT - #undef CMP_FUNC --#undef RET0_IF_0 - #undef RETURN_TYPE -diff -Nrup a/string/strcasestr.c b/string/strcasestr.c ---- a/string/strcasestr.c 2012-09-14 14:31:29.000000000 -0600 -+++ b/string/strcasestr.c 2012-09-20 15:41:41.709311245 -0600 -@@ -1,5 +1,6 @@ - /* Return the offset of one string within another. -- Copyright (C) 1994-2012 Free Software Foundation, Inc. -+ Copyright (C) 1994, 1996-2000, 2004, 2008, 2009, 2010 -+ 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 -@@ -36,17 +37,13 @@ - #include - #include - --#define TOLOWER(Ch) tolower (Ch) -+#define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) - - /* Two-Way algorithm. */ - #define RETURN_TYPE char * - #define AVAILABLE(h, h_l, j, n_l) \ - (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \ - && ((h_l) = (j) + (n_l))) --#define AVAILABLE1(h, h_l, j, n_l) (true) --#define AVAILABLE2(h, h_l, j, n_l) AVAILABLE (h, h_l, j, n_l) --#define RET0_IF_0(a) if (!a) goto ret0 --#define AVAILABLE1_USES_J (0) - #define CANON_ELEMENT(c) TOLOWER (c) - #define CMP_FUNC(p1, p2, l) \ - __strncasecmp ((const char *) (p1), (const char *) (p2), l) -diff -Nrup a/string/strstr.c b/string/strstr.c ---- a/string/strstr.c 2012-09-14 14:31:29.000000000 -0600 -+++ b/string/strstr.c 2012-09-20 15:42:15.661162080 -0600 -@@ -1,5 +1,6 @@ - /* Return the offset of one string within another. -- Copyright (C) 1994-2012 Free Software Foundation, Inc. -+ Copyright (C) 1994,1996,1997,2000,2001,2003,2008,2009 -+ 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 -@@ -35,10 +36,6 @@ - #define AVAILABLE(h, h_l, j, n_l) \ - (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \ - && ((h_l) = (j) + (n_l))) --#define AVAILABLE1(h, h_l, j, n_l) (true) --#define AVAILABLE2(h, h_l, j, n_l) AVAILABLE (h, h_l, j, n_l) --#define RET0_IF_0(a) if (!a) goto ret0 --#define AVAILABLE1_USES_J (0) - #include "str-two-way.h" - - #undef strstr diff --git a/glibc.spec b/glibc.spec index cba10c5..0d07fb3 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,4 +1,4 @@ -%define glibcsrcdir glibc-2.16.90-c30e8edf +%define glibcsrcdir glibc-2.16.90-54a41734 %define glibcversion 2.16.90 ### glibc.spec.in follows: %define run_glibc_tests 1 @@ -27,7 +27,7 @@ Summary: The GNU libc libraries Name: glibc Version: %{glibcversion} -Release: 23%{?dist} +Release: 24%{?dist} # GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries. # Things that are linked directly into dynamically linked programs # and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional @@ -63,9 +63,7 @@ Source1: %{glibcsrcdir}-fedora.tar.gz # change this. Patch0001: %{name}-fedora-nscd.patch -# Reverting an upstream patch. Once upstream fixes the problem -# Remove this patch and resync. -Patch0002: %{name}-rh858274.patch +Patch0002: %{name}-fedora-regcomp-sw11561.patch # Not likely to be accepted upstream Patch0003: %{name}-rh787201.patch @@ -112,6 +110,7 @@ Patch0037: %{name}-fedora-test-debug-gnuc-hack.patch Patch0038: %{name}-fedora-getconf.patch Patch0039: %{name}-fedora-getrlimit-PLT.patch Patch0040: %{name}-fedora-i386-tls-direct-seg-refs.patch +Patch0041: %{name}-fedora-pt_chown.patch Patch0042: %{name}-fedora-include-bits-ldbl.patch Patch0043: %{name}-fedora-ldd.patch Patch0044: %{name}-fedora-linux-tcsetattr.patch @@ -124,11 +123,9 @@ Patch0050: %{name}-fedora-locarchive.patch Patch0051: %{name}-fedora-manual-dircategory.patch Patch0052: %{name}-fedora-nis-rh188246.patch Patch0053: %{name}-fedora-nptl-linklibc.patch +Patch0054: %{name}-fedora-ppc-unwind.patch Patch0055: %{name}-fedora-nss-files-overflow-fix.patch -Patch0057: %{name}-fedora-ppc-unwind.patch -Patch0058: %{name}-fedora-pt_chown.patch -Patch0059: %{name}-fedora-regcomp-sw11561.patch -Patch0060: %{name}-fedora-strict-aliasing.patch +Patch0056: %{name}-fedora-strict-aliasing.patch # # Patches from upstream @@ -184,10 +181,7 @@ Patch2027: %{name}-rh819430.patch # See http://sourceware.org/ml/libc-alpha/2012-06/msg00074.html Patch2028: %{name}-rh767693-2.patch -# Upstream BZ 14652 -Patch2062: %{name}-rh552960-2.patch - -Patch2063: %{name}-rh864820.patch +Patch2057: %{name}-rh864820.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Obsoletes: glibc-profile < 2.4 @@ -452,6 +446,7 @@ package or when debugging this package. %patch0038 -p1 %patch0039 -p1 %patch0040 -p1 +%patch0041 -p1 %patch0042 -p1 %patch0043 -p1 %patch0044 -p1 @@ -464,13 +459,10 @@ package or when debugging this package. %patch0051 -p1 %patch0052 -p1 %patch0053 -p1 +%patch0054 -p1 %patch0055 -p1 -%patch0057 -p1 -%patch0058 -p1 -%patch0059 -p1 -%patch0060 -p1 -%patch2062 -p1 -%patch2063 -p1 +%patch0056 -p1 +%patch2057 -p1 # On powerpc32, hp timing is only available in power4/power6 # libs, not in base, so pre-power4 dynamic linker is incompatible @@ -1265,6 +1257,12 @@ rm -f *.filelist* %endif %changelog +* Thu Oct 11 2012 Jeff Law - 2.16.90-24 + - Rsync with upstream sources + - Drop local 552960-2 patch now that it's upstream. + - Drop local 858274 patch now that the root problem is fixed upstream. + - Repack patchlist. + * Wed Oct 10 2012 Siddhesh Poyarekar - 2.16.90-23 - Fix Marathi names for Wednesday, September and October (#rh864820). diff --git a/sources b/sources index a67f255..dd33f77 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -64ded9e5fb9e997c6ffd8d8d3e30257d glibc-2.16.90-c30e8edf-fedora.tar.gz -4805adad605f492302e942964a16cb71 glibc-2.16.90-c30e8edf.tar.gz +7cbd47d13972f3c11ad3f5ab1c22d4d7 glibc-2.16.90-54a41734-fedora.tar.gz +cd3e0a870c7a960385978c0b6e77ec54 glibc-2.16.90-54a41734.tar.gz