From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp3-g21.free.fr (smtp3-g21.free.fr [212.27.42.3]) by mail.openembedded.org (Postfix) with ESMTP id EEE286A463 for ; Thu, 17 Oct 2013 21:03:29 +0000 (UTC) Received: from localhost.localdomain (unknown [82.233.81.124]) by smtp3-g21.free.fr (Postfix) with ESMTP id F261EA632B; Thu, 17 Oct 2013 23:03:24 +0200 (CEST) From: =?UTF-8?q?Eric=20B=C3=A9nard?= To: ross.burton@intel.com Date: Thu, 17 Oct 2013 23:03:20 +0200 Message-Id: <1382043802-9245-1-git-send-email-eric@eukrea.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Cc: openembedded-core@lists.openembedded.org Subject: [PATCH for danny - v2 1/3] gcc: fix compilation with 4.8 host X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Oct 2013 21:03:31 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Eric Bénard --- 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 + +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 + + PR middle-end/54638 + Backport from mainline + 2012-04-19 Richard Guenther + + * 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