summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/gcc/files/gcc.fix_build-with-cxx.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-devtools/gcc/files/gcc.fix_build-with-cxx.patch')
-rw-r--r--recipes-devtools/gcc/files/gcc.fix_build-with-cxx.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/recipes-devtools/gcc/files/gcc.fix_build-with-cxx.patch b/recipes-devtools/gcc/files/gcc.fix_build-with-cxx.patch
new file mode 100644
index 0000000..cfceafd
--- /dev/null
+++ b/recipes-devtools/gcc/files/gcc.fix_build-with-cxx.patch
@@ -0,0 +1,39 @@
1gcc.fix_build-with-cxx
2
3On native builds, when linking cc1 with static libraries (ppl cloog,
4gmp, mpfr), there is c++ code brought in by libppl. Normally cc1 is
5linked through "gcc", but in this case it should be linked with "g++".
6
7To work around this, gcc is configured with --enable-build-with-cxx,
8which compiles and links the entire compiler with g++. Since g++ is
9more rigorous about the use of the "const" keyword, there is a couple
10of places that we get syntax errors. This patch fixes them.
11
12--- gcc-4.6.0/gcc/config/rs6000/rs6000.c-orig 2011-05-09 10:35:55.627190744 -0500
13+++ gcc-4.6.0/gcc/config/rs6000/rs6000.c 2011-05-09 10:39:09.232814653 -0500
14@@ -22502,11 +22502,12 @@
15 rs6000_xcoff_strip_dollar (const char *name)
16 {
17 char *strip, *p;
18+ const char *q;
19 int len;
20
21- p = strchr (name, '$');
22+ q = strchr (name, '$');
23
24- if (p == 0 || p == name)
25+ if (q == 0 || q == name)
26 return name;
27
28 len = strlen (name);
29--- gcc-4.6.0/gcc/objc/objc-next-runtime-abi-02.c-orig 2011-05-11 13:46:44.559065173 -0500
30+++ gcc-4.6.0/gcc/objc/objc-next-runtime-abi-02.c 2011-05-11 13:48:34.956939829 -0500
31@@ -1878,7 +1878,7 @@
32 static const char *
33 newabi_append_ro (const char *name)
34 {
35- char *dollar;
36+ const char *dollar;
37 char *p;
38 static char string[BUFSIZE];
39 dollar = strchr (name, '$');