r6055 - in glibc-package/trunk/debian: . patches patches/hppa
Author: aurel32
Date: 2014-05-07 23:02:20 +0000 (Wed, 07 May 2014)
New Revision: 6055
Added:
glibc-package/trunk/debian/patches/hppa/local-atomic.diff
glibc-package/trunk/debian/patches/hppa/local-elf-make-cflags.diff
glibc-package/trunk/debian/patches/hppa/local-fanotify_mark-5i.diff
glibc-package/trunk/debian/patches/hppa/local-fcntl-osync.diff
glibc-package/trunk/debian/patches/hppa/local-fpu.diff
glibc-package/trunk/debian/patches/hppa/local-pthread_spin_unlock.diff
glibc-package/trunk/debian/patches/hppa/local-setjmp-namespace.diff
glibc-package/trunk/debian/patches/hppa/local-shmlba.diff
Removed:
glibc-package/trunk/debian/patches/hppa/local-longjmp-chk.diff
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/patches/series
Log:
patches/hppa/*.diff: apply changes from John David Anglin
<dave.anglin@bell.net>. Closes: #725508.
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2014-05-07 19:23:08 UTC (rev 6054)
+++ glibc-package/trunk/debian/changelog 2014-05-07 23:02:20 UTC (rev 6055)
@@ -38,6 +38,8 @@
* local/manpages/sprof.1, local/manpages/rpcgen.1: apply typographical
fixes from Bjarni Ingi Gislason <bjarniig@rhi.hi.is>. Closes: #726849,
#740973.
+ * patches/hppa/*.diff: apply changes from John David Anglin
+ <dave.anglin@bell.net>. Closes: #725508.
-- Adam Conrad <adconrad@0c3.net> Sun, 27 Apr 2014 23:15:13 -0600
Added: glibc-package/trunk/debian/patches/hppa/local-atomic.diff
===================================================================
--- glibc-package/trunk/debian/patches/hppa/local-atomic.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hppa/local-atomic.diff 2014-05-07 23:02:20 UTC (rev 6055)
@@ -0,0 +1,80 @@
+--- eglibc-2.18/ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h.save 2014-02-17 20:59:55.783974838 -0500
++++ eglibc-2.18/ports/sysdeps/unix/sysv/linux/hppa/bits/atomic.h 2014-02-18 18:40:53.186081865 -0500
+@@ -61,42 +61,46 @@
+
+ #if __ASSUME_LWS_CAS
+ /* The only basic operation needed is compare and exchange. */
+-# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
+- ({ \
+- volatile int lws_errno; \
+- volatile int lws_ret; \
+- asm volatile( \
+- "0: \n\t" \
+- "copy %2, %%r26 \n\t" \
+- "copy %3, %%r25 \n\t" \
+- "copy %4, %%r24 \n\t" \
+- "ble " _LWS "(%%sr2, %%r0) \n\t" \
+- "ldi " _LWS_CAS ", %%r20 \n\t" \
+- "ldi " _ASM_EAGAIN ", %%r24 \n\t" \
+- "cmpb,=,n %%r24, %%r21, 0b \n\t" \
+- "nop \n\t" \
+- "ldi " _ASM_EDEADLOCK ", %%r25 \n\t" \
+- "cmpb,=,n %%r25, %%r21, 0b \n\t" \
+- "nop \n\t" \
+- "stw %%r28, %0 \n\t" \
+- "stw %%r21, %1 \n\t" \
+- : "=m" (lws_ret), "=m" (lws_errno) \
+- : "r" (mem), "r" (oldval), "r" (newval) \
+- : _LWS_CLOBBER \
+- ); \
+- \
+- if(lws_errno == -EFAULT || lws_errno == -ENOSYS) \
+- ABORT_INSTRUCTION; \
+- \
+- lws_ret; \
+- })
++static int __attribute__((noinline))
++__atomic_compare_and_exchange_val_acq (int mem, int newval, int oldval)
++{
++ volatile int lws_errno;
++ volatile int lws_ret;
++ asm volatile(
++ "0: \n\t"
++ "copy %2, %%r26 \n\t"
++ "copy %3, %%r25 \n\t"
++ "copy %4, %%r24 \n\t"
++ "ble " _LWS "(%%sr2, %%r0) \n\t"
++ "ldi " _LWS_CAS ", %%r20 \n\t"
++ "ldi " _ASM_EAGAIN ", %%r24 \n\t"
++ "cmpb,=,n %%r24, %%r21, 0b \n\t"
++ "nop \n\t"
++ "ldi " _ASM_EDEADLOCK ", %%r25 \n\t"
++ "cmpb,=,n %%r25, %%r21, 0b \n\t"
++ "nop \n\t"
++ "stw %%r28, %0 \n\t"
++ "stw %%r21, %1 \n\t"
++ : "=m" (lws_ret), "=m" (lws_errno)
++ : "r" (mem), "r" (oldval), "r" (newval)
++ : _LWS_CLOBBER
++ );
++
++ if (lws_errno == -EFAULT || lws_errno == -ENOSYS)
++ ABORT_INSTRUCTION;
++
++ return lws_ret;
++}
++# define atomic_compare_and_exchange_val_acq(mem, newval, oldval) \
++ ((__typeof__(oldval)) \
++ __atomic_compare_and_exchange_val_acq ((int)mem, (int)newval, (int)oldval))
+
+ # define atomic_compare_and_exchange_bool_acq(mem, newval, oldval) \
+ ({ \
+- int ret; \
++ __typeof__(oldval) ret; \
+ ret = atomic_compare_and_exchange_val_acq(mem, newval, oldval); \
+ /* Return 1 if it was already acquired. */ \
+- (ret != (int)oldval); \
++ (ret != oldval); \
+ })
+ #else
+ # error __ASSUME_LWS_CAS is required to build glibc.
Added: glibc-package/trunk/debian/patches/hppa/local-elf-make-cflags.diff
===================================================================
--- glibc-package/trunk/debian/patches/hppa/local-elf-make-cflags.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hppa/local-elf-make-cflags.diff 2014-05-07 23:02:20 UTC (rev 6055)
@@ -0,0 +1,13 @@
+Index: eglibc-2.18/elf/Makefile
+===================================================================
+--- eglibc-2.18.orig/elf/Makefile 2014-02-25 20:47:20.859469989 -0500
++++ eglibc-2.18/elf/Makefile 2014-02-25 20:47:20.769469646 -0500
+@@ -424,7 +424,7 @@
+ -D'SLIBDIR="$(slibdir)"' -DIS_IN_ldconfig=1
+ CFLAGS-dl-cache.c = $(SYSCONF-FLAGS)
+ CFLAGS-cache.c = $(SYSCONF-FLAGS)
+-CFLAGS-rtld.c = $(SYSCONF-FLAGS)
++CFLAGS-rtld.c += $(SYSCONF-FLAGS)
+
+ CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),\
+ -DNOT_IN_libc=1 -DIS_IN_rtld=1 -DIN_LIB=rtld)
Added: glibc-package/trunk/debian/patches/hppa/local-fanotify_mark-5i.diff
===================================================================
--- glibc-package/trunk/debian/patches/hppa/local-fanotify_mark-5i.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hppa/local-fanotify_mark-5i.diff 2014-05-07 23:02:20 UTC (rev 6055)
@@ -0,0 +1,9 @@
+Index: eglibc-2.18/ports/sysdeps/unix/sysv/linux/hppa/syscalls.list
+===================================================================
+--- eglibc-2.18.orig/ports/sysdeps/unix/sysv/linux/hppa/syscalls.list 2014-02-24 20:50:56.481899712 -0500
++++ eglibc-2.18/ports/sysdeps/unix/sysv/linux/hppa/syscalls.list 2014-02-24 20:50:56.391899294 -0500
+@@ -36,3 +36,4 @@
+ setrlimit - setrlimit i:ip __setrlimit setrlimit
+ getrlimit - getrlimit i:ip __getrlimit getrlimit
+ prlimit64 EXTRA prlimit64 i:iipp __prlimit64 prlimit64@@GLIBC_2.17
++fanotify_mark EXTRA fanotify_mark i:iiiiis __fanotify_mark fanotify_mark@@GLIBC_2.17
Added: glibc-package/trunk/debian/patches/hppa/local-fcntl-osync.diff
===================================================================
--- glibc-package/trunk/debian/patches/hppa/local-fcntl-osync.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hppa/local-fcntl-osync.diff 2014-05-07 23:02:20 UTC (rev 6055)
@@ -0,0 +1,13 @@
+Index: eglibc-2.17/ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h
+===================================================================
+--- eglibc-2.17.orig/ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h 2012-11-06 12:31:45.000000000 -0500
++++ eglibc-2.17/ports/sysdeps/unix/sysv/linux/hppa/bits/fcntl.h 2013-11-02 17:50:08.839898488 -0400
+@@ -27,7 +27,7 @@
+ #define O_NONBLOCK 00200004 /* HPUX has separate NDELAY & NONBLOCK */
+ #define __O_DSYNC 01000000
+ #define __O_RSYNC 02000000 /* HPUX only */
+-#define __O_SYNC 01000000
++#define __O_SYNC 00100000
+ #define O_SYNC (__O_SYNC|__O_DSYNC)
+
+ #define O_BLKSEEK 00000100 /* HPUX only */
Added: glibc-package/trunk/debian/patches/hppa/local-fpu.diff
===================================================================
--- glibc-package/trunk/debian/patches/hppa/local-fpu.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hppa/local-fpu.diff 2014-05-07 23:02:20 UTC (rev 6055)
@@ -0,0 +1,46 @@
+Index: eglibc-2.18/ports/sysdeps/hppa/fpu/feholdexcpt.c
+===================================================================
+--- eglibc-2.18.orig/ports/sysdeps/hppa/fpu/feholdexcpt.c 2013-06-15 13:37:04.000000000 -0400
++++ eglibc-2.18/ports/sysdeps/hppa/fpu/feholdexcpt.c 2014-04-09 21:01:32.492451011 -0400
+@@ -29,8 +29,8 @@
+ /* Store the environment. */
+ bufptr = clear.buf;
+ __asm__ (
+- "fstd,ma %%fr0,8(%1)\n"
+- : "=m" (clear), "+r" (bufptr) : : "%r0");
++ "fstd %%fr0,0(%1)\n"
++ : "=m" (clear) : "r" (bufptr) : "%r0");
+ memcpy (envp, &clear.env, sizeof (fenv_t));
+
+ /* Clear exception queues */
+@@ -44,7 +44,7 @@
+ Thus we start bufptr at the end and work backwards */
+ bufptr = (unsigned long long *)((unsigned int)(clear.buf) + sizeof(unsigned int)*4);
+ __asm__ (
+- "fldd,mb -8(%0),%%fr0\n"
++ "fldd 0(%0),%%fr0\n"
+ : : "r" (bufptr), "m" (clear) : "%r0");
+
+ return 0;
+Index: eglibc-2.18/ports/sysdeps/hppa/fpu/fesetenv.c
+===================================================================
+--- eglibc-2.18.orig/ports/sysdeps/hppa/fpu/fesetenv.c 2013-06-15 13:37:04.000000000 -0400
++++ eglibc-2.18/ports/sysdeps/hppa/fpu/fesetenv.c 2014-04-09 20:59:45.221386729 -0400
+@@ -33,7 +33,7 @@
+ we want to use from the environment specified by the parameter. */
+ bufptr = temp.buf;
+ __asm__ (
+- "fstd,ma %%fr0,8(%1)\n"
++ "fstd %%fr0,0(%1)\n"
+ : "=m" (temp) : "r" (bufptr) : "%r0");
+
+ temp.env.__status_word &= ~(FE_ALL_EXCEPT
+@@ -54,7 +54,7 @@
+ we take advantage of that to load in reverse order so fr0
+ is loaded last and T-Bit is enabled. */
+ __asm__ (
+- "fldd,mb -8(%1),%%fr0\n"
++ "fldd 0(%1),%%fr0\n"
+ : : "m" (temp), "r" (bufptr) : "%r0" );
+
+ /* Success. */
Deleted: glibc-package/trunk/debian/patches/hppa/local-longjmp-chk.diff
===================================================================
--- glibc-package/trunk/debian/patches/hppa/local-longjmp-chk.diff 2014-05-07 19:23:08 UTC (rev 6054)
+++ glibc-package/trunk/debian/patches/hppa/local-longjmp-chk.diff 2014-05-07 23:02:20 UTC (rev 6055)
@@ -1,14 +0,0 @@
----
- ports/sysdeps/unix/sysv/linux/hppa/____longjmp_chk.S | 7 +++++++
- 1 file changed, 7 insertions(+)
-
---- /dev/null
-+++ b/ports/sysdeps/unix/sysv/linux/hppa/____longjmp_chk.S
-@@ -0,0 +1,7 @@
-+/* Jump to the position specified by ENV, causing the
-+ setjmp call there to return VAL, or 1 if VAL is 0.
-+ void __longjmp (__jmp_buf env, int val). */
-+
-+#warning longjmp_chk unimplemented
-+#define __longjmp ____longjmp_chk
-+#include<__longjmp.S>
Added: glibc-package/trunk/debian/patches/hppa/local-pthread_spin_unlock.diff
===================================================================
--- glibc-package/trunk/debian/patches/hppa/local-pthread_spin_unlock.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hppa/local-pthread_spin_unlock.diff 2014-05-07 23:02:20 UTC (rev 6055)
@@ -0,0 +1,36 @@
+Index: eglibc-2.18/ports/sysdeps/hppa/nptl/pthread_spin_init.c
+===================================================================
+--- eglibc-2.18.orig/ports/sysdeps/hppa/nptl/pthread_spin_init.c 2013-06-15 13:37:04.000000000 -0400
++++ eglibc-2.18/ports/sysdeps/hppa/nptl/pthread_spin_init.c 2014-05-03 17:52:31.677662598 -0400
+@@ -20,9 +20,9 @@
+ int
+ pthread_spin_init (pthread_spinlock_t *lock, int pshared)
+ {
+- int tmp = 0;
+- /* This should be a memory barrier to newer compilers */
+- __asm__ __volatile__ ("stw,ma %1,0(%0)"
+- : : "r" (lock), "r" (tmp) : "memory");
++ /* The LWS-CAS operation on hppa is a synthetic atomic operation
++ that doesn't provide the type of coherency that we need. Therefore
++ we force that coherency by using LWS-CAS again. */
++ atomic_exchange_rel (lock, 0);
+ return 0;
+ }
+Index: eglibc-2.18/ports/sysdeps/hppa/nptl/pthread_spin_unlock.c
+===================================================================
+--- eglibc-2.18.orig/ports/sysdeps/hppa/nptl/pthread_spin_unlock.c 2013-06-15 13:37:04.000000000 -0400
++++ eglibc-2.18/ports/sysdeps/hppa/nptl/pthread_spin_unlock.c 2014-05-03 17:54:51.829030840 -0400
+@@ -20,9 +20,9 @@
+ int
+ pthread_spin_unlock (pthread_spinlock_t *lock)
+ {
+- int tmp = 0;
+- /* This should be a memory barrier to newer compilers */
+- __asm__ __volatile__ ("stw,ma %1,0(%0)"
+- : : "r" (lock), "r" (tmp) : "memory");
++ /* The LWS-CAS operation on hppa is a synthetic atomic operation
++ that doesn't provide the type of coherency that we need. Therefore
++ we force that coherency by using LWS-CAS again. */
++ atomic_exchange_rel (lock, 0);
+ return 0;
+ }
Added: glibc-package/trunk/debian/patches/hppa/local-setjmp-namespace.diff
===================================================================
--- glibc-package/trunk/debian/patches/hppa/local-setjmp-namespace.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hppa/local-setjmp-namespace.diff 2014-05-07 23:02:20 UTC (rev 6055)
@@ -0,0 +1,13 @@
+Index: eglibc-2.17/ports/sysdeps/hppa/bits/setjmp.h
+===================================================================
+--- eglibc-2.17.orig/ports/sysdeps/hppa/bits/setjmp.h 2013-07-07 16:03:20.000000000 -0400
++++ eglibc-2.17/ports/sysdeps/hppa/bits/setjmp.h 2013-07-07 16:37:39.000000000 -0400
+@@ -38,7 +38,7 @@
+ * 10 x 64-bit fprs in this order:
+ - fr12-fr21 (callee saves)
+ Note: We have 8 bytes of free space for future uses. */
+-typedef union
++typedef union __jmp_buf_internal
+ {
+ struct __jmp_buf_internal_tag
+ {
Added: glibc-package/trunk/debian/patches/hppa/local-shmlba.diff
===================================================================
--- glibc-package/trunk/debian/patches/hppa/local-shmlba.diff (rev 0)
+++ glibc-package/trunk/debian/patches/hppa/local-shmlba.diff 2014-05-07 23:02:20 UTC (rev 6055)
@@ -0,0 +1,13 @@
+Index: eglibc-2.18/ports/sysdeps/unix/sysv/linux/hppa/bits/shm.h
+===================================================================
+--- eglibc-2.18.orig/ports/sysdeps/unix/sysv/linux/hppa/bits/shm.h 2013-01-09 19:28:48.000000000 -0500
++++ eglibc-2.18/ports/sysdeps/unix/sysv/linux/hppa/bits/shm.h 2014-04-09 21:08:06.516202583 -0400
+@@ -36,7 +36,7 @@
+ #define SHM_UNLOCK 12 /* unlock segment (root only) */
+
+ /* Segment low boundary address multiple. */
+-#define SHMLBA 0x00400000 /* address needs to be 4 Mb aligned */
++#define SHMLBA (__getpagesize ())
+
+ /* Type to count number of attaches. */
+ typedef unsigned long int shmatt_t;
Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series 2014-05-07 19:23:08 UTC (rev 6054)
+++ glibc-package/trunk/debian/patches/series 2014-05-07 23:02:20 UTC (rev 6055)
@@ -73,10 +73,16 @@
hppa/submitted-fadvise64_64.diff
hppa/submitted-nptl-carlos.diff
hppa/local-stack-grows-up.diff
-hppa/local-longjmp-chk.diff
hppa/local-lowlevellock.diff
hppa/local-EAGAIN.diff
hppa/cvs-hppa-DL_CALL_DT_INIT_FINI.diff
+hppa/local-elf-make-cflags.diff
+hppa/local-setjmp-namespace.diff
+hppa/local-fcntl-osync.diff
+hppa/local-atomic.diff
+hppa/local-fpu.diff
+hppa/local-shmlba.diff
+hppa/local-pthread_spin_unlock.diff
hurd-i386/cvs-tcbhead_t.diff
hurd-i386/local-enable-ldconfig.diff
Reply to: