[OE-core] [PATCH for danny - v2 1/3] gcc: fix compilation with 4.8 host
Eric Bénard
eric at eukrea.com
Thu Oct 17 21:03:20 UTC 2013
Signed-off-by: Eric Bénard <eric at eukrea.com>
---
meta/recipes-devtools/gcc/gcc-4.7.inc | 1 +
.../gcc/gcc-4.7/gcc-fix-for-4.8-host.patch | 37 ++++++++++++++++++++++
2 files changed, 38 insertions(+)
create mode 100644 meta/recipes-devtools/gcc/gcc-4.7/gcc-fix-for-4.8-host.patch
diff --git a/meta/recipes-devtools/gcc/gcc-4.7.inc b/meta/recipes-devtools/gcc/gcc-4.7.inc
index c28823d..d333301 100644
--- a/meta/recipes-devtools/gcc/gcc-4.7.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.7.inc
@@ -75,6 +75,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://0001-crtstuff.c-USE_PT_GNU_EH_FRAME-Define-for-systems-us.patch \
file://0001-Makefile.in-vis_hide-gen-hide-list-Do-not-make-defin.patch \
file://disable-texinfo-5.patch \
+ file://gcc-fix-for-4.8-host.patch \
"
SRC_URI[md5sum] = "cc308a0891e778cfda7a151ab8a6e762"
SRC_URI[sha256sum] = "8a9283d7010fb9fe5ece3ca507e0af5c19412626384f8a5e9434251ae100b084"
diff --git a/meta/recipes-devtools/gcc/gcc-4.7/gcc-fix-for-4.8-host.patch b/meta/recipes-devtools/gcc/gcc-4.7/gcc-fix-for-4.8-host.patch
new file mode 100644
index 0000000..c688fe5
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.7/gcc-fix-for-4.8-host.patch
@@ -0,0 +1,37 @@
+Upstream-Status: Backport
+Signed-off-by: Eric Bénard <eric at eukrea.com>
+
+Details :
+http://gcc.gnu.org/@/bugzilla/show_bug.cgi?id=56927
+http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=191605
+
+branches/gcc-4_7-bichard Guenther <rguenther at suse.de>
+
+ PR middle-end/54638
+ Backport from mainline
+ 2012-04-19 Richard Guenther <rguenther at suse.de>
+
+ * ira-int.h (ira_allocno_object_iter_cond): Avoid out-of-bound
+ array access.
+
+---
+
+--- gcc-4_7-branch/gcc/ira-int.h 2012/09/21 10:08:35 191605
++++ gcc-4_7-branch/gcc/ira-int.h 2012/09/21 10:08:35 191605
+@@ -1138,8 +1138,13 @@
+ ira_allocno_object_iter_cond (ira_allocno_object_iterator *i, ira_allocno_t a,
+ ira_object_t *o)
+ {
+- *o = ALLOCNO_OBJECT (a, i->n);
+- return i->n++ < ALLOCNO_NUM_OBJECTS (a);
++ int n = i->n++;
++ if (n < ALLOCNO_NUM_OBJECTS (a))
++ {
++ *o = ALLOCNO_OBJECT (a, n);
++ return true;
++ }
++ return false;
+ }
+
+ /* Loop over all objects associated with allocno A. In each
+
--
1.8.3.1
More information about the Openembedded-core
mailing list