vapier      15/08/12 04:17:01

  Modified:             README.history
  Added:                00_all_0015-microblaze-include-unix-sysdep.h.patch
                        
00_all_0016-hppa-Fix-miscompilation-of-sched_setaffinity-BZ-1848.patch
  Log:
  fixes from upstream for hppa/microblaze builds

Revision  Changes    Path
1.3                  src/patchsets/glibc/2.22/README.history

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.22/README.history?rev=1.3&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.22/README.history?rev=1.3&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.22/README.history?r1=1.2&r2=1.3

Index: README.history
===================================================================
RCS file: /var/cvsroot/gentoo/src/patchsets/glibc/2.22/README.history,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- README.history      7 Aug 2015 05:59:48 -0000       1.2
+++ README.history      12 Aug 2015 04:17:01 -0000      1.3
@@ -1,3 +1,7 @@
+3              09 Aug 2015
+       + 00_all_0015-microblaze-include-unix-sysdep.h.patch
+       + 00_all_0016-hppa-Fix-miscompilation-of-sched_setaffinity-BZ-1848.patch
+
 2              07 Aug 2015
        + 00_all_0014-hppa-_dl_symbol_address-add-missing-hidden-def.patch
 



1.1                  
src/patchsets/glibc/2.22/00_all_0015-microblaze-include-unix-sysdep.h.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.22/00_all_0015-microblaze-include-unix-sysdep.h.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.22/00_all_0015-microblaze-include-unix-sysdep.h.patch?rev=1.1&content-type=text/plain

Index: 00_all_0015-microblaze-include-unix-sysdep.h.patch
===================================================================
>From 077b6d91d3c4dce29a9e84ddea3540b22ca53121 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <[email protected]>
Date: Thu, 6 Aug 2015 02:10:46 -0400
Subject: [PATCH] microblaze: include unix/sysdep.h

The semi-recent SYSCALL_CANCEL inclusion broke microblaze due to the
sysdep.h header not including the unix/sysdep.h header.  Include it
here like all other ports.

(cherry picked from commit 5d5de49c3ccd69f65b801f1ca490a0112d1cbd7d)
---
 sysdeps/unix/sysv/linux/microblaze/sysdep.h | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/sysdeps/unix/sysv/linux/microblaze/sysdep.h 
b/sysdeps/unix/sysv/linux/microblaze/sysdep.h
index 83c0340..9d5c542 100644
--- a/sysdeps/unix/sysv/linux/microblaze/sysdep.h
+++ b/sysdeps/unix/sysv/linux/microblaze/sysdep.h
@@ -16,8 +16,11 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
+#ifndef _LINUX_MICROBLAZE_SYSDEP_H
+#define _LINUX_MICROBLAZE_SYSDEP_H 1
+
+#include <sysdeps/unix/sysdep.h>
 #include <sysdeps/microblaze/sysdep.h>
-#include <sys/syscall.h>
 
 /* Defines RTLD_PRIVATE_ERRNO.  */
 #include <dl-sysdep.h>
@@ -305,3 +308,5 @@ SYSCALL_ERROR_LABEL_DCL:                            \
 # define PTR_DEMANGLE(var) (void) (var)
 
 #endif /* not __ASSEMBLER__ */
+
+#endif /* _LINUX_MICROBLAZE_SYSDEP_H */
-- 
2.4.4




1.1                  
src/patchsets/glibc/2.22/00_all_0016-hppa-Fix-miscompilation-of-sched_setaffinity-BZ-1848.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.22/00_all_0016-hppa-Fix-miscompilation-of-sched_setaffinity-BZ-1848.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/glibc/2.22/00_all_0016-hppa-Fix-miscompilation-of-sched_setaffinity-BZ-1848.patch?rev=1.1&content-type=text/plain

