[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r2168 - in glibc-package/trunk/debian: . patches patches/hppa



Author: aurel32
Date: 2007-05-03 20:44:05 +0000 (Thu, 03 May 2007)
New Revision: 2168

Added:
   glibc-package/trunk/debian/patches/hppa/submitted-nptl-carlos2.diff
   glibc-package/trunk/debian/patches/hppa/submitted-ustat.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
  * debian/patches/hppa/submitted-ustat.diff: New patch from Jeff Bailey
    to makes glibc build with exported kernel headers.
  * debian/patches/hppa/submitted-nptl-carlos2.diff: New patch to add
    STACK_GROWS_UP case to NPTL.



Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2007-05-03 20:23:22 UTC (rev 2167)
+++ glibc-package/trunk/debian/changelog	2007-05-03 20:44:05 UTC (rev 2168)
@@ -9,8 +9,12 @@
   * patches/any/local-disable-nscd-host-caching.diff: the comment lines
     should have the '#' on the first column.  Closes: #421882.
   * Remove patches/any/local-Rminkernel.diff (not needed anymore).
+  * debian/patches/hppa/submitted-ustat.diff: New patch from Jeff Bailey
+    to makes glibc build with exported kernel headers.
+  * debian/patches/hppa/submitted-nptl-carlos2.diff: New patch to add
+    STACK_GROWS_UP case to NPTL.
 
- -- Aurelien Jarno <aurel32@debian.org>  Thu, 03 May 2007 22:22:45 +0200
+ -- Aurelien Jarno <aurel32@debian.org>  Thu, 03 May 2007 22:42:36 +0200
 
 glibc (2.5-5) unstable; urgency=low
 

Added: glibc-package/trunk/debian/patches/hppa/submitted-nptl-carlos2.diff
===================================================================
--- glibc-package/trunk/debian/patches/hppa/submitted-nptl-carlos2.diff	2007-05-03 20:23:22 UTC (rev 2167)
+++ glibc-package/trunk/debian/patches/hppa/submitted-nptl-carlos2.diff	2007-05-03 20:44:05 UTC (rev 2168)
@@ -0,0 +1,182 @@
+Index: nptl/allocatestack.c
+===================================================================
+RCS file: /cvs/glibc/libc/nptl/allocatestack.c,v
+retrieving revision 1.64
+diff -u -p -r1.64 allocatestack.c
+--- nptl/allocatestack.c	23 Aug 2006 17:39:47 -0000	1.64
++++ nptl/allocatestack.c	5 Feb 2007 23:25:09 -0000
+@@ -289,8 +289,15 @@ change_stack_perm (struct pthread *pd
+ 		      & pagemask) + pd->guardsize) & pagemask));
+   size_t len = pd->stackblock + pd->stackblock_size - stack;
+ #else
++# if _STACK_GROWS_DOWN
+   void *stack = pd->stackblock + pd->guardsize;
+   size_t len = pd->stackblock_size - pd->guardsize;
++# elif _STACK_GROWS_UP
++  void *stack = pd->stackblock;
++  size_t len = (size_t)pd - pd->guardsize - (size_t)pd->stackblock;
++# else
++# error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
++# endif
+ #endif
+   if (mprotect (stack, len, PROT_READ | PROT_WRITE | PROT_EXEC) != 0)
+     return errno;
+@@ -571,7 +578,13 @@ allocate_stack (const struct pthread_att
+ #ifdef NEED_SEPARATE_REGISTER_STACK
+ 	  char *guard = mem + (((size - guardsize) / 2) & ~pagesize_m1);
+ #else
++# if _STACK_GROWS_DOWN
+ 	  char *guard = mem;
++# elif _STACK_GROWS_UP
++	  char *guard = (char *)(((size_t)pd - guardsize) & ~pagesize_m1);
++# else
++# error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
++# endif
+ #endif
+ 	  if (mprotect (guard, guardsize, PROT_NONE) != 0)
+ 	    {
+@@ -619,9 +632,17 @@ allocate_stack (const struct pthread_att
+ 			prot) != 0)
+ 	    goto mprot_error;
+ #else
++# if _STACK_GROWS_DOWN
+ 	  if (mprotect ((char *) mem + guardsize, pd->guardsize - guardsize,
+ 			prot) != 0)
+ 	    goto mprot_error;
++# elif _STACK_GROWS_UP
++	  if (mprotect ((char *) pd - pd->guardsize, 
++			pd->guardsize - guardsize, prot) != 0)
++	    goto mprot_error;
++# else
++# error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
++# endif
+ #endif
+ 
+ 	  pd->guardsize = guardsize;
+@@ -662,7 +683,13 @@ allocate_stack (const struct pthread_att
+   *stack = pd->stackblock;
+   *stacksize = stacktop - *stack;
+ #else
++# if _STACK_GROWS_DOWN
+   *stack = stacktop;
++# elif _STACK_GROWS_UP
++  *stack = pd->stackblock;
++# else
++# error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
++# endif
+ #endif
+ 
+   return 0;
+Index: nptl/pthread_barrier_wait.c
+===================================================================
+RCS file: /cvs/glibc/libc/nptl/pthread_barrier_wait.c,v
+retrieving revision 1.1
+diff -u -p -r1.1 pthread_barrier_wait.c
+--- nptl/sysdeps/pthread/pthread_barrier_wait.c	28 Oct 2006 05:06:42 -0000	1.1
++++ nptl/sysdeps/pthread/pthread_barrier_wait.c	5 Feb 2007 23:25:09 -0000
+@@ -62,7 +62,7 @@ pthread_barrier_wait (barrier)
+       /* Wait for the event counter of the barrier to change.  */
+       do
+ 	lll_futex_wait (&ibarrier->curr_event, event);
+-      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.  */
+Index: nptl/tst-align2.c
+===================================================================
+RCS file: /cvs/glibc/libc/nptl/tst-align2.c,v
+retrieving revision 1.1
+diff -u -p -r1.1 tst-align2.c
+--- nptl/tst-align2.c	22 Dec 2004 20:06:24 -0000	1.1
++++ nptl/tst-align2.c	5 Feb 2007 23:25:09 -0000
+@@ -25,6 +25,8 @@
+ #include <unistd.h>
+ #include <tst-stack-align.h>
+ 
++#include <stackinfo.h>
++
+ static int
+ f (void *arg)
+ {
+@@ -53,8 +55,15 @@ do_test (void)
+   char st[256 * 1024];
+   pid_t p = __clone2 (f, st, sizeof (st), 0, 0);
+ #else
++# if _STACK_GROWS_DOWN
+   char st[128 * 1024];
+   pid_t p = clone (f, st + sizeof (st), 0, 0);
++# elif _STACK_GROWS_UP
++  char st[128 * 1024] __attribute__ ((aligned));
++  pid_t p = clone (f, st, 0, 0);
++# else
++# error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
++# endif
+ #endif
+   if (p == -1)
+     {
+Index: nptl/tst-getpid1.c
+===================================================================
+RCS file: /cvs/glibc/libc/nptl/tst-getpid1.c,v
+retrieving revision 1.4
+diff -u -p -r1.4 tst-getpid1.c
+--- nptl/tst-getpid1.c	13 Mar 2005 03:28:47 -0000	1.4
++++ nptl/tst-getpid1.c	5 Feb 2007 23:25:09 -0000
+@@ -6,6 +6,8 @@
+ #include <sys/types.h>
+ #include <sys/wait.h>
+ 
++#include <stackinfo.h>
++
+ #ifndef TEST_CLONE_FLAGS
+ #define TEST_CLONE_FLAGS 0
+ #endif
+@@ -47,8 +49,15 @@ do_test (void)
+   char st[256 * 1024] __attribute__ ((aligned));
+   pid_t p = __clone2 (f, st, sizeof (st), TEST_CLONE_FLAGS, 0);
+ #else
++# if _STACK_GROWS_DOWN
+   char st[128 * 1024] __attribute__ ((aligned));
+   pid_t p = clone (f, st + sizeof (st), TEST_CLONE_FLAGS, 0);
++# elif _STACK_GROWS_UP
++  char st[128 * 1024] __attribute__ ((aligned));
++  pid_t p = clone (f, st, TEST_CLONE_FLAGS, 0);
++# else
++# error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
++# endif
+ #endif
+   if (p == -1)
+     {
+Index: nptl/sysdeps/pthread/Makefile
+===================================================================
+RCS file: /cvs/glibc/libc/nptl/sysdeps/pthread/Makefile,v
+retrieving revision 1.8
+diff -u -p -r1.8 Makefile
+--- nptl/sysdeps/pthread/Makefile	28 Feb 2006 07:09:41 -0000	1.8
++++ nptl/sysdeps/pthread/Makefile	5 Feb 2007 23:25:09 -0000
+@@ -41,7 +41,9 @@ endif
+ 
+ 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
+ 
+Index: stdio-common/Makefile
+===================================================================
+RCS file: /cvs/glibc/libc/stdio-common/Makefile,v
+retrieving revision 1.99
+diff -u -p -r1.99 Makefile
+--- stdio-common/Makefile	22 Jan 2007 16:17:13 -0000	1.99
++++ stdio-common/Makefile	5 Feb 2007 23:25:09 -0000
+@@ -76,7 +76,7 @@ $(objpfx)tst-printf.out: $(objpfx)tst-pr
+ 	$(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-tst-printf.c = -Wno-format
+ CFLAGS-tstdiomisc.c = -Wno-format
+ CFLAGS-scanf4.c = -Wno-format

Added: glibc-package/trunk/debian/patches/hppa/submitted-ustat.diff
===================================================================
--- glibc-package/trunk/debian/patches/hppa/submitted-ustat.diff	2007-05-03 20:23:22 UTC (rev 2167)
+++ glibc-package/trunk/debian/patches/hppa/submitted-ustat.diff	2007-05-03 20:44:05 UTC (rev 2168)
@@ -0,0 +1,34 @@
+2006-07-16  Jeff Bailey  <jbailey@ubuntu.com>
+
+	* sysdeps/unix/sysv/linux/hppa/sys/procfs.h: Don't include
+	elf.h.
+	Declare elf_greg_t, elf_gregset_t, elf_fpreg_t,
+	and elf_fpregset_t.
+
+Index: sysdeps/unix/sysv/linux/hppa/sys/procfs.h
+===================================================================
+RCS file: /cvs/glibc/ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h,v
+retrieving revision 1.2
+diff -u -p -r1.2 procfs.h
+--- ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h	6 Jul 2001 04:56:16 -0000	1.2
++++ ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h	16 Jul 2006 16:57:39 -0000
+@@ -34,10 +34,18 @@
+ #include <sys/types.h>
+ #include <sys/ucontext.h>
+ #include <sys/user.h>
+-#include <asm/elf.h>
+ 
+ __BEGIN_DECLS
+ 
++typedef unsigned long elf_greg_t;
++#define ELF_NGREG 80    /* We only need 64 at present, but leave space
++			                              for expansion. */
++typedef elf_greg_t elf_gregset_t[ELF_NGREG];
++
++#define ELF_NFPREG 32
++typedef double elf_fpreg_t;
++typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
++
+ struct elf_siginfo
+   {
+     int si_signo;			/* Signal number.  */

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series	2007-05-03 20:23:22 UTC (rev 2167)
+++ glibc-package/trunk/debian/patches/series	2007-05-03 20:44:05 UTC (rev 2168)
@@ -53,6 +53,8 @@
 hppa/cvs-pthreadtypes_h.diff -p0
 hppa/submitted-lt.diff -p0
 hppa/submitted-nptl-carlos.diff -p0
+hppa/submitted-nptl-carlos2.diff -p0
+hppa/submitted-ustat.diff -p0
 hppa/local-inlining.diff -p0
 
 hurd-i386/cvs-futimes.diff -p1



Reply to: