gcc: Fix volatile access issue for ARM
[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>
This commit is contained in:
parent
c51a6b5756
commit
83158a384f
|
@ -7,7 +7,7 @@ require gcc-common.inc
|
||||||
|
|
||||||
require gcc-4_6-branch-backports.inc
|
require gcc-4_6-branch-backports.inc
|
||||||
|
|
||||||
PR = "r2"
|
PR = "r3"
|
||||||
|
|
||||||
DEPENDS =+ "mpfr gmp libmpc"
|
DEPENDS =+ "mpfr gmp libmpc"
|
||||||
NATIVEDEPS = "mpfr-native gmp-native gettext-native libmpc-native"
|
NATIVEDEPS = "mpfr-native gmp-native gettext-native libmpc-native"
|
||||||
|
@ -53,7 +53,9 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
|
||||||
file://gcc-poison-parameters.patch \
|
file://gcc-poison-parameters.patch \
|
||||||
file://GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch \
|
file://GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch \
|
||||||
file://COLLECT_GCC_OPTIONS.patch \
|
file://COLLECT_GCC_OPTIONS.patch \
|
||||||
|
file://volatile_access_backport.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
|
SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
|
||||||
|
|
||||||
SRC_URI[md5sum] = "93d1c436bf991564524701259b6285a2"
|
SRC_URI[md5sum] = "93d1c436bf991564524701259b6285a2"
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
Pulled from http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01477.html
|
||||||
|
|
||||||
|
Upstream-Status: Backport
|
||||||
|
|
||||||
|
Signed-off-by: Saul Wold <sgw@linux.intel.com>
|
||||||
|
|
||||||
|
gcc/
|
||||||
|
* expr.c (expand_expr_real_1): Only use BLKmode for volatile
|
||||||
|
accesses which are not naturally aligned.
|
||||||
|
|
||||||
|
Index: gcc-4.6.0/gcc/expr.c
|
||||||
|
===================================================================
|
||||||
|
--- gcc-4.6.0.orig/gcc/expr.c 2011-06-01 15:28:55.000000000 -0700
|
||||||
|
+++ gcc-4.6.0/gcc/expr.c 2011-06-01 15:41:17.154848182 -0700
|
||||||
|
@@ -9178,8 +9178,11 @@
|
||||||
|
&& modifier != EXPAND_CONST_ADDRESS
|
||||||
|
&& modifier != EXPAND_INITIALIZER)
|
||||||
|
/* If the field is volatile, we always want an aligned
|
||||||
|
- access. */
|
||||||
|
- || (volatilep && flag_strict_volatile_bitfields > 0)
|
||||||
|
+ access. Only do this if the access is not already naturally
|
||||||
|
+ aligned, otherwise "normal" (non-bitfield) volatile fields
|
||||||
|
+ become non-addressable. */
|
||||||
|
+ || (volatilep && flag_strict_volatile_bitfields > 0
|
||||||
|
+ && (bitpos % GET_MODE_ALIGNMENT (mode) != 0))
|
||||||
|
/* If the field isn't aligned enough to fetch as a memref,
|
||||||
|
fetch it as a bit field. */
|
||||||
|
|| (mode1 != BLKmode
|
Loading…
Reference in New Issue