summaryrefslogtreecommitdiffstats
path: root/meta/packages/glibc/glibc-2.4/glibc-arm-no-procinfo_h.patch
blob: 6486fc0eab18cc0e341511c3e6d85ba41ff77a1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
http://sources.redhat.com/ml/libc-ports/2006-10/msg00040.html
Avoid using asm/procinfo.h

    * From: "Joseph S. Myers" <joseph at codesourcery dot com>
    * To: libc-ports at sourceware dot org
    * Date: Tue, 24 Oct 2006 19:25:12 +0000 (UTC)
    * Subject: Avoid using asm/procinfo.h

I previously noted
<http://sourceware.org/ml/libc-ports/2006-08/msg00023.html> that the
use of <asm/procinfo.h>, a Linux-specific kernel header, in
sysdeps/arm/eabi, is an abstraction violation, and that in principle
all the files in sysdeps/arm/eabi should use sysdep.h not
asm/procinfo.h for HWCAP_VFP.

The ARM kernel maintainers have now declared that <asm/procinfo.h>
should not be used outside the kernel at all (and in particular that
headers_install is correct in not exporting it), and that these
definitions will move to a different kernel header.  This gives a
concrete reason for making the change to use glibc's internal
definitions, which this patch does, thereby allowing glibc to build
with the exported headers.

2006-10-24  Joseph S. Myers  <joseph@codesourcery.com>

	* sysdeps/arm/eabi/fclrexcpt.c: Include <sysdep.h> instead of
	<asm/procinfo.h>.  Use HWCAP_ARM_VFP instead of HWCAP_VFP.
	* sysdeps/arm/eabi/fedisblxcpt.c: Likewise.
	* sysdeps/arm/eabi/feenablxcpt.c: Likewise.
	* sysdeps/arm/eabi/fegetenv.c: Likewise.
	* sysdeps/arm/eabi/fegetexcept.c: Likewise.
	* sysdeps/arm/eabi/fegetround.c: Likewise.
	* sysdeps/arm/eabi/feholdexcpt.c: Likewise.
	* sysdeps/arm/eabi/fesetenv.c: Likewise.
	* sysdeps/arm/eabi/fesetround.c: Likewise.
	* sysdeps/arm/eabi/fraiseexcpt.c: Likewise.
	* sysdeps/arm/eabi/fsetexcptflg.c: Likewise.
	* sysdeps/arm/eabi/ftestexcept.c: Likewise.
	* sysdeps/arm/eabi/setfpucw.c: Likewise.

