Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Eric Bénard" <eric@eukrea.com>
To: ross.burton@intel.com
Cc: openembedded-core@lists.openembedded.org
Subject: [PATCH for danny - v2 1/3] gcc: fix compilation with 4.8 host
Date: Thu, 17 Oct 2013 23:03:20 +0200	[thread overview]
Message-ID: <1382043802-9245-1-git-send-email-eric@eukrea.com> (raw)

Signed-off-by: Eric Bénard <eric@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@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@suse.de>
+
+	PR middle-end/54638
+	Backport from mainline
+	2012-04-19  Richard Guenther  <rguenther@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



             reply	other threads:[~2013-10-17 21:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-17 21:03 Eric Bénard [this message]
2013-10-17 21:03 ` [PATCH for danny - v2 2/3] openssl: fix documentation build errors with Perl 5.18 pod2man Eric Bénard
2013-10-17 21:03 ` [PATCH for danny - v2 3/3] elfutils-native: Fix build on distros with gcc 4.8 Eric Bénard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1382043802-9245-1-git-send-email-eric@eukrea.com \
    --to=eric@eukrea.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=ross.burton@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox