255ba8d1000b95815effe7bba2280b5012400852
[openwrt.git] / toolchain / gcc / patches / 4.7.0 / 003-siginfo_t.patch
1 There is one usage in boehm-gc/os_dep.c, but it is only used if
2 SUNOS5SIGS is defined, which it is only if one of SUNOS5, DRSNX, HPUX, or
3 FREEBSD is defined, which are all not using Linux-based glibc ports.
4
5 Likewise, gcc/ada/init.c has a struct __siginfo occurence, but only for
6 __FreeBSD__.
7
8 config/rs6000/linux-unwind.h uses ``char siginfo[128]'', and
9 config/s390/linux-unwind.h also uses a constant.
10
11 I tested the following patch for sh-linux-gnu.  This only covers one
12 configuration, but the change is pretty mechanic anyway and every place
13 that used to refer to struct siginfo already must have had <signal.h> in
14 its include path, which is the same file that declares siginfo_t.
15
16 OK to commit?  This should probably also go into any active release
17 branches, to keep them buildable once this glibc change ripples through?
18
19 libgcc/
20         * config/alpha/linux-unwind.h (alpha_fallback_frame_state): Use
21         siginfo_t instead of struct siginfo.
22         * config/bfin/linux-unwind.h (bfin_fallback_frame_state): Likewise.
23         * config/i386/linux-unwind.h (x86_fallback_frame_state): Likewise.
24         * config/ia64/linux-unwind.h (ia64_fallback_frame_state)
25         (ia64_handle_unwabi): Likewise.
26         * config/mips/linux-unwind.h (mips_fallback_frame_state): Likewise.
27         * config/pa/linux-unwind.h (pa32_fallback_frame_state): Likewise.
28         * config/sh/linux-unwind.h (shmedia_fallback_frame_state)
29         (sh_fallback_frame_state): Likewise.
30         * config/tilepro/linux-unwind.h (tile_fallback_frame_state): Likewise.
31         * config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Likewise.
32 ---
33 diff -urN gcc-linaro-4.7-2012.04/libgcc/config/alpha/linux-unwind.h gcc-linaro-4.7-2012.04.new/libgcc/config/alpha/linux-unwind.h
34 --- gcc-linaro-4.7-2012.04/libgcc/config/alpha/linux-unwind.h   2012-04-10 11:54:47.000000000 +0200
35 +++ gcc-linaro-4.7-2012.04.new/libgcc/config/alpha/linux-unwind.h       2012-09-13 14:07:22.307413027 +0200
36 @@ -49,7 +49,7 @@
37    else if (pc[1] == 0x201f015f)                /* lda $0,NR_rt_sigreturn */
38      {
39        struct rt_sigframe {
40 -       struct siginfo info;
41 +       siginfo_t info;
42         struct ucontext uc;
43        } *rt_ = context->cfa;
44        sc = &rt_->uc.uc_mcontext;
45 diff -urN gcc-linaro-4.7-2012.04/libgcc/config/bfin/linux-unwind.h gcc-linaro-4.7-2012.04.new/libgcc/config/bfin/linux-unwind.h
46 --- gcc-linaro-4.7-2012.04/libgcc/config/bfin/linux-unwind.h    2012-04-10 11:54:47.000000000 +0200
47 +++ gcc-linaro-4.7-2012.04.new/libgcc/config/bfin/linux-unwind.h        2012-09-13 14:07:36.343413388 +0200
48 @@ -48,10 +48,10 @@
49      {
50        struct rt_sigframe {
51         int sig;
52 -       struct siginfo *pinfo;
53 +       siginfo_t *pinfo;
54         void *puc;
55         char retcode[8];
56 -       struct siginfo info;
57 +       siginfo_t info;
58         struct ucontext uc;
59        } *rt_ = context->cfa;
60  
61 diff -urN gcc-linaro-4.7-2012.04/libgcc/config/i386/linux-unwind.h gcc-linaro-4.7-2012.04.new/libgcc/config/i386/linux-unwind.h
62 --- gcc-linaro-4.7-2012.04/libgcc/config/i386/linux-unwind.h    2012-04-10 11:54:47.000000000 +0200
63 +++ gcc-linaro-4.7-2012.04.new/libgcc/config/i386/linux-unwind.h        2012-09-13 14:07:49.147413712 +0200
64 @@ -139,9 +139,9 @@
65      {
66        struct rt_sigframe {
67         int sig;
68 -       struct siginfo *pinfo;
69 +       siginfo_t *pinfo;
70         void *puc;
71 -       struct siginfo info;
72 +       siginfo_t info;
73         struct ucontext uc;
74        } *rt_ = context->cfa;
75        /* The void * cast is necessary to avoid an aliasing warning.
76 diff -urN gcc-linaro-4.7-2012.04/libgcc/config/mips/linux-unwind.h gcc-linaro-4.7-2012.04.new/libgcc/config/mips/linux-unwind.h
77 --- gcc-linaro-4.7-2012.04/libgcc/config/mips/linux-unwind.h    2012-04-10 11:54:47.000000000 +0200
78 +++ gcc-linaro-4.7-2012.04.new/libgcc/config/mips/linux-unwind.h        2012-09-13 14:08:43.007415091 +0200
79 @@ -75,7 +75,7 @@
80        struct rt_sigframe {
81         u_int32_t ass[4];  /* Argument save space for o32.  */
82         u_int32_t trampoline[2];
83 -       struct siginfo info;
84 +       siginfo_t info;
85         _sig_ucontext_t uc;
86        } *rt_ = context->cfa;
87        sc = &rt_->uc.uc_mcontext;
88 diff -urN gcc-linaro-4.7-2012.04/libgcc/config/pa/linux-unwind.h gcc-linaro-4.7-2012.04.new/libgcc/config/pa/linux-unwind.h
89 --- gcc-linaro-4.7-2012.04/libgcc/config/pa/linux-unwind.h      2012-04-10 11:54:47.000000000 +0200
90 +++ gcc-linaro-4.7-2012.04.new/libgcc/config/pa/linux-unwind.h  2012-09-13 14:08:54.335415383 +0200
91 @@ -63,7 +63,7 @@
92    int i;
93    struct sigcontext *sc;
94    struct rt_sigframe {
95 -    struct siginfo info;
96 +    siginfo_t info;
97      struct ucontext uc;
98    } *frame;
99  
100 diff -urN gcc-linaro-4.7-2012.04/libgcc/config/sh/linux-unwind.h gcc-linaro-4.7-2012.04.new/libgcc/config/sh/linux-unwind.h
101 --- gcc-linaro-4.7-2012.04/libgcc/config/sh/linux-unwind.h      2012-04-10 11:54:47.000000000 +0200
102 +++ gcc-linaro-4.7-2012.04.new/libgcc/config/sh/linux-unwind.h  2012-09-13 14:09:12.383415847 +0200
103 @@ -80,9 +80,9 @@
104            && (*(unsigned long *) (pc+11)  == 0x6ff0fff0))
105      {
106        struct rt_sigframe {
107 -       struct siginfo *pinfo;
108 +       siginfo_t *pinfo;
109         void *puc;
110 -       struct siginfo info;
111 +       siginfo_t info;
112         struct ucontext uc;
113        } *rt_ = context->cfa;
114        /* The void * cast is necessary to avoid an aliasing warning.
115 @@ -179,7 +179,7 @@
116                 && (*(unsigned short *) (pc+14)  == 0x00ad))))
117      {
118        struct rt_sigframe {
119 -       struct siginfo info;
120 +       siginfo_t info;
121         struct ucontext uc;
122        } *rt_ = context->cfa;
123        /* The void * cast is necessary to avoid an aliasing warning.
124 diff -urN gcc-linaro-4.7-2012.04/libgcc/config/tilepro/linux-unwind.h gcc-linaro-4.7-2012.04.new/libgcc/config/tilepro/linux-unwind.h
125 --- gcc-linaro-4.7-2012.04/libgcc/config/tilepro/linux-unwind.h 2012-04-10 11:54:47.000000000 +0200
126 +++ gcc-linaro-4.7-2012.04.new/libgcc/config/tilepro/linux-unwind.h     2012-09-13 14:09:28.907416268 +0200
127 @@ -61,7 +61,7 @@
128  
129    struct rt_sigframe {
130      unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
131 -    struct siginfo info;
132 +    siginfo_t info;
133      struct ucontext uc;
134    } *rt_;
135  
136 diff -urN gcc-linaro-4.7-2012.04/libgcc/config/xtensa/linux-unwind.h gcc-linaro-4.7-2012.04.new/libgcc/config/xtensa/linux-unwind.h
137 --- gcc-linaro-4.7-2012.04/libgcc/config/xtensa/linux-unwind.h  2012-04-10 11:54:47.000000000 +0200
138 +++ gcc-linaro-4.7-2012.04.new/libgcc/config/xtensa/linux-unwind.h      2012-09-13 14:09:41.399416587 +0200
139 @@ -62,7 +62,7 @@
140    struct sigcontext *sc;
141  
142    struct rt_sigframe {
143 -    struct siginfo info;
144 +    siginfo_t info;
145      struct ucontext uc;
146    } *rt_;
147