Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: Holger Hans Peter Freyther <holger@moiji-mobile.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] gcc: Include patch scheduled for GCC 4.8.3 to fix epilogue on ARM
Date: Fri, 31 Jan 2014 18:26:33 +0100	[thread overview]
Message-ID: <20140131172633.GV3718@jama> (raw)
In-Reply-To: <1391161517-25628-1-git-send-email-holger@moiji-mobile.com>

[-- Attachment #1: Type: text/plain, Size: 3417 bytes --]

On Fri, Jan 31, 2014 at 10:45:17AM +0100, Holger Hans Peter Freyther wrote:
> GCC 4.8.0, 4.8.1 and 4.8.2 can generate broken epilogues for the
> ABI used by the kernel. Apply the patch that is included for GCC
> 4.8.3 from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58854.
> 
> The issue was found on Yocto/Dora and the patch should be backported
> to this branch. A kernel built with Dora's GCC 4.8.1 misbehaved on:
> 
>  while true;
>  do
>     (for i in `seq 1 100`;
>         do
>             echo "Log message... $RANDOM";
>         done) | logger;
>  done
> 
> busybox's syslogd would from time to read a huge negative value and
> then exit, strace would get stuck waiting on a syscall. After this
> patch it appears to work better.
> 
> Signed-off-by: Holger Hans Peter Freyther <holger@moiji-mobile.com>
> ---
>  meta/recipes-devtools/gcc/gcc-4.8.inc              |  1 +
>  .../0048-PR58854_fix_arm_apcs_epilogue.patch       | 23 ++++++++++++++++++++++
>  2 files changed, 24 insertions(+)
>  create mode 100644 meta/recipes-devtools/gcc/gcc-4.8/0048-PR58854_fix_arm_apcs_epilogue.patch
> 
> diff --git a/meta/recipes-devtools/gcc/gcc-4.8.inc b/meta/recipes-devtools/gcc/gcc-4.8.inc
> index a140573..fdd0c12 100644
> --- a/meta/recipes-devtools/gcc/gcc-4.8.inc
> +++ b/meta/recipes-devtools/gcc/gcc-4.8.inc
> @@ -68,6 +68,7 @@ SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
>  	   file://0045-gcc-4.8-PR57717-PowerPC-E500v2.patch \
>  	   file://0046-libatomic-deptracking.patch \
>  	   file://0047-repomembug.patch \
> +	   file://0048-PR58854_fix_arm_apcs_epilogue.patch \

You're not the first in this file, but please don't mix tabs and spaces
for indentation.

>  	  "
>  SRC_URI[md5sum] = "a3d7d63b9cb6b6ea049469a0c4a43c9d"
>  SRC_URI[sha256sum] = "09dc2276c73424bbbfda1dbddc62bbbf900c9f185acf7f3e1d773ce2d7e3cdc8"
> diff --git a/meta/recipes-devtools/gcc/gcc-4.8/0048-PR58854_fix_arm_apcs_epilogue.patch b/meta/recipes-devtools/gcc/gcc-4.8/0048-PR58854_fix_arm_apcs_epilogue.patch
> new file mode 100644
> index 0000000..0ef245a
> --- /dev/null
> +++ b/meta/recipes-devtools/gcc/gcc-4.8/0048-PR58854_fix_arm_apcs_epilogue.patch
> @@ -0,0 +1,23 @@
> +Backport fix for PR target/58854
> +
> +2013-11-11  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
> +
> +       Backported from mainline
> +        2013-10-30  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
> +
> +       PR target/58854
> +       * config/arm/arm.c (arm_expand_epilogue_apcs_frame): Emit blockage
> +
> +
> +Upstream-Status: Backport
> +
> +--- gcc-4_8-branch/gcc/config/arm/arm.c	2013/11/11 08:00:45	204664
> ++++ gcc-4_8-branch/gcc/config/arm/arm.c	2013/11/11 09:38:14	204665
> +@@ -23555,6 +23555,7 @@
> +   num_regs = bit_count (saved_regs_mask);
> +   if ((offsets->outgoing_args != (1 + num_regs)) || cfun->calls_alloca)
> +     {
> ++      emit_insn (gen_blockage ());
> +       /* Unwind the stack to just below the saved registers.  */
> +       emit_insn (gen_addsi3 (stack_pointer_rtx,
> +                              hard_frame_pointer_rtx,
> -- 
> 1.8.5.2
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

      reply	other threads:[~2014-01-31 17:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-31  9:45 [PATCH] gcc: Include patch scheduled for GCC 4.8.3 to fix epilogue on ARM Holger Hans Peter Freyther
2014-01-31 17:26 ` Martin Jansa [this message]

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=20140131172633.GV3718@jama \
    --to=martin.jansa@gmail.com \
    --cc=holger@moiji-mobile.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