Index: 00_all_0016-hppa-Fix-miscompilation-of-sched_setaffinity-BZ-1848.patch
===================================================================
>From 078cee5a65f59943e2d72e36ba6635d059c38426 Mon Sep 17 00:00:00 2001
From: John David Anglin <[email protected]>
Date: Fri, 7 Aug 2015 11:54:19 -0400
Subject: [PATCH] hppa: Fix miscompilation of sched_setaffinity() [BZ #18480]

The attached change fixes the miscompilation of sched_setaffinity() on
hppa.  This is an old problem that was fixed on other architectures using
a similar approach to the attached change.  See:
https://sourceware.org/ml/libc-hacker/2004-04/msg00016.html

Build tested on trunk.  Patch has been applied to debian glibc for some time.

(cherry picked from commit 04ece7d2dec91fe870c5f1a38032875915f44633)
---
 sysdeps/unix/sysv/linux/hppa/syscall.c |  3 +-
 sysdeps/unix/sysv/linux/hppa/sysdep.h  | 61 ++++++++++++++++++++++------------
 2 files changed, 42 insertions(+), 22 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/hppa/syscall.c 
b/sysdeps/unix/sysv/linux/hppa/syscall.c
index aff67a8..958fa47 100644
--- a/sysdeps/unix/sysv/linux/hppa/syscall.c
+++ b/sysdeps/unix/sysv/linux/hppa/syscall.c
@@ -43,9 +43,10 @@ syscall (long int __sysno, ...)
   va_end (args);
 
   {
+    LOAD_ARGS_6 (arg0, arg1, arg2, arg3, arg4, arg5)
     register unsigned long int __res asm("r28");
     PIC_REG_DEF
-    LOAD_ARGS_6 (arg0, arg1, arg2, arg3, arg4, arg5)
+    LOAD_REGS_6
     asm volatile (SAVE_ASM_PIC
                  "     ble  0x100(%%sr2, %%r0) \n"
                  "     copy %1, %%r20          \n"
diff --git a/sysdeps/unix/sysv/linux/hppa/sysdep.h 
b/sysdeps/unix/sysv/linux/hppa/sysdep.h
index d20a04b..cb1f163 100644
--- a/sysdeps/unix/sysv/linux/hppa/sysdep.h
+++ b/sysdeps/unix/sysv/linux/hppa/sysdep.h
@@ -400,9 +400,10 @@ L(pre_end):                                        
ASM_LINE_SEP    \
 ({                                                                     \
        long __sys_res;                                                 \
        {                                                               \
+               LOAD_ARGS_##nr(args)                                    \
                register unsigned long __res asm("r28");                \
                PIC_REG_DEF                                             \
-               LOAD_ARGS_##nr(args)                                    \
+               LOAD_REGS_##nr                                          \
                /* FIXME: HACK save/load r19 around syscall */          \
                asm volatile(                                           \
                        SAVE_ASM_PIC                                    \
@@ -425,9 +426,10 @@ L(pre_end):                                        
ASM_LINE_SEP    \
 ({                                                                     \
        long __sys_res;                                                 \
        {                                                               \
+               LOAD_ARGS_##nr(args)                                    \
                register unsigned long __res asm("r28");                \
                PIC_REG_DEF                                             \
-               LOAD_ARGS_##nr(args)                                    \
+               LOAD_REGS_##nr                                          \
                /* FIXME: HACK save/load r19 around syscall */          \
                asm volatile(                                           \
                        SAVE_ASM_PIC                                    \
@@ -443,27 +445,44 @@ L(pre_end):                                       
ASM_LINE_SEP    \
        __sys_res;                                                      \
  })
 
-
-
 #define LOAD_ARGS_0()
-#define LOAD_ARGS_1(r26)                                               \
-  register unsigned long __r26 __asm__("r26") = (unsigned long)(r26);  \
+#define LOAD_REGS_0
+#define LOAD_ARGS_1(a1)                                                        
\
+  register unsigned long __x26 = (unsigned long)(a1);                  \
   LOAD_ARGS_0()
-#define LOAD_ARGS_2(r26,r25)                                           \
-  register unsigned long __r25 __asm__("r25") = (unsigned long)(r25);  \
-  LOAD_ARGS_1(r26)
-#define LOAD_ARGS_3(r26,r25,r24)                                       \
-  register unsigned long __r24 __asm__("r24") = (unsigned long)(r24);  \
-  LOAD_ARGS_2(r26,r25)
-#define LOAD_ARGS_4(r26,r25,r24,r23)                                   \
-  register unsigned long __r23 __asm__("r23") = (unsigned long)(r23);  \
-  LOAD_ARGS_3(r26,r25,r24)
-#define LOAD_ARGS_5(r26,r25,r24,r23,r22)                               \
-  register unsigned long __r22 __asm__("r22") = (unsigned long)(r22);  \
-  LOAD_ARGS_4(r26,r25,r24,r23)
-#define LOAD_ARGS_6(r26,r25,r24,r23,r22,r21)                           \
-  register unsigned long __r21 __asm__("r21") = (unsigned long)(r21);  \
-  LOAD_ARGS_5(r26,r25,r24,r23,r22)
+#define LOAD_REGS_1                                                    \
+  register unsigned long __r26 __asm__("r26") = __x26;                 \
+  LOAD_REGS_0
+#define LOAD_ARGS_2(a1,a2)                                             \
+  register unsigned long __x25 = (unsigned long)(a2);                  \
+  LOAD_ARGS_1(a1)
+#define LOAD_REGS_2                                                    \
+  register unsigned long __r25 __asm__("r25") = __x25;                 \
+  LOAD_REGS_1
+#define LOAD_ARGS_3(a1,a2,a3)                                          \
+  register unsigned long __x24 = (unsigned long)(a3);                  \
+  LOAD_ARGS_2(a1,a2)
+#define LOAD_REGS_3                                                    \
+  register unsigned long __r24 __asm__("r24") = __x24;                 \
+  LOAD_REGS_2
+#define LOAD_ARGS_4(a1,a2,a3,a4)                                       \
+  register unsigned long __x23 = (unsigned long)(a4);                  \
+  LOAD_ARGS_3(a1,a2,a3)
+#define LOAD_REGS_4                                                    \
+  register unsigned long __r23 __asm__("r23") = __x23;                 \
+  LOAD_REGS_3
+#define LOAD_ARGS_5(a1,a2,a3,a4,a5)                                    \
+  register unsigned long __x22 = (unsigned long)(a5);                  \
+  LOAD_ARGS_4(a1,a2,a3,a4)
+#define LOAD_REGS_5                                                    \
+  register unsigned long __r22 __asm__("r22") = __x22;                 \
+  LOAD_REGS_4
+#define LOAD_ARGS_6(a1,a2,a3,a4,a5,a6)                                 \
+  register unsigned long __x21 = (unsigned long)(a6);                  \
+  LOAD_ARGS_5(a1,a2,a3,a4,a5)
+#define LOAD_REGS_6                                                    \
+  register unsigned long __r21 __asm__("r21") = __x21;                 \
+  LOAD_REGS_5
 
 /* Even with zero args we use r20 for the syscall number */
 #define ASM_ARGS_0
-- 
2.4.4





Reply via email to