summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2011-06-01 17:50:22 -0700
committerSaul Wold <sgw@linux.intel.com>2011-06-02 16:00:21 -0700
commitb4a215bd94cf1508782e49b1a3f8c6b1f7effbb9 (patch)
treeceef220084dae8be2ff6c250b1e5afdb56bbad1e
parentea4a13a0d665e5637554b12ec222288bb1ab4871 (diff)
downloadpoky-1.1_M1.tar.gz
gcc: Fix volatile access issue for ARM1.1_M1.final1.1_M1
[YOCTO #1130] This patch brings in a patch from gcc for the following issue: http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01477.html (From OE-Core rev: 347c30801b6f935a6aefa5578d723a8afcf52790) Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0.inc4
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.6.0/volatile_access_backport.patch28
2 files changed, 31 insertions, 1 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0.inc b/meta/recipes-devtools/gcc/gcc-4.6.0.inc
index fb5c70db90..cb9eb8e703 100644
--- a/meta/recipes-devtools/gcc/gcc-4.6.0.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0.inc
@@ -7,7 +7,7 @@ require gcc-common.inc
7 7
8require gcc-4_6-branch-backports.inc 8require gcc-4_6-branch-backports.inc
9 9
10PR = "r2" 10PR = "r3"
11 11
12DEPENDS =+ "mpfr gmp libmpc" 12DEPENDS =+ "mpfr gmp libmpc"
13NATIVEDEPS = "mpfr-native gmp-native gettext-native libmpc-native" 13NATIVEDEPS = "mpfr-native gmp-native gettext-native libmpc-native"
@@ -53,7 +53,9 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
53 file://gcc-poison-parameters.patch \ 53 file://gcc-poison-parameters.patch \
54 file://GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch \ 54 file://GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch \
55 file://COLLECT_GCC_OPTIONS.patch \ 55 file://COLLECT_GCC_OPTIONS.patch \
56 file://volatile_access_backport.patch \
56 " 57 "
58
57SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 " 59SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
58 60
59SRC_URI[md5sum] = "93d1c436bf991564524701259b6285a2" 61SRC_URI[md5sum] = "93d1c436bf991564524701259b6285a2"
diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0/volatile_access_backport.patch b/meta/recipes-devtools/gcc/gcc-4.6.0/volatile_access_backport.patch
new file mode 100644
index 0000000000..9c8681728d
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/volatile_access_backport.patch
@@ -0,0 +1,28 @@
1Pulled from http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01477.html
2
3Upstream-Status: Backport
4
5Signed-off-by: Saul Wold <sgw@linux.intel.com>
6
7 gcc/
8 * expr.c (expand_expr_real_1): Only use BLKmode for volatile
9 accesses which are not naturally aligned.
10
11Index: gcc-4.6.0/gcc/expr.c
12===================================================================
13--- gcc-4.6.0.orig/gcc/expr.c 2011-06-01 15:28:55.000000000 -0700
14+++ gcc-4.6.0/gcc/expr.c 2011-06-01 15:41:17.154848182 -0700
15@@ -9178,8 +9178,11 @@
16 && modifier != EXPAND_CONST_ADDRESS
17 && modifier != EXPAND_INITIALIZER)
18 /* If the field is volatile, we always want an aligned
19- access. */
20- || (volatilep && flag_strict_volatile_bitfields > 0)
21+ access. Only do this if the access is not already naturally
22+ aligned, otherwise "normal" (non-bitfield) volatile fields
23+ become non-addressable. */
24+ || (volatilep && flag_strict_volatile_bitfields > 0
25+ && (bitpos % GET_MODE_ALIGNMENT (mode) != 0))
26 /* If the field isn't aligned enough to fetch as a memref,
27 fetch it as a bit field. */
28 || (mode1 != BLKmode