tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
gcc-4.8: fix with glibc-2.26
Vladimír Čunát
8 years ago
54c14e2f
8da04338
+208
-1
4 changed files
expand all
collapse all
unified
split
pkgs
development
compilers
gcc
4.8
default.nix
res_state-not-declared.patch
sigsegv-not-declared.patch
struct-ucontext-4.8.patch
+5
-1
pkgs/development/compilers/gcc/4.8/default.nix
reviewed
···
78
78
sha256 = "01jd7pdarh54ki498g6sz64ijl9a1l5f9v8q2696aaxalvh2vwzl";
79
79
excludes = [ "gcc/cp/ChangeLog" ];
80
80
})]
81
81
-
;
81
81
+
++ [ # glibc-2.26
82
82
+
../struct-ucontext-4.8.patch
83
83
+
../sigsegv-not-declared.patch
84
84
+
../res_state-not-declared.patch
85
85
+
];
82
86
83
87
javaEcj = fetchurl {
84
88
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
+13
pkgs/development/compilers/gcc/res_state-not-declared.patch
reviewed
···
1
1
+
diff --git a/libsanitizer/tsan/tsan_platform_linux.cc b/libsanitizer/tsan/tsan_platform_linux.cc
2
2
+
index fe69430..49f5270 100644
3
3
+
--- a/libsanitizer/tsan/tsan_platform_linux.cc
4
4
+
+++ b/libsanitizer/tsan/tsan_platform_linux.cc
5
5
+
@@ -351,7 +351,7 @@ bool IsGlobalVar(uptr addr) {
6
6
+
// closes within glibc. The code is a pure hack.
7
7
+
int ExtractResolvFDs(void *state, int *fds, int nfd) {
8
8
+
int cnt = 0;
9
9
+
- __res_state *statp = (__res_state*)state;
10
10
+
+ struct __res_state *statp = (struct __res_state*)state;
11
11
+
for (int i = 0; i < MAXNS && cnt < nfd; i++) {
12
12
+
if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
13
13
+
fds[cnt++] = statp->_u._ext.nssocks[i];
+13
pkgs/development/compilers/gcc/sigsegv-not-declared.patch
reviewed
···
1
1
+
error: 'SIGSEGV' was not declared in this scope
2
2
+
diff --git a/libsanitizer/asan/asan_linux.cc b/libsanitizer/asan/asan_linux.cc
3
3
+
index 0692eb1..472f734 100644
4
4
+
--- a/libsanitizer/asan/asan_linux.cc
5
5
+
+++ b/libsanitizer/asan/asan_linux.cc
6
6
+
@@ -26,6 +26,7 @@
7
7
+
#include <sys/types.h>
8
8
+
#include <fcntl.h>
9
9
+
#include <pthread.h>
10
10
+
+#include <signal.h>
11
11
+
#include <stdio.h>
12
12
+
#include <unistd.h>
13
13
+
#include <unwind.h>
+177
pkgs/development/compilers/gcc/struct-ucontext-4.8.patch
reviewed
···
1
1
+
From b685411208e0aaa79190d54faf945763514706b8 Mon Sep 17 00:00:00 2001
2
2
+
From: jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
3
3
+
Date: Tue, 4 Jul 2017 10:23:57 +0000
4
4
+
Subject: [PATCH] Use ucontext_t not struct ucontext in linux-unwind.h files.
5
5
+
6
6
+
Current glibc no longer gives the ucontext_t type the tag struct
7
7
+
ucontext, to conform with POSIX namespace rules. This requires
8
8
+
various linux-unwind.h files in libgcc, that were previously using
9
9
+
struct ucontext, to be fixed to use ucontext_t instead. This is
10
10
+
similar to the removal of the struct siginfo tag from siginfo_t some
11
11
+
years ago.
12
12
+
13
13
+
This patch changes those files to use ucontext_t instead. As the
14
14
+
standard name that should be unconditionally safe, so this is not
15
15
+
restricted to architectures supported by glibc, or conditioned on the
16
16
+
glibc version.
17
17
+
18
18
+
Tested compilation together with current glibc with glibc's
19
19
+
build-many-glibcs.py.
20
20
+
21
21
+
* config/aarch64/linux-unwind.h (aarch64_fallback_frame_state),
22
22
+
config/alpha/linux-unwind.h (alpha_fallback_frame_state),
23
23
+
config/bfin/linux-unwind.h (bfin_fallback_frame_state),
24
24
+
config/i386/linux-unwind.h (x86_64_fallback_frame_state,
25
25
+
x86_fallback_frame_state), config/m68k/linux-unwind.h (struct
26
26
+
uw_ucontext), config/nios2/linux-unwind.h (struct nios2_ucontext),
27
27
+
config/pa/linux-unwind.h (pa32_fallback_frame_state),
28
28
+
config/sh/linux-unwind.h (sh_fallback_frame_state),
29
29
+
config/tilepro/linux-unwind.h (tile_fallback_frame_state),
30
30
+
config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Use
31
31
+
ucontext_t instead of struct ucontext.
32
32
+
33
33
+
34
34
+
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@249957 138bc75d-0d04-0410-961f-82ee72b054a4
35
35
+
---
36
36
+
libgcc/ChangeLog (REMOVED) | 14 ++++++++++++++
37
37
+
libgcc/config/aarch64/linux-unwind.h | 2 +-
38
38
+
libgcc/config/alpha/linux-unwind.h | 2 +-
39
39
+
libgcc/config/bfin/linux-unwind.h | 2 +-
40
40
+
libgcc/config/i386/linux-unwind.h | 4 ++--
41
41
+
libgcc/config/m68k/linux-unwind.h | 2 +-
42
42
+
libgcc/config/nios2/linux-unwind.h | 2 +-
43
43
+
libgcc/config/pa/linux-unwind.h | 2 +-
44
44
+
libgcc/config/sh/linux-unwind.h | 2 +-
45
45
+
libgcc/config/tilepro/linux-unwind.h | 2 +-
46
46
+
libgcc/config/xtensa/linux-unwind.h | 2 +-
47
47
+
11 files changed, 25 insertions(+), 11 deletions(-)
48
48
+
49
49
+
diff --git a/libgcc/config/aarch64/linux-unwind.h b/libgcc/config/aarch64/linux-unwind.h
50
50
+
index 4512efb..06de45a 100644
51
51
+
--- a/libgcc/config/aarch64/linux-unwind.h
52
52
+
+++ b/libgcc/config/aarch64/linux-unwind.h
53
53
+
@@ -52,7 +52,7 @@ aarch64_fallback_frame_state (struct _Unwind_Context *context,
54
54
+
struct rt_sigframe
55
55
+
{
56
56
+
siginfo_t info;
57
57
+
- struct ucontext uc;
58
58
+
+ ucontext_t uc;
59
59
+
};
60
60
+
61
61
+
struct rt_sigframe *rt_;
62
62
+
diff --git a/libgcc/config/alpha/linux-unwind.h b/libgcc/config/alpha/linux-unwind.h
63
63
+
index bdbba4a..e84812e 100644
64
64
+
--- a/libgcc/config/alpha/linux-unwind.h
65
65
+
+++ b/libgcc/config/alpha/linux-unwind.h
66
66
+
@@ -51,7 +51,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
67
67
+
{
68
68
+
struct rt_sigframe {
69
69
+
siginfo_t info;
70
70
+
- struct ucontext uc;
71
71
+
+ ucontext_t uc;
72
72
+
} *rt_ = context->cfa;
73
73
+
sc = &rt_->uc.uc_mcontext;
74
74
+
}
75
75
+
diff --git a/libgcc/config/bfin/linux-unwind.h b/libgcc/config/bfin/linux-unwind.h
76
76
+
index 77b7c23..8bf5e82 100644
77
77
+
--- a/libgcc/config/bfin/linux-unwind.h
78
78
+
+++ b/libgcc/config/bfin/linux-unwind.h
79
79
+
@@ -52,7 +52,7 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
80
80
+
void *puc;
81
81
+
char retcode[8];
82
82
+
siginfo_t info;
83
83
+
- struct ucontext uc;
84
84
+
+ ucontext_t uc;
85
85
+
} *rt_ = context->cfa;
86
86
+
87
87
+
/* The void * cast is necessary to avoid an aliasing warning.
88
88
+
diff --git a/libgcc/config/i386/linux-unwind.h b/libgcc/config/i386/linux-unwind.h
89
89
+
index 540a0a2..29efbe3 100644
90
90
+
--- a/libgcc/config/i386/linux-unwind.h
91
91
+
+++ b/libgcc/config/i386/linux-unwind.h
92
92
+
@@ -58,7 +58,7 @@ x86_64_fallback_frame_state (struct _Unwind_Context *context,
93
93
+
if (*(unsigned char *)(pc+0) == 0x48
94
94
+
&& *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
95
95
+
{
96
96
+
- struct ucontext *uc_ = context->cfa;
97
97
+
+ ucontext_t *uc_ = context->cfa;
98
98
+
/* The void * cast is necessary to avoid an aliasing warning.
99
99
+
The aliasing warning is correct, but should not be a problem
100
100
+
because it does not alias anything. */
101
101
+
@@ -138,7 +138,7 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
102
102
+
siginfo_t *pinfo;
103
103
+
void *puc;
104
104
+
siginfo_t info;
105
105
+
- struct ucontext uc;
106
106
+
+ ucontext_t uc;
107
107
+
} *rt_ = context->cfa;
108
108
+
/* The void * cast is necessary to avoid an aliasing warning.
109
109
+
The aliasing warning is correct, but should not be a problem
110
110
+
diff --git a/libgcc/config/m68k/linux-unwind.h b/libgcc/config/m68k/linux-unwind.h
111
111
+
index 75b7cf7..f964e24 100644
112
112
+
--- a/libgcc/config/m68k/linux-unwind.h
113
113
+
+++ b/libgcc/config/m68k/linux-unwind.h
114
114
+
@@ -33,7 +33,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
115
115
+
/* <sys/ucontext.h> is unfortunately broken right now. */
116
116
+
struct uw_ucontext {
117
117
+
unsigned long uc_flags;
118
118
+
- struct ucontext *uc_link;
119
119
+
+ ucontext_t *uc_link;
120
120
+
stack_t uc_stack;
121
121
+
mcontext_t uc_mcontext;
122
122
+
unsigned long uc_filler[80];
123
123
+
diff --git a/libgcc/config/pa/linux-unwind.h b/libgcc/config/pa/linux-unwind.h
124
124
+
index 9a2657f..e47493d 100644
125
125
+
--- a/libgcc/config/pa/linux-unwind.h
126
126
+
+++ b/libgcc/config/pa/linux-unwind.h
127
127
+
@@ -80,7 +80,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
128
128
+
struct sigcontext *sc;
129
129
+
struct rt_sigframe {
130
130
+
siginfo_t info;
131
131
+
- struct ucontext uc;
132
132
+
+ ucontext_t uc;
133
133
+
} *frame;
134
134
+
135
135
+
/* rt_sigreturn trampoline:
136
136
+
diff --git a/libgcc/config/sh/linux-unwind.h b/libgcc/config/sh/linux-unwind.h
137
137
+
index e389cac..0bf43ba 100644
138
138
+
--- a/libgcc/config/sh/linux-unwind.h
139
139
+
+++ b/libgcc/config/sh/linux-unwind.h
140
140
+
@@ -180,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
141
141
+
{
142
142
+
struct rt_sigframe {
143
143
+
siginfo_t info;
144
144
+
- struct ucontext uc;
145
145
+
+ ucontext_t uc;
146
146
+
} *rt_ = context->cfa;
147
147
+
/* The void * cast is necessary to avoid an aliasing warning.
148
148
+
The aliasing warning is correct, but should not be a problem
149
149
+
diff --git a/libgcc/config/tilepro/linux-unwind.h b/libgcc/config/tilepro/linux-unwind.h
150
150
+
index 796e976..75f8890 100644
151
151
+
--- a/libgcc/config/tilepro/linux-unwind.h
152
152
+
+++ b/libgcc/config/tilepro/linux-unwind.h
153
153
+
@@ -61,7 +61,7 @@ tile_fallback_frame_state (struct _Unwind_Context *context,
154
154
+
struct rt_sigframe {
155
155
+
unsigned char save_area[C_ABI_SAVE_AREA_SIZE];
156
156
+
siginfo_t info;
157
157
+
- struct ucontext uc;
158
158
+
+ ucontext_t uc;
159
159
+
} *rt_;
160
160
+
161
161
+
/* Return if this is not a signal handler. */
162
162
+
diff --git a/libgcc/config/xtensa/linux-unwind.h b/libgcc/config/xtensa/linux-unwind.h
163
163
+
index 9872492..586a9d4 100644
164
164
+
--- a/libgcc/config/xtensa/linux-unwind.h
165
165
+
+++ b/libgcc/config/xtensa/linux-unwind.h
166
166
+
@@ -67,7 +67,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
167
167
+
168
168
+
struct rt_sigframe {
169
169
+
siginfo_t info;
170
170
+
- struct ucontext uc;
171
171
+
+ ucontext_t uc;
172
172
+
} *rt_;
173
173
+
174
174
+
/* movi a2, __NR_rt_sigreturn; syscall */
175
175
+
--
176
176
+
2.9.3
177
177
+