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

r6709 - in glibc-package/branches/glibc-2.21/debian: . patches patches/hppa



Author: aurel32
Date: 2015-11-29 21:50:09 +0000 (Sun, 29 Nov 2015)
New Revision: 6709

Added:
   glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-inline-syscall-rewrite.diff
   glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-sysdep-errno.diff
Modified:
   glibc-package/branches/glibc-2.21/debian/changelog
   glibc-package/branches/glibc-2.21/debian/patches/series
Log:
* patches/hppa/cvs-inline-syscall-rewrite.diff: new patch backported from
  upstream as requested by John David Anglin.
* patches/hppa/cvs-sysdep-errno.diff: new patch backported from upstream as
  requested by John David Anglin.

Modified: glibc-package/branches/glibc-2.21/debian/changelog
===================================================================
--- glibc-package/branches/glibc-2.21/debian/changelog	2015-11-29 15:36:52 UTC (rev 6708)
+++ glibc-package/branches/glibc-2.21/debian/changelog	2015-11-29 21:50:09 UTC (rev 6709)
@@ -11,6 +11,10 @@
     upstream problem.
   * patches/hppa/submitted-mathdef.diff: new patch from John David Anglin to
     define __NO_LONG_DOUBLE_MATH on hppa.  Closes: #805836.
+  * patches/hppa/cvs-inline-syscall-rewrite.diff: new patch backported from
+    upstream as requested by John David Anglin.
+  * patches/hppa/cvs-sysdep-errno.diff: new patch backported from upstream as
+    requested by John David Anglin.
 
   [ Samuel Thibault ]
   * patches/hurd-i386/tg-tls-threadvar.diff: Update, to fix recursion while

Added: glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-inline-syscall-rewrite.diff
===================================================================
--- glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-inline-syscall-rewrite.diff	                        (rev 0)
+++ glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-inline-syscall-rewrite.diff	2015-11-29 21:50:09 UTC (rev 6709)
@@ -0,0 +1,138 @@
+commit 979900af9824932ed1d704323739958f46e08d81
+Author: Mike Frysinger <vapier@gentoo.org>
+Date:   Wed Jul 29 22:55:43 2015 -0400
+
+    hppa: fix sysdep.h header setup
+    
+    The semi-recent SYSCALL_CANCEL inclusion broke hppa due to the sysdep.h
+    headers not including the unix/sysdep.h headers.  Rework the includes so
+    we match the other ports:
+    * hppa/sysdep.h:
+    	- Do not include sys/syscall.h as the unix sysdep.h headers do it.
+    	- Do not include config.h as libc-symbols.h does it, and it has no
+    	#ifdef multiple-include protection, and it breaks when some files
+    	do things like #undef __OPTIMIZE__.
+    * sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h:
+    	- Drop the generic/sysdep.h as the unix sysdep.h headers include it.
+    * sysdeps/unix/sysv/linux/hppa/sysdep.h:
+    	- Change to the unix & core hppa sysdep header stacks.
+    	- Undef a few defines that the core headers already set up for us.
+
+commit a822b0187a0b822554c45a815335f5955f5d4b82
+Author: Mike Frysinger <vapier@gentoo.org>
+Date:   Wed Jul 29 23:01:01 2015 -0400
+
+    hppa: rewrite INLINE_SYSCALL
+    
+    The semi-recent SYSCALL_CANCEL macro imposes a slight nuance on the
+    implementation of INLINE_SYSCALL: the nr argument cannot be expanded
+    directly but must be passed on to another macro which may expand it.
+    Most arches don't notice because INLINE_SYSCALL is defined in terms
+    of INTERNAL_SYSCALL which has the additional layer of expansion, but
+    on hppa, it was attempting to expand it directly.  That causes build
+    errors like so:
+    ../sysdeps/unix/sysv/linux/sigsuspend.c: In function '__sigsuspend':
+    ../sysdeps/unix/sysv/linux/sigsuspend.c:31:62: error:
+    	implicit declaration of function 'LOAD_ARGS___SYSCALL_NARGS'
+    ../sysdeps/unix/sysv/linux/sigsuspend.c:31:304: error:
+    	called object 'LOAD_ARGS___SYSCALL_NARGS(set, 8)' is not a function
+    
+    So rewrite hppa's INLINE_SYSCALL to use INTERNAL_SYSCALL like other
+    arches do.  This is also a nice clean up as the two macros had quite
+    a bit of duplicated logic.
+
+--- a/sysdeps/unix/sysv/linux/hppa/sysdep.h
++++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h
+@@ -18,8 +18,11 @@
+    License along with the GNU C Library.  If not, see
+    <http://www.gnu.org/licenses/>.  */
+ 
+-#include <asm/unistd.h>
+-#include <sysdeps/generic/sysdep.h>
++#ifndef _LINUX_HPPA_SYSDEP_H
++#define _LINUX_HPPA_SYSDEP_H 1
++
++#include <sysdeps/unix/sysdep.h>
++#include <sysdeps/hppa/sysdep.h>
+ 
+ /* Defines RTLD_PRIVATE_ERRNO.  */
+ #include <dl-sysdep.h>
+@@ -118,6 +121,7 @@
+    There is currently a bug in gdb which prevents us from specifying
+    incomplete stabs information.  Fake some entries here which specify
+    the current source file.  */
++#undef ENTRY
+ #define	ENTRY(name)							\
+ 	.text						ASM_LINE_SEP	\
+ 	.align ALIGNARG(4)				ASM_LINE_SEP	\
+@@ -174,6 +178,7 @@
+ 	bv,n 0(2)
+ */
+ 
++#undef PSEUDO
+ #define	PSEUDO(name, syscall_name, args)			\
+   ENTRY (name)					ASM_LINE_SEP	\
+   /* If necc. load args from stack */		ASM_LINE_SEP	\
+@@ -362,28 +367,13 @@
+ #undef INLINE_SYSCALL
+ #define INLINE_SYSCALL(name, nr, args...)				\
+ ({									\
+-	long __sys_res;							\
+-	{								\
+-		register unsigned long __res asm("r28");		\
+-		PIC_REG_DEF						\
+-		LOAD_ARGS_##nr(args)					\
+-		/* FIXME: HACK save/load r19 around syscall */		\
+-		asm volatile(						\
+-			SAVE_ASM_PIC					\
+-			"	ble  0x100(%%sr2, %%r0)\n"		\
+-			"	ldi %1, %%r20\n"			\
+-			LOAD_ASM_PIC					\
+-			: "=r" (__res)					\
+-			: "i" (SYS_ify(name)) PIC_REG_USE ASM_ARGS_##nr	\
+-			: "memory", CALL_CLOB_REGS CLOB_ARGS_##nr	\
+-		);							\
+-		__sys_res = (long)__res;				\
+-	}								\
+-	if ( (unsigned long)__sys_res >= (unsigned long)-4095 ){	\
+-		__set_errno(-__sys_res);				\
+-		__sys_res = -1;						\
+-	}								\
+-	__sys_res;							\
++    long __sys_res = INTERNAL_SYSCALL (name, , nr, args);		\
++    if (__glibc_unlikely (INTERNAL_SYSCALL_ERROR_P (__sys_res, )))	\
++      {									\
++	__set_errno (INTERNAL_SYSCALL_ERRNO (__sys_res, ));		\
++	__sys_res = -1;							\
++      }									\
++    __sys_res;								\
+ })
+ 
+ /* INTERNAL_SYSCALL_DECL - Allows us to setup some function static
+@@ -498,3 +488,5 @@
+ /* Pointer mangling is not yet supported for HPPA.  */
+ #define PTR_MANGLE(var) (void) (var)
+ #define PTR_DEMANGLE(var) (void) (var)
++
++#endif /* _LINUX_HPPA_SYSDEP_H */
+--- a/sysdeps/hppa/sysdep.h
++++ b/sysdeps/hppa/sysdep.h
+@@ -18,8 +18,6 @@
+    <http://www.gnu.org/licenses/>.  */
+ 
+ #include <sysdeps/generic/sysdep.h>
+-#include <sys/syscall.h>
+-#include "config.h"
+ 
+ #undef ASM_LINE_SEP
+ #define ASM_LINE_SEP !
+--- a/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h
++++ b/sysdeps/unix/sysv/linux/hppa/sysdep-cancel.h
+@@ -16,7 +16,6 @@
+    <http://www.gnu.org/licenses/>.  */
+ 
+ #include <sysdep.h>
+-#include <sysdeps/generic/sysdep.h>
+ #include <tls.h>
+ #ifndef __ASSEMBLER__
+ # include <nptl/pthreadP.h>

