]>
Commit | Line | Data |
---|---|---|
51f9e7ac MT |
1 | # |
2 | # Submitted-By: Marc Kleine-Budde, 2006-11-22 | |
3 | # Committed-By: Marc Kleine-Budde | |
4 | # | |
5 | # Error: | |
6 | # | |
7 | # try to compile glibc-ports with sanitized headers | |
8 | # | |
9 | # arm-v4t-linux-gnueabi-gcc ../ports/sysdeps/arm/eabi/setfpucw.c -c | |
10 | #-std=gnu99 -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants | |
11 | #-g -Wstrict-prototypes -Wno-uninitialized -D__NO_MATH_INLINES | |
12 | #-D__LIBC_INTERNAL_MATH_INLINES -DNO_LONG_DOUBLE | |
13 | #-D_Mlong_double_=double -I../include | |
14 | #-I/home/mkl/pengutronix/ptxdist/build/OSELAS.Toolchain-trunk-headers/build-target/glibc-2.5-build/math | |
15 | #-I/home/mkl/pengutronix/ptxdist/build/OSELAS.Toolchain-trunk-headers/build-target/glibc-2.5-build | |
16 | #-I../ports/sysdeps/arm/elf | |
17 | #-I../ports/sysdeps/unix/sysv/linux/arm/eabi/nptl | |
18 | #-I../ports/sysdeps/unix/sysv/linux/arm/eabi | |
19 | #-I../ports/sysdeps/unix/sysv/linux/arm/nptl | |
20 | #-I../ports/sysdeps/unix/sysv/linux/arm | |
21 | #-I../ports/sysdeps/unix/sysv/linux -I../nptl/sysdeps/unix/sysv/linux | |
22 | #-I../nptl/sysdeps/pthread -I../sysdeps/pthread | |
23 | #-I../sysdeps/unix/sysv/linux -I../sysdeps/gnu | |
24 | #-I../sysdeps/unix/common -I../sysdeps/unix/mman | |
25 | #-I../sysdeps/unix/inet -I../ports/sysdeps/unix/sysv | |
26 | #-I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv | |
27 | #-I../ports/sysdeps/unix/arm -I../ports/sysdeps/unix | |
28 | #-I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix | |
29 | #-I../ports/sysdeps/arm/eabi -I../ports/sysdeps/arm/nptl | |
30 | #-I../ports/sysdeps/arm -I../sysdeps/wordsize-32 | |
31 | #-I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 | |
32 | #-I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic | |
33 | #-I../ports -I../nptl -I.. -I../libio -I. -nostdinc -isystem | |
34 | #/ptx/work/mkl/ptxdist/build/OSELAS.Toolchain-trunk-headers/install/arm-v4t-linux-gnueabi/gcc-4.1.1-glibc-2.5-linux-2.6.19-rc6-s/bin/../lib/gcc/arm-v4t-linux-gnueabi/4.1.1/include | |
35 | #-isystem | |
36 | #/home/mkl/pengutronix/ptxdist/build/OSELAS.Toolchain-trunk-headers/install/arm-v4t-linux-gnueabi/gcc-4.1.1-glibc-2.5-linux-2.6.19-rc6-s/sysroot-arm-v4t-linux-gnueabi/usr/include | |
37 | #-D_LIBC_REENTRANT -include ../include/libc-symbols.h -o | |
38 | #/home/mkl/pengutronix/ptxdist/build/OSELAS.Toolchain-trunk-headers/build-target/glibc-2.5-build/math/setfpucw.o | |
39 | #-MD -MP -MF | |
40 | #/home/mkl/pengutronix/ptxdist/build/OSELAS.Toolchain-trunk-headers/build-target/glibc-2.5-build/math/setfpucw.o.dt | |
41 | #-MT | |
42 | #/home/mkl/pengutronix/ptxdist/build/OSELAS.Toolchain-trunk-headers/build-target/glibc-2.5-build/math/setfpucw.o | |
43 | # ../ports/sysdeps/arm/eabi/setfpucw.c:26:26: error: asm/procinfo.h: No such file or directory | |
44 | # ../ports/sysdeps/arm/eabi/setfpucw.c: In function '__setfpucw': | |
45 | # ../ports/sysdeps/arm/eabi/setfpucw.c:31: error: 'HWCAP_VFP' undeclared (first use in this function) | |
46 | # ../ports/sysdeps/arm/eabi/setfpucw.c:31: error: (Each undeclared identifier is reported only once | |
47 | # ../ports/sysdeps/arm/eabi/setfpucw.c:31: error: for each function it appears in.) | |
48 | # | |
49 | # Description: | |
50 | # | |
51 | # http://sourceware.org/ml/libc-ports/2006-10/msg00040.html | |
52 | # | |
53 | # State: | |
54 | # | |
55 | # added to glibc-ports on 10/31/2006 06:20 PM | |
56 | # | |
57 | Date: Tue, 24 Oct 2006 19:25:12 +0000 (UTC) | |
58 | From: "Joseph S. Myers" <joseph@codesourcery.com> | |
59 | To: libc-ports@sourceware.org | |
60 | Subject: Avoid using asm/procinfo.h | |
61 | ||
62 | I previously noted | |
63 | <http://sourceware.org/ml/libc-ports/2006-08/msg00023.html> that the | |
64 | use of <asm/procinfo.h>, a Linux-specific kernel header, in | |
65 | sysdeps/arm/eabi, is an abstraction violation, and that in principle | |
66 | all the files in sysdeps/arm/eabi should use sysdep.h not | |
67 | asm/procinfo.h for HWCAP_VFP. | |
68 | ||
69 | The ARM kernel maintainers have now declared that <asm/procinfo.h> | |
70 | should not be used outside the kernel at all (and in particular that | |
71 | headers_install is correct in not exporting it), and that these | |
72 | definitions will move to a different kernel header. This gives a | |
73 | concrete reason for making the change to use glibc's internal | |
74 | definitions, which this patch does, thereby allowing glibc to build | |
75 | with the exported headers. | |
76 | ||
77 | 2006-10-24 Joseph S. Myers <joseph@codesourcery.com> | |
78 | ||
79 | * sysdeps/arm/eabi/fclrexcpt.c: Include <sysdep.h> instead of | |
80 | <asm/procinfo.h>. Use HWCAP_ARM_VFP instead of HWCAP_VFP. | |
81 | * sysdeps/arm/eabi/fedisblxcpt.c: Likewise. | |
82 | * sysdeps/arm/eabi/feenablxcpt.c: Likewise. | |
83 | * sysdeps/arm/eabi/fegetenv.c: Likewise. | |
84 | * sysdeps/arm/eabi/fegetexcept.c: Likewise. | |
85 | * sysdeps/arm/eabi/fegetround.c: Likewise. | |
86 | * sysdeps/arm/eabi/feholdexcpt.c: Likewise. | |
87 | * sysdeps/arm/eabi/fesetenv.c: Likewise. | |
88 | * sysdeps/arm/eabi/fesetround.c: Likewise. | |
89 | * sysdeps/arm/eabi/fraiseexcpt.c: Likewise. | |
90 | * sysdeps/arm/eabi/fsetexcptflg.c: Likewise. | |
91 | * sysdeps/arm/eabi/ftestexcept.c: Likewise. | |
92 | * sysdeps/arm/eabi/setfpucw.c: Likewise. | |
93 | ||
94 | Index: glibc-ports-2.5/sysdeps/arm/eabi/fclrexcpt.c | |
95 | =================================================================== | |
96 | --- glibc-ports-2.5.orig/sysdeps/arm/eabi/fclrexcpt.c | |
97 | +++ glibc-ports-2.5/sysdeps/arm/eabi/fclrexcpt.c | |
98 | @@ -23,12 +23,12 @@ | |
99 | #include <unistd.h> | |
100 | #include <ldsodefs.h> | |
101 | #include <dl-procinfo.h> | |
102 | -#include <asm/procinfo.h> | |
103 | +#include <sysdep.h> | |
104 | ||
105 | int | |
106 | __feclearexcept (int excepts) | |
107 | { | |
108 | - if (GLRO (dl_hwcap) & HWCAP_VFP) | |
109 | + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) | |
110 | { | |
111 | unsigned long int temp; | |
112 | ||
113 | Index: glibc-ports-2.5/sysdeps/arm/eabi/fedisblxcpt.c | |
114 | =================================================================== | |
115 | --- glibc-ports-2.5.orig/sysdeps/arm/eabi/fedisblxcpt.c | |
116 | +++ glibc-ports-2.5/sysdeps/arm/eabi/fedisblxcpt.c | |
117 | @@ -24,12 +24,12 @@ | |
118 | #include <unistd.h> | |
119 | #include <ldsodefs.h> | |
120 | #include <dl-procinfo.h> | |
121 | -#include <asm/procinfo.h> | |
122 | +#include <sysdep.h> | |
123 | ||
124 | int | |
125 | fedisableexcept (int excepts) | |
126 | { | |
127 | - if (GLRO (dl_hwcap) & HWCAP_VFP) | |
128 | + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) | |
129 | { | |
130 | unsigned long int new_exc, old_exc; | |
131 | ||
132 | Index: glibc-ports-2.5/sysdeps/arm/eabi/feenablxcpt.c | |
133 | =================================================================== | |
134 | --- glibc-ports-2.5.orig/sysdeps/arm/eabi/feenablxcpt.c | |
135 | +++ glibc-ports-2.5/sysdeps/arm/eabi/feenablxcpt.c | |
136 | @@ -24,12 +24,12 @@ | |
137 | #include <unistd.h> | |
138 | #include <ldsodefs.h> | |
139 | #include <dl-procinfo.h> | |
140 | -#include <asm/procinfo.h> | |
141 | +#include <sysdep.h> | |
142 | ||
143 | int | |
144 | feenableexcept (int excepts) | |
145 | { | |
146 | - if (GLRO (dl_hwcap) & HWCAP_VFP) | |
147 | + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) | |
148 | { | |
149 | unsigned long int new_exc, old_exc; | |
150 | ||
151 | Index: glibc-ports-2.5/sysdeps/arm/eabi/fegetenv.c | |
152 | =================================================================== | |
153 | --- glibc-ports-2.5.orig/sysdeps/arm/eabi/fegetenv.c | |
154 | +++ glibc-ports-2.5/sysdeps/arm/eabi/fegetenv.c | |
155 | @@ -23,12 +23,12 @@ | |
156 | #include <unistd.h> | |
157 | #include <ldsodefs.h> | |
158 | #include <dl-procinfo.h> | |
159 | -#include <asm/procinfo.h> | |
160 | +#include <sysdep.h> | |
161 | ||
162 | int | |
163 | __fegetenv (fenv_t *envp) | |
164 | { | |
165 | - if (GLRO (dl_hwcap) & HWCAP_VFP) | |
166 | + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) | |
167 | { | |
168 | unsigned long int temp; | |
169 | _FPU_GETCW (temp); | |
170 | Index: glibc-ports-2.5/sysdeps/arm/eabi/fegetexcept.c | |
171 | =================================================================== | |
172 | --- glibc-ports-2.5.orig/sysdeps/arm/eabi/fegetexcept.c | |
173 | +++ glibc-ports-2.5/sysdeps/arm/eabi/fegetexcept.c | |
174 | @@ -24,12 +24,12 @@ | |
175 | #include <unistd.h> | |
176 | #include <ldsodefs.h> | |
177 | #include <dl-procinfo.h> | |
178 | -#include <asm/procinfo.h> | |
179 | +#include <sysdep.h> | |
180 | ||
181 | int | |
182 | fegetexcept (void) | |
183 | { | |
184 | - if (GLRO (dl_hwcap) & HWCAP_VFP) | |
185 | + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) | |
186 | { | |
187 | unsigned long temp; | |
188 | ||
189 | Index: glibc-ports-2.5/sysdeps/arm/eabi/fegetround.c | |
190 | =================================================================== | |
191 | --- glibc-ports-2.5.orig/sysdeps/arm/eabi/fegetround.c | |
192 | +++ glibc-ports-2.5/sysdeps/arm/eabi/fegetround.c | |
193 | @@ -23,12 +23,12 @@ | |
194 | #include <unistd.h> | |
195 | #include <ldsodefs.h> | |
196 | #include <dl-procinfo.h> | |
197 | -#include <asm/procinfo.h> | |
198 | +#include <sysdep.h> | |
199 | ||
200 | int | |
201 | fegetround (void) | |
202 | { | |
203 | - if (GLRO (dl_hwcap) & HWCAP_VFP) | |
204 | + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) | |
205 | { | |
206 | unsigned int temp; | |
207 | ||
208 | Index: glibc-ports-2.5/sysdeps/arm/eabi/feholdexcpt.c | |
209 | =================================================================== | |
210 | --- glibc-ports-2.5.orig/sysdeps/arm/eabi/feholdexcpt.c | |
211 | +++ glibc-ports-2.5/sysdeps/arm/eabi/feholdexcpt.c | |
212 | @@ -23,12 +23,12 @@ | |
213 | #include <unistd.h> | |
214 | #include <ldsodefs.h> | |
215 | #include <dl-procinfo.h> | |
216 | -#include <asm/procinfo.h> | |
217 | +#include <sysdep.h> | |
218 | ||
219 | int | |
220 | feholdexcept (fenv_t *envp) | |
221 | { | |
222 | - if (GLRO (dl_hwcap) & HWCAP_VFP) | |
223 | + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) | |
224 | { | |
225 | unsigned long int temp; | |
226 | ||
227 | Index: glibc-ports-2.5/sysdeps/arm/eabi/fesetenv.c | |
228 | =================================================================== | |
229 | --- glibc-ports-2.5.orig/sysdeps/arm/eabi/fesetenv.c | |
230 | +++ glibc-ports-2.5/sysdeps/arm/eabi/fesetenv.c | |
231 | @@ -23,12 +23,12 @@ | |
232 | #include <unistd.h> | |
233 | #include <ldsodefs.h> | |
234 | #include <dl-procinfo.h> | |
235 | -#include <asm/procinfo.h> | |
236 | +#include <sysdep.h> | |
237 | ||
238 | int | |
239 | __fesetenv (const fenv_t *envp) | |
240 | { | |
241 | - if (GLRO (dl_hwcap) & HWCAP_VFP) | |
242 | + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) | |
243 | { | |
244 | unsigned int temp; | |
245 | ||
246 | Index: glibc-ports-2.5/sysdeps/arm/eabi/fesetround.c | |
247 | =================================================================== | |
248 | --- glibc-ports-2.5.orig/sysdeps/arm/eabi/fesetround.c | |
249 | +++ glibc-ports-2.5/sysdeps/arm/eabi/fesetround.c | |
250 | @@ -23,12 +23,12 @@ | |
251 | #include <unistd.h> | |
252 | #include <ldsodefs.h> | |
253 | #include <dl-procinfo.h> | |
254 | -#include <asm/procinfo.h> | |
255 | +#include <sysdep.h> | |
256 | ||
257 | int | |
258 | fesetround (int round) | |
259 | { | |
260 | - if (GLRO (dl_hwcap) & HWCAP_VFP) | |
261 | + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) | |
262 | { | |
263 | fpu_control_t temp; | |
264 | ||
265 | Index: glibc-ports-2.5/sysdeps/arm/eabi/fraiseexcpt.c | |
266 | =================================================================== | |
267 | --- glibc-ports-2.5.orig/sysdeps/arm/eabi/fraiseexcpt.c | |
268 | +++ glibc-ports-2.5/sysdeps/arm/eabi/fraiseexcpt.c | |
269 | @@ -24,12 +24,12 @@ | |
270 | #include <unistd.h> | |
271 | #include <ldsodefs.h> | |
272 | #include <dl-procinfo.h> | |
273 | -#include <asm/procinfo.h> | |
274 | +#include <sysdep.h> | |
275 | ||
276 | int | |
277 | feraiseexcept (int excepts) | |
278 | { | |
279 | - if (GLRO (dl_hwcap) & HWCAP_VFP) | |
280 | + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) | |
281 | { | |
282 | int fpscr; | |
283 | const float fp_zero = 0.0, fp_one = 1.0, fp_max = FLT_MAX, | |
284 | Index: glibc-ports-2.5/sysdeps/arm/eabi/fsetexcptflg.c | |
285 | =================================================================== | |
286 | --- glibc-ports-2.5.orig/sysdeps/arm/eabi/fsetexcptflg.c | |
287 | +++ glibc-ports-2.5/sysdeps/arm/eabi/fsetexcptflg.c | |
288 | @@ -24,12 +24,12 @@ | |
289 | #include <unistd.h> | |
290 | #include <ldsodefs.h> | |
291 | #include <dl-procinfo.h> | |
292 | -#include <asm/procinfo.h> | |
293 | +#include <sysdep.h> | |
294 | ||
295 | int | |
296 | __fesetexceptflag (const fexcept_t *flagp, int excepts) | |
297 | { | |
298 | - if (GLRO (dl_hwcap) & HWCAP_VFP) | |
299 | + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) | |
300 | { | |
301 | fexcept_t temp; | |
302 | ||
303 | Index: glibc-ports-2.5/sysdeps/arm/eabi/ftestexcept.c | |
304 | =================================================================== | |
305 | --- glibc-ports-2.5.orig/sysdeps/arm/eabi/ftestexcept.c | |
306 | +++ glibc-ports-2.5/sysdeps/arm/eabi/ftestexcept.c | |
307 | @@ -23,12 +23,12 @@ | |
308 | #include <unistd.h> | |
309 | #include <ldsodefs.h> | |
310 | #include <dl-procinfo.h> | |
311 | -#include <asm/procinfo.h> | |
312 | +#include <sysdep.h> | |
313 | ||
314 | int | |
315 | fetestexcept (int excepts) | |
316 | { | |
317 | - if (GLRO (dl_hwcap) & HWCAP_VFP) | |
318 | + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) | |
319 | { | |
320 | fexcept_t temp; | |
321 | ||
322 | Index: glibc-ports-2.5/sysdeps/arm/eabi/setfpucw.c | |
323 | =================================================================== | |
324 | --- glibc-ports-2.5.orig/sysdeps/arm/eabi/setfpucw.c | |
325 | +++ glibc-ports-2.5/sysdeps/arm/eabi/setfpucw.c | |
326 | @@ -23,12 +23,12 @@ | |
327 | #include <unistd.h> | |
328 | #include <ldsodefs.h> | |
329 | #include <dl-procinfo.h> | |
330 | -#include <asm/procinfo.h> | |
331 | +#include <sysdep.h> | |
332 | ||
333 | void | |
334 | __setfpucw (fpu_control_t set) | |
335 | { | |
336 | - if (GLRO (dl_hwcap) & HWCAP_VFP) | |
337 | + if (GLRO (dl_hwcap) & HWCAP_ARM_VFP) | |
338 | { | |
339 | fpu_control_t cw; | |
340 |