1 |
vapier 08/06/22 10:52:51 |
2 |
|
3 |
Added: gcc-3.2.3-poisoned-malloc.patch |
4 |
Log: |
5 |
Fix for building with newer gcc versions #225743 by Emil Wojak. |
6 |
(Portage version: 2.2_rc1/cvs/Linux 2.6.25 x86_64, RepoMan options: --force) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 sys-devel/gcc/files/3.2.3/gcc-3.2.3-poisoned-malloc.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/gcc/files/3.2.3/gcc-3.2.3-poisoned-malloc.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-devel/gcc/files/3.2.3/gcc-3.2.3-poisoned-malloc.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: gcc-3.2.3-poisoned-malloc.patch |
15 |
=================================================================== |
16 |
fix building gcc-3.2.3 with newer versions of gcc |
17 |
|
18 |
http://bugs.gentoo.org/225743 |
19 |
http://gcc.gnu.org/ml/gcc-help/2008-01/msg00040.html |
20 |
http://www.archivum.info/gnu.gcc.help/2008-05/msg00093.html |
21 |
|
22 |
--- gcc-3.2.3/gcc/read-rtl.c |
23 |
+++ gcc-3.2.3/gcc/read-rtl.c |
24 |
@@ -659,7 +659,7 @@ |
25 |
{ |
26 |
ungetc (c, infile); |
27 |
list_counter++; |
28 |
- obstack_ptr_grow (&vector_stack, (PTR) read_rtx (infile)); |
29 |
+ obstack_ptr_grow (&vector_stack, read_rtx (infile)); |
30 |
} |
31 |
if (list_counter > 0) |
32 |
{ |
33 |
--- gcc-3.2.3/gcc/system.h |
34 |
+++ gcc-3.2.3/gcc/system.h |
35 |
@@ -589,7 +589,9 @@ |
36 |
#undef realloc |
37 |
#undef calloc |
38 |
#undef strdup |
39 |
+#if ! (defined(FLEX_SCANNER) || defined(YYBISON) || defined(YYBYACC)) |
40 |
#pragma GCC poison malloc realloc calloc strdup |
41 |
+#endif |
42 |
|
43 |
/* Old target macros that have moved to the target hooks structure. */ |
44 |
#pragma GCC poison ASM_OPEN_PAREN ASM_CLOSE_PAREN \ |
45 |
@@ -628,4 +630,11 @@ |
46 |
|
47 |
#endif /* GCC >= 3.0 */ |
48 |
|
49 |
+#if defined(FLEX_SCANNER) || defined(YYBISON) || defined(YYBYACC) |
50 |
+/* Flex and bison use malloc and realloc. Yuk. Note that this means |
51 |
+ really_call_* cannot be used in a .l or .y file. */ |
52 |
+#define malloc xmalloc |
53 |
+#define realloc xrealloc |
54 |
+#endif |
55 |
+ |
56 |
#endif /* ! GCC_SYSTEM_H */ |
57 |
|
58 |
|
59 |
|
60 |
-- |
61 |
gentoo-commits@l.g.o mailing list |