]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Make SH ucontext always match current kernels.
authorJoseph Myers <joseph@codesourcery.com>
Tue, 15 Nov 2016 21:44:36 +0000 (21:44 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 15 Nov 2016 21:44:36 +0000 (21:44 +0000)
As discussed in the thread starting at
<https://sourceware.org/ml/libc-alpha/2015-06/msg00657.html>, there
are various problems with the sigcontext / mcontext / ucontext
structures on SH.  The soft-float SH4 case in fact does not build at
present, with errors processing
sysdeps/unix/sysv/linux/sh/sh4/ucontext_i.sym with gen-as-const.awk
("error: 'mcontext_t {aka struct <anonymous>}' has no member named
'fpregs'").

Linux 4.8 (commit bbe6c77857c38f4acbdc4fc70399515226d1859a) moved to
always using the same sigcontext structure on SH, with room for
floating-point registers whether or not present on the processor.
This patch makes the glibc header match.

Tested (compilation only) for sh4-linux-gnu hard float, and in
conjunction with other fixes for soft float.

* sysdeps/unix/sysv/linux/sh/sys/ucontext.h [__SH4__ || __SH4A__]:
Make code unconditional.
[!(__SH4__ || __SH4A__)]: Remove conditional code.

ChangeLog
sysdeps/unix/sysv/linux/sh/sys/ucontext.h

index 0badc3fed712ac0eb83036b097a6ffa32f3ce62b..c52196e388cc34fa7c8dc0df7c7387156f0fc624 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-11-15  Joseph Myers  <joseph@codesourcery.com>
+
+       * sysdeps/unix/sysv/linux/sh/sys/ucontext.h [__SH4__ || __SH4A__]:
+       Make code unconditional.
+       [!(__SH4__ || __SH4A__)]: Remove conditional code.
+
 2016-11-15  Rical Jasan  <ricaljasan@pacific.net>
 
        * manual/sysinfo.texi (S_APPEND): Delete.
index 2c5fa0431c5940f9ffe23b6e49f9ea0335c52f96..4ee0b2872f9d9c0073411a7366db5f83d53df97a 100644 (file)
@@ -76,7 +76,6 @@ enum
 };
 #endif
 
-#if (defined(__SH4__) || defined(__SH4A__))
 typedef int freg_t;
 
 /* Number of FPU registers.  */
@@ -102,20 +101,6 @@ typedef struct
     unsigned int fpul;
     unsigned int ownedfp;
   } mcontext_t;
-#else
-/* Context to describe whole processor state.  */
-typedef struct
-  {
-    unsigned int oldmask;
-    gregset_t gregs;
-    unsigned int pc;
-    unsigned int pr;
-    unsigned int sr;
-    unsigned int gbr;
-    unsigned int mach;
-    unsigned int macl;
-  } mcontext_t;
-#endif /* __SH_FPU_ANY__ */
 
 /* Userlevel context.  */
 typedef struct ucontext