Index: libc/ports/sysdeps/arm/eabi/fclrexcpt.c
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/fclrexcpt.c,v
retrieving revision 1.1
diff -u -r1.1 fclrexcpt.c
--- libc/ports/sysdeps/arm/eabi/fclrexcpt.c	10 Oct 2005 15:29:32 -0000	1.1
+++ libc/ports/sysdeps/arm/eabi/fclrexcpt.c	24 Oct 2006 19:17:51 -0000
@@ -23,12 +23,12 @@
 #include <unistd.h>
 #include <ldsodefs.h>
 #include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
 
 int
 __feclearexcept (int excepts)
 {
-  if (GLRO (dl_hwcap) & HWCAP_VFP)
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
     {
       unsigned long int temp;
 
Index: libc/ports/sysdeps/arm/eabi/fedisblxcpt.c
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/fedisblxcpt.c,v
retrieving revision 1.1
diff -u -r1.1 fedisblxcpt.c
--- libc/ports/sysdeps/arm/eabi/fedisblxcpt.c	10 Oct 2005 15:29:32 -0000	1.1
+++ libc/ports/sysdeps/arm/eabi/fedisblxcpt.c	24 Oct 2006 19:17:51 -0000
@@ -24,12 +24,12 @@
 #include <unistd.h>
 #include <ldsodefs.h>
 #include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
 
 int
 fedisableexcept (int excepts)
 {
-  if (GLRO (dl_hwcap) & HWCAP_VFP)
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
     {
       unsigned long int new_exc, old_exc;
 
Index: libc/ports/sysdeps/arm/eabi/feenablxcpt.c
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/feenablxcpt.c,v
retrieving revision 1.1
diff -u -r1.1 feenablxcpt.c
--- libc/ports/sysdeps/arm/eabi/feenablxcpt.c	10 Oct 2005 15:29:32 -0000	1.1
+++ libc/ports/sysdeps/arm/eabi/feenablxcpt.c	24 Oct 2006 19:17:51 -0000
@@ -24,12 +24,12 @@
 #include <unistd.h>
 #include <ldsodefs.h>
 #include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
 
 int
 feenableexcept (int excepts)
 {
-  if (GLRO (dl_hwcap) & HWCAP_VFP)
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
     {
       unsigned long int new_exc, old_exc;
 
Index: libc/ports/sysdeps/arm/eabi/fegetenv.c
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/fegetenv.c,v
retrieving revision 1.1
diff -u -r1.1 fegetenv.c
--- libc/ports/sysdeps/arm/eabi/fegetenv.c	10 Oct 2005 15:29:32 -0000	1.1
+++ libc/ports/sysdeps/arm/eabi/fegetenv.c	24 Oct 2006 19:17:51 -0000
@@ -23,12 +23,12 @@
 #include <unistd.h>
 #include <ldsodefs.h>
 #include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
 
 int
 __fegetenv (fenv_t *envp)
 {
-  if (GLRO (dl_hwcap) & HWCAP_VFP)
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
     {
       unsigned long int temp;
       _FPU_GETCW (temp);
Index: libc/ports/sysdeps/arm/eabi/fegetexcept.c
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/fegetexcept.c,v
retrieving revision 1.1
diff -u -r1.1 fegetexcept.c
--- libc/ports/sysdeps/arm/eabi/fegetexcept.c	10 Oct 2005 15:29:32 -0000	1.1
+++ libc/ports/sysdeps/arm/eabi/fegetexcept.c	24 Oct 2006 19:17:51 -0000
@@ -24,12 +24,12 @@
 #include <unistd.h>
 #include <ldsodefs.h>
 #include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
 
 int
 fegetexcept (void)
 {
-  if (GLRO (dl_hwcap) & HWCAP_VFP)
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
     {
       unsigned long temp;
 
Index: libc/ports/sysdeps/arm/eabi/fegetround.c
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/fegetround.c,v
retrieving revision 1.1
diff -u -r1.1 fegetround.c
--- libc/ports/sysdeps/arm/eabi/fegetround.c	10 Oct 2005 15:29:32 -0000	1.1
+++ libc/ports/sysdeps/arm/eabi/fegetround.c	24 Oct 2006 19:17:51 -0000
@@ -23,12 +23,12 @@
 #include <unistd.h>
 #include <ldsodefs.h>
 #include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
 
 int
 fegetround (void)
 {
-  if (GLRO (dl_hwcap) & HWCAP_VFP)
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
     {
       unsigned int temp;
 
Index: libc/ports/sysdeps/arm/eabi/feholdexcpt.c
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/feholdexcpt.c,v
retrieving revision 1.1
diff -u -r1.1 feholdexcpt.c
--- libc/ports/sysdeps/arm/eabi/feholdexcpt.c	10 Oct 2005 15:29:32 -0000	1.1
+++ libc/ports/sysdeps/arm/eabi/feholdexcpt.c	24 Oct 2006 19:17:51 -0000
@@ -23,12 +23,12 @@
 #include <unistd.h>
 #include <ldsodefs.h>
 #include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
 
 int
 feholdexcept (fenv_t *envp)
 {
-  if (GLRO (dl_hwcap) & HWCAP_VFP)
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
     {
       unsigned long int temp;
 
Index: libc/ports/sysdeps/arm/eabi/fesetenv.c
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/fesetenv.c,v
retrieving revision 1.1
diff -u -r1.1 fesetenv.c
--- libc/ports/sysdeps/arm/eabi/fesetenv.c	10 Oct 2005 15:29:32 -0000	1.1
+++ libc/ports/sysdeps/arm/eabi/fesetenv.c	24 Oct 2006 19:17:51 -0000
@@ -23,12 +23,12 @@
 #include <unistd.h>
 #include <ldsodefs.h>
 #include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
 
 int
 __fesetenv (const fenv_t *envp)
 {
-  if (GLRO (dl_hwcap) & HWCAP_VFP)
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
     {
       unsigned int temp;
 
Index: libc/ports/sysdeps/arm/eabi/fesetround.c
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/fesetround.c,v
retrieving revision 1.1
diff -u -r1.1 fesetround.c
--- libc/ports/sysdeps/arm/eabi/fesetround.c	10 Oct 2005 15:29:32 -0000	1.1
+++ libc/ports/sysdeps/arm/eabi/fesetround.c	24 Oct 2006 19:17:51 -0000
@@ -23,12 +23,12 @@
 #include <unistd.h>
 #include <ldsodefs.h>
 #include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
 
 int
 fesetround (int round)
 {
-  if (GLRO (dl_hwcap) & HWCAP_VFP)
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
     {
       fpu_control_t temp;
 
Index: libc/ports/sysdeps/arm/eabi/fraiseexcpt.c
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/fraiseexcpt.c,v
retrieving revision 1.1
diff -u -r1.1 fraiseexcpt.c
--- libc/ports/sysdeps/arm/eabi/fraiseexcpt.c	10 Oct 2005 15:29:32 -0000	1.1
+++ libc/ports/sysdeps/arm/eabi/fraiseexcpt.c	24 Oct 2006 19:17:51 -0000
@@ -24,12 +24,12 @@
 #include <unistd.h>
 #include <ldsodefs.h>
 #include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
 
 int
 feraiseexcept (int excepts)
 {
-  if (GLRO (dl_hwcap) & HWCAP_VFP)
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
     {
       int fpscr;
       const float fp_zero = 0.0, fp_one = 1.0, fp_max = FLT_MAX,
Index: libc/ports/sysdeps/arm/eabi/fsetexcptflg.c
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/fsetexcptflg.c,v
retrieving revision 1.1
diff -u -r1.1 fsetexcptflg.c
--- libc/ports/sysdeps/arm/eabi/fsetexcptflg.c	10 Oct 2005 15:29:32 -0000	1.1
+++ libc/ports/sysdeps/arm/eabi/fsetexcptflg.c	24 Oct 2006 19:17:51 -0000
@@ -24,12 +24,12 @@
 #include <unistd.h>
 #include <ldsodefs.h>
 #include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
 
 int
 __fesetexceptflag (const fexcept_t *flagp, int excepts)
 {
-  if (GLRO (dl_hwcap) & HWCAP_VFP)
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
     {
       fexcept_t temp;
 
Index: libc/ports/sysdeps/arm/eabi/ftestexcept.c
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/ftestexcept.c,v
retrieving revision 1.1
diff -u -r1.1 ftestexcept.c
--- libc/ports/sysdeps/arm/eabi/ftestexcept.c	10 Oct 2005 15:29:32 -0000	1.1
+++ libc/ports/sysdeps/arm/eabi/ftestexcept.c	24 Oct 2006 19:17:51 -0000
@@ -23,12 +23,12 @@
 #include <unistd.h>
 #include <ldsodefs.h>
 #include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
 
 int
 fetestexcept (int excepts)
 {
-  if (GLRO (dl_hwcap) & HWCAP_VFP)
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
     {
       fexcept_t temp;
 
Index: libc/ports/sysdeps/arm/eabi/setfpucw.c
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/arm/eabi/setfpucw.c,v
retrieving revision 1.1
diff -u -r1.1 setfpucw.c
--- libc/ports/sysdeps/arm/eabi/setfpucw.c	10 Oct 2005 15:29:32 -0000	1.1
+++ libc/ports/sysdeps/arm/eabi/setfpucw.c	24 Oct 2006 19:17:51 -0000
@@ -23,12 +23,12 @@
 #include <unistd.h>
 #include <ldsodefs.h>
 #include <dl-procinfo.h>
-#include <asm/procinfo.h>
+#include <sysdep.h>
 
 void
 __setfpucw (fpu_control_t set)
 {
-  if (GLRO (dl_hwcap) & HWCAP_VFP)
+  if (GLRO (dl_hwcap) & HWCAP_ARM_VFP)
     {
       fpu_control_t cw;