Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [CONSOLIDATED PULL 10/12] gcc: Fix volatile access issue for ARM
Date: Thu,  2 Jun 2011 01:05:09 -0700	[thread overview]
Message-ID: <edc9af5d6c8e0a0d3960b58c0983f5f382a477fb.1307001679.git.sgw@linux.intel.com> (raw)
In-Reply-To: <cover.1307001679.git.sgw@linux.intel.com>
In-Reply-To: <cover.1307001679.git.sgw@linux.intel.com>

[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

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/recipes-devtools/gcc/gcc-4.6.0.inc            |    4 ++-
 .../gcc/gcc-4.6.0/volatile_access_backport.patch   |   28 ++++++++++++++++++++
 2 files changed, 31 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/volatile_access_backport.patch

diff --git a/meta/recipes-devtools/gcc/gcc-4.6.0.inc b/meta/recipes-devtools/gcc/gcc-4.6.0.inc
index fb5c70d..cb9eb8e 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
 
 require gcc-4_6-branch-backports.inc
 
-PR = "r2"
+PR = "r3"
 
 DEPENDS =+ "mpfr gmp libmpc"
 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://GPLUSPLUS_INCLUDE_DIR_with_sysroot.patch \
 	   file://COLLECT_GCC_OPTIONS.patch \
+           file://volatile_access_backport.patch \
 	  "
+
 SRC_URI_append_sh3  = " file://sh3-installfix-fixheaders.patch;patch=1 "
 
 SRC_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 0000000..9c86817
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.6.0/volatile_access_backport.patch
@@ -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
-- 
1.7.3.4




  parent reply	other threads:[~2011-06-02  8:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-02  8:04 [CONSOLIDATED PULL 00/12] 2-June-2011 Saul Wold
2011-06-02  8:05 ` [CONSOLIDATED PULL 01/12] m4: upgrade from 1.4.15 to 1.4.16 Saul Wold
2011-06-02  8:05 ` [CONSOLIDATED PULL 02/12] autoconf: upgrade from 2.65 to 2.68 Saul Wold
2011-06-02  8:05 ` [CONSOLIDATED PULL 03/12] bison: upgrade from 2.4.3 to 2.5 Saul Wold
2011-06-02  8:05 ` [CONSOLIDATED PULL 04/12] gettext-0.16.1: mark upstream status for gplv2 recipe's patches Saul Wold
2011-06-02  8:05 ` [CONSOLIDATED PULL 05/12] u-boot: package up u-boot.bin for field upgrades Saul Wold
2011-06-02  8:05 ` [CONSOLIDATED PULL 06/12] shadow: remove selinux entry from pam.d/login Saul Wold
2011-06-02  8:05 ` [CONSOLIDATED PULL 07/12] rootfs_ipk: delete opkg metadata if package management not required and all packages are configured Saul Wold
2011-06-02  8:05 ` [CONSOLIDATED PULL 08/12] avahi: enable service when using systemd Saul Wold
2011-06-02  8:05 ` [CONSOLIDATED PULL 09/12] ghostscript: Fix up file locations and add i686 Saul Wold
2011-06-02  8:05 ` Saul Wold [this message]
2011-06-02  8:05 ` [CONSOLIDATED PULL 11/12] task-core-lsb: add cups and ghostscript into image Saul Wold
2011-06-02  8:05 ` [CONSOLIDATED PULL 12/12] libx11: fix libX11 keysyms to pass xts5 of lsb Saul Wold
2011-06-02 13:50 ` [CONSOLIDATED PULL 00/12] 2-June-2011 Richard Purdie
2011-06-02 14:57   ` Saul Wold
2011-06-02 15:03     ` Richard Purdie

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=edc9af5d6c8e0a0d3960b58c0983f5f382a477fb.1307001679.git.sgw@linux.intel.com \
    --to=sgw@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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