diff options
author | Josh Cartwright <josh.cartwright@ni.com> | 2013-05-01 16:07:12 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-22 17:14:01 +0100 |
commit | 950f2e453a2bd31764e99eb09154768e0c5049a4 (patch) | |
tree | 5a9a5d5772d752258687bf57c2c592a47299ec56 /meta/recipes-devtools | |
parent | 202658db64afc0758701f777a4ffa8c39705f32a (diff) | |
download | poky-950f2e453a2bd31764e99eb09154768e0c5049a4.tar.gz |
gcc-4.7: fix gcc ICE when building with gcc-4.8
Backport fix for internal compiler error when building gcc-4.7.2 with a
gcc-4.8.0 host gcc.
See upstream bug here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56308
(From OE-Core master rev: b1dc91969f9bb0c2a3a4336f5e9a2f57aabb9f78)
(From OE-Core rev: f5bdfab961f850490e669967fd68fc5de7f48f0d)
Signed-off-by: Josh Cartwright <josh.cartwright@ni.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.7.inc | 3 | ||||
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-4.7/avoid-oob-array-access.patch | 45 |
2 files changed, 47 insertions, 1 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.7.inc b/meta/recipes-devtools/gcc/gcc-4.7.inc index a05cac99cd..81c8f070ac 100644 --- a/meta/recipes-devtools/gcc/gcc-4.7.inc +++ b/meta/recipes-devtools/gcc/gcc-4.7.inc | |||
@@ -1,6 +1,6 @@ | |||
1 | require gcc-common.inc | 1 | require gcc-common.inc |
2 | 2 | ||
3 | PR = "r19" | 3 | PR = "r20" |
4 | 4 | ||
5 | # Third digit in PV should be incremented after a minor release | 5 | # Third digit in PV should be incremented after a minor release |
6 | # happens from this branch on gcc e.g. currently its 4.7.1 | 6 | # happens from this branch on gcc e.g. currently its 4.7.1 |
@@ -77,6 +77,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \ | |||
77 | file://use-ml-conf-files-from-B.patch \ | 77 | file://use-ml-conf-files-from-B.patch \ |
78 | file://wcast-qual-PR55383.patch \ | 78 | file://wcast-qual-PR55383.patch \ |
79 | file://disable-texinfo-5.patch \ | 79 | file://disable-texinfo-5.patch \ |
80 | file://avoid-oob-array-access.patch \ | ||
80 | " | 81 | " |
81 | SRC_URI[md5sum] = "cc308a0891e778cfda7a151ab8a6e762" | 82 | SRC_URI[md5sum] = "cc308a0891e778cfda7a151ab8a6e762" |
82 | SRC_URI[sha256sum] = "8a9283d7010fb9fe5ece3ca507e0af5c19412626384f8a5e9434251ae100b084" | 83 | SRC_URI[sha256sum] = "8a9283d7010fb9fe5ece3ca507e0af5c19412626384f8a5e9434251ae100b084" |
diff --git a/meta/recipes-devtools/gcc/gcc-4.7/avoid-oob-array-access.patch b/meta/recipes-devtools/gcc/gcc-4.7/avoid-oob-array-access.patch new file mode 100644 index 0000000000..4ba707d0b2 --- /dev/null +++ b/meta/recipes-devtools/gcc/gcc-4.7/avoid-oob-array-access.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56308 | ||
4 | |||
5 | From 1e37e371d2cca3549b71a247bf79778aa1a9e1c4 Mon Sep 17 00:00:00 2001 | ||
6 | From: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | ||
7 | Date: Fri, 21 Sep 2012 10:08:35 +0000 | ||
8 | Subject: [PATCH] 2012-09-21 Richard Guenther <rguenther@suse.de> | ||
9 | |||
10 | PR middle-end/54638 | ||
11 | Backport from mainline | ||
12 | 2012-04-19 Richard Guenther <rguenther@suse.de> | ||
13 | |||
14 | * ira-int.h (ira_allocno_object_iter_cond): Avoid out-of-bound | ||
15 | array access. | ||
16 | |||
17 | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@191605 138bc75d-0d04-0410-961f-82ee72b054a4 | ||
18 | --- | ||
19 | gcc/ChangeLog | 9 +++++++++ | ||
20 | gcc/ira-int.h | 9 +++++++-- | ||
21 | 2 files changed, 16 insertions(+), 2 deletions(-) | ||
22 | |||
23 | diff --git a/gcc/ira-int.h b/gcc/ira-int.h | ||
24 | index 9faabb5..771a368 100644 | ||
25 | --- a/gcc/ira-int.h | ||
26 | +++ b/gcc/ira-int.h | ||
27 | @@ -1138,8 +1138,13 @@ static inline bool | ||
28 | ira_allocno_object_iter_cond (ira_allocno_object_iterator *i, ira_allocno_t a, | ||
29 | ira_object_t *o) | ||
30 | { | ||
31 | - *o = ALLOCNO_OBJECT (a, i->n); | ||
32 | - return i->n++ < ALLOCNO_NUM_OBJECTS (a); | ||
33 | + int n = i->n++; | ||
34 | + if (n < ALLOCNO_NUM_OBJECTS (a)) | ||
35 | + { | ||
36 | + *o = ALLOCNO_OBJECT (a, n); | ||
37 | + return true; | ||
38 | + } | ||
39 | + return false; | ||
40 | } | ||
41 | |||
42 | /* Loop over all objects associated with allocno A. In each | ||
43 | -- | ||
44 | 1.8.2.2 | ||
45 | |||