Added: glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-sysdep-errno.diff
===================================================================
--- glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-sysdep-errno.diff	                        (rev 0)
+++ glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-sysdep-errno.diff	2015-11-29 21:50:09 UTC (rev 6709)
@@ -0,0 +1,21 @@
+commit cda700b4c8a8a60362f14b79243eaaadbebd09ef
+Author: Mike Frysinger <vapier@gentoo.org>
+Date:   Tue Feb 24 00:10:42 2015 -0500
+
+    hppa: fix build failure with RTLD_PRIVATE_ERRNO
+    
+    Pull in dl-sysdep.h like every other linux sysdep.h header does when it
+    wants to use RTLD_PRIVATE_ERRNO.
+
+--- a/sysdeps/unix/sysv/linux/hppa/sysdep.h
++++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h
+@@ -21,6 +21,9 @@
+ #include <asm/unistd.h>
+ #include <sysdeps/generic/sysdep.h>
+ 
++/* Defines RTLD_PRIVATE_ERRNO.  */
++#include <dl-sysdep.h>
++
+ /* In order to get __set_errno() definition in INLINE_SYSCALL.  */
+ #ifndef __ASSEMBLER__
+ #include <errno.h>

Modified: glibc-package/branches/glibc-2.21/debian/patches/series
===================================================================
--- glibc-package/branches/glibc-2.21/debian/patches/series	2015-11-29 15:36:52 UTC (rev 6708)
+++ glibc-package/branches/glibc-2.21/debian/patches/series	2015-11-29 21:50:09 UTC (rev 6709)
@@ -70,9 +70,11 @@
 hppa/cvs-start.diff
 hppa/cvs-alloca-werror.diff
 hppa/cvs-atomic.diff
-hppa/cvs-inline-syscall.diff
 hppa/submitted-gmon-start.diff
 hppa/submitted-mathdef.diff
+hppa/cvs-sysdep-errno.diff
+hppa/cvs-inline-syscall-rewrite.diff
+hppa/cvs-inline-syscall.diff
 
 hurd-i386/local-enable-ldconfig.diff
 hurd-i386/tg-context_functions.diff


Reply to: