summaryrefslogtreecommitdiff
path: root/recipes/glibc/glibc-2.3.2/libgcc-compat-all.patch
blob: 38eae4cd78f23a360639e9b60ad16870cde1724c (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
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
--- sysdeps/mips/Makefile.orig	Sun Oct 13 14:45:56 2002
+++ sysdeps/mips/Makefile	Sun Oct 13 14:51:20 2002
@@ -6,3 +6,11 @@
 ifeq ($(subdir),setjmp)
 sysdep_routines += setjmp_aux
 endif
+
+ifeq ($(subdir),csu)
+ifeq (yes,$(build-shared))
+# Compatibility
+sysdep_routines += libgcc-compat
+shared-only-routines += libgcc-compat
+endif
+endif
--- sysdeps/mips/Dist.orig	Sun Oct 13 15:07:31 2002
+++ sysdeps/mips/Dist	Sun Oct 13 15:07:41 2002
@@ -1,3 +1,4 @@
+libgcc-compat.c
 setjmp_aux.c
 regdef.h
 sgidefs.h
--- /dev/null	Sat Mar 16 18:32:44 2002
+++ sysdeps/mips/libgcc-compat.c	Sun Oct 20 17:11:59 2002
@@ -0,0 +1,66 @@
+/* pre-.hidden libgcc compatibility
+   Copyright (C) 2002 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Guido Guenther <agx@sigxcpu.org>
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+
+#include <stdint.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
+
+extern int32_t __cmpdi2 (int64_t, int64_t);
+int32_t __cmpdi2_internal (int64_t u, int64_t v)
+{
+  return __cmpdi2 (u, v);
+}
+symbol_version (__cmpdi2_internal, __cmpdi2, GLIBC_2.0);
+
+
+extern int32_t __ucmpdi2 (int64_t, int64_t);
+int32_t __ucmpdi2_internal (int64_t u, int64_t v)
+{
+  return __ucmpdi2 (u, v);
+}
+symbol_version (__ucmpdi2_internal, __ucmpdi2, GLIBC_2.0);
+
+
+extern int64_t __fixdfdi (double);
+int64_t __fixdfdi_internal (double d)
+{
+  return __fixdfdi (d);
+}
+symbol_version (__fixdfdi_internal, __fixdfdi, GLIBC_2.0);
+
+
+extern double __floatdidf (int64_t);
+double __floatdidf_internal (int64_t u)
+{
+	  return __floatdidf (u);
+}
+symbol_version (__floatdidf_internal, __floatdidf, GLIBC_2.0);
+
+
+extern float floatdisf (int64_t);
+float __floatdisf_internal (int64_t u)
+{
+  return __floatdisf (u);
+}
+symbol_version (__floatdisf_internal, __floatdisf, GLIBC_2.0);
+
+#endif
--- /dev/null	Sat Mar 16 18:32:44 2002
+++ sysdeps/mips/Versions	Sun Oct 20 17:12:00 2002
@@ -0,0 +1,8 @@
+libc {
+  GLIBC_2.0 {
+    # Functions from libgcc.
+    __cmpdi2; __ucmpdi2;
+    __divdi3; __moddi3; __udivdi3; __umoddi3;
+    __fixdfdi; __floatdidf; __floatdisf;
+  }
+}
--- /dev/null	Sat Mar 16 18:32:44 2002
+++ sysdeps/i386/libgcc-compat.c	Sun Feb 16 01:43:47 2003
@@ -0,0 +1,75 @@
+/* pre-.hidden libgcc compatibility
+   Copyright (C) 2002 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Guido Guenther <agx@sigxcpu.org>
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+
+#include <stdint.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
+
+extern int32_t __cmpdi2 (int64_t, int64_t);
+int32_t __cmpdi2_internal (int64_t u, int64_t v)
+{
+  return __cmpdi2 (u, v);
+}
+symbol_version (__cmpdi2_internal, __cmpdi2, GLIBC_2.0);
+
+
+extern int32_t __ucmpdi2 (int64_t, int64_t);
+int32_t __ucmpdi2_internal (int64_t u, int64_t v)
+{
+  return __ucmpdi2 (u, v);
+}
+symbol_version (__ucmpdi2_internal, __ucmpdi2, GLIBC_2.0);
+
+
+extern int64_t __fixunsdfdi (double);
+int64_t __fixunsdfdi_internal (double d)
+{
+	  return __fixunsdfdi (d);
+}
+symbol_version (__fixunsdfdi_internal, __fixunsdfdi, GLIBC_2.0);
+
+extern int64_t __fixunssfdi (float);
+int64_t __fixunssfdi_internal (float d)
+{
+  return __fixunssfdi (d);
+}
+
+symbol_version (__fixunsfdi_internal, __fixunsfdi, GLIBC_2.0);
+
+typedef float XFtype __attribute__ ((mode (XF)));
+
+extern int64_t __fixunsxfdi (XFtype);
+int64_t __fixunsxfdi_internal (XFtype d)
+{
+  return __fixunsxfdi (d);
+}
+
+symbol_version (__fixunsxfdi_internal, __fixunsxfdi, GLIBC_2.0);
+
+extern double __floatdidf (int64_t);
+double __floatdidf_internal (int64_t u)
+{
+	  return __floatdidf (u);
+}
+symbol_version (__floatdidf_internal, __floatdidf, GLIBC_2.0);
+
+#endif
--- sysdeps/i386/Makefile	19 Sep 2002 06:46:06 -0000	1.14
+++ sysdeps/i386/Makefile	16 Feb 2003 11:33:41 -0000
@@ -20,3 +20,11 @@
 CFLAGS-dl-load.c += -Wno-unused
 CFLAGS-dl-reloc.c += -Wno-unused
 endif
+
+ifeq ($(subdir),csu)
+ifeq (yes,$(build-shared))
+# Compatibility
+sysdep_routines += libgcc-compat
+shared-only-routines += libgcc-compat
+endif
+endif
--- sysdeps/i386/Dist	28 Aug 2002 08:24:48 -0000	1.4
+++ sysdeps/i386/Dist	16 Feb 2003 11:33:47 -0000
@@ -2,3 +2,4 @@
 machine-gmon.h
 bp-asm.h
 bits/link.h
+libgcc-compat.c
--- sysdeps/i386/Versions	17 May 1999 17:23:56 -0000	1.3
+++ sysdeps/i386/Versions	16 Feb 2003 11:34:17 -0000
@@ -2,6 +2,9 @@
   GLIBC_2.0 {
     # Functions from libgcc.
     __divdi3; __moddi3; __udivdi3; __umoddi3;
+    __cmpdi2; __ucmpdi2; 
+    __fixunsdfdi; __fixunssfdi; __fixunsxfdi;
+    __floatdidf;
   }
   GLIBC_2.1 {
     # global variable
--- /dev/null	Sat Mar 16 18:32:44 2002
+++ sysdeps/sparc/sparc32/libgcc-compat.c	Fri Feb  7 00:29:23 2003
@@ -0,0 +1,121 @@
+/* pre-.hidden libgcc compatibility
+   Copyright (C) 2002 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Guido Guenther <agx@sigxcpu.org>
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+
+#include <stdint.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
+
+extern int64_t __ashldi3 (int64_t, int32_t);
+int64_t __ashldi3_internal (int64_t u, int32_t b)
+{
+  return __ashldi3 (u, b);
+}
+symbol_version (__ashldi3_internal, __ashldi3, GLIBC_2.0);
+
+
+extern int64_t __ashrdi3 (int64_t, int32_t);
+int64_t __ashrdi3_internal (int64_t u, int32_t b)
+{
+  return __ashrdi3 (u, b);
+}
+symbol_version (__ashrdi3_internal, __ashrdi3, GLIBC_2.0);
+
+
+extern int64_t __lshrdi3 (int64_t, int32_t);
+int64_t __lshrdi3_internal (int64_t u, int32_t b)
+{
+  return __lshrdi3 (u, b);
+}
+symbol_version (__lshrdi3_internal, __lshrdi3, GLIBC_2.0);
+
+extern int32_t __cmpdi2 (int64_t, int64_t);
+int32_t __cmpdi2_internal (int64_t u, int64_t v)
+{
+  return __cmpdi2 (u, v);
+}
+symbol_version (__cmpdi2_internal, __cmpdi2, GLIBC_2.0);
+
+
+extern int32_t __ucmpdi2 (int64_t, int64_t);
+int32_t __ucmpdi2_internal (int64_t u, int64_t v)
+{
+  return __ucmpdi2 (u, v);
+}
+symbol_version (__ucmpdi2_internal, __ucmpdi2, GLIBC_2.0);
+
+
+extern int64_t __fixdfdi (double);
+int64_t __fixdfdi_internal (double d)
+{
+  return __fixdfdi (d);
+}
+symbol_version (__fixdfdi_internal, __fixdfdi, GLIBC_2.0);
+
+
+extern int64_t __fixsfdi (float);
+int64_t __fixsfdi_internal (float d)
+{
+  return __fixsfdi (d);
+}
+symbol_version (__fixsfdi_internal, __fixsfdi, GLIBC_2.0);
+
+
+extern int64_t __fixunsdfdi (double);
+int64_t __fixunsdfdi_internal (double d)
+{
+	  return __fixunsdfdi (d);
+}
+symbol_version (__fixunsdfdi_internal, __fixunsdfdi, GLIBC_2.0);
+
+extern int64_t __fixunssfdi (float);
+int64_t __fixunssfdi_internal (float d)
+{
+  return __fixunssfdi (d);
+}
+
+symbol_version (__fixunssfdi_internal, __fixunssfdi, GLIBC_2.0);
+
+
+extern double __floatdidf (int64_t);
+double __floatdidf_internal (int64_t u)
+{
+	  return __floatdidf (u);
+}
+symbol_version (__floatdidf_internal, __floatdidf, GLIBC_2.0);
+
+
+extern float floatdisf (int64_t);
+float __floatdisf_internal (int64_t u)
+{
+  return __floatdisf (u);
+}
+symbol_version (__floatdisf_internal, __floatdisf, GLIBC_2.0);
+
+
+extern int64_t __muldi3 (int64_t, int64_t);
+int64_t __muldi3_internal (int64_t u, int64_t v)
+{
+  return __muldi3 (u, v);
+}
+symbol_version (__muldi3_internal, __muldi3, GLIBC_2.0);
+
+#endif
--- sysdeps/sparc/sparc32/Makefile	6 Jul 2001 04:56:04 -0000	1.5
+++ sysdeps/sparc/sparc32/Makefile	6 Feb 2003 23:32:15 -0000
@@ -20,6 +20,14 @@
 sysdep_routines = dotmul umul $(divrem) alloca
 endif	# gnulib
 
+ifeq ($(subdir),csu)
+ifeq (yes,$(build-shared))
+# Compatibility
+sysdep_routines += libgcc-compat
+shared-only-routines += libgcc-compat
+endif
+endif
+
 # We distribute these files, even though they are generated,
 # so as to avoid the need for a functioning m4 to build the library.
 divrem := sdiv udiv rem urem
--- sysdeps/sparc/sparc32/Dist	9 Oct 2000 00:39:58 -0000	1.4
+++ sysdeps/sparc/sparc32/Dist	6 Feb 2003 23:51:09 -0000
@@ -7,3 +7,4 @@
 urem.S
 alloca.S
 ieee754.h
+libgcc-compat.c
--- sysdeps/sparc/sparc32/Versions.orig	2003-02-07 07:46:20.000000000 -0500
+++ sysdeps/sparc/sparc32/Versions	2003-02-07 07:46:58.000000000 -0500
@@ -1,5 +1,9 @@
 libc {
   GLIBC_2.0 {
     .div; .mul; .rem; .udiv; .umul; .urem;
+    __divdi3; __moddi3; __udivdi3; __umoddi3; __muldi3;
+    __ashldi3; __ashrdi3; __lshrdi3; __cmpdi2; __ucmpdi2;
+    __fixdfdi; __fixsfdi; __fixunsdfdi; __fixunssfdi; 
+    __floatdidf; __floatdisf;
   }
 }
--- /dev/null	Sat Mar 16 18:32:44 2002
+++ sysdeps/alpha/libgcc-compat.c	Sat Mar  1 21:19:36 2003
@@ -0,0 +1,35 @@
+/* pre-.hidden libgcc compatibility
+   Copyright (C) 2002 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Guido Guenther <agx@sigxcpu.org>
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <stdint.h>
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_6)
+
+typedef int int128_t __attribute__((__mode__(TI)));
+
+extern int128_t __multi3 (int128_t, int128_t);
+int128_t INTUSE (__multi3) (int128_t x, int128_t y)
+{
+  return __multi3 (x, y);
+}
+symbol_version (INTUSE (__multi3), __multi3, GLIBC_2.0);
+
+#endif
--- sysdeps/alpha/Versions	20 Jan 1999 09:23:32 -0000	1.2
+++ sysdeps/alpha/Versions	1 Mar 2003 21:11:25 -0000
@@ -3,6 +3,8 @@
     # functions with special/multiple interfaces
     __divqu; __remqu; __divqs; __remqs; __divlu; __remlu; __divls;
     __remls; __divl; __reml; __divq; __remq; __divqu; __remqu;
+    # libgcc-compat
+    __multi3;
   }
 }
 libm {
--- sysdeps/alpha/Makefile	29 Jan 2002 03:53:32 -0000	1.18
+++ sysdeps/alpha/Makefile	2 Mar 2003 12:20:58 -0000
@@ -47,3 +47,11 @@
 # libc.so requires about 16k for the small data area, which is well
 # below the 64k maximum.
 pic-ccflag = -fpic
+
+ifeq ($(subdir),csu)
+ifeq (yes,$(build-shared))
+# Compatibility
+sysdep_routines += libgcc-compat
+shared-only-routines += libgcc-compat
+endif
+endif