Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 08/10] valgrind: Fix x86_64 build failure with gcc9
Date: Wed, 26 Dec 2018 12:09:52 -0800	[thread overview]
Message-ID: <20181226200954.5267-8-raj.khem@gmail.com> (raw)
In-Reply-To: <20181226200954.5267-1-raj.khem@gmail.com>

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...ts-amd64-Do-not-clobber-rsp-register.patch | 37 +++++++++++++++++++
 .../valgrind/valgrind_3.14.0.bb               |  1 +
 2 files changed, 38 insertions(+)
 create mode 100644 meta/recipes-devtools/valgrind/valgrind/0001-tests-amd64-Do-not-clobber-rsp-register.patch

diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-tests-amd64-Do-not-clobber-rsp-register.patch b/meta/recipes-devtools/valgrind/valgrind/0001-tests-amd64-Do-not-clobber-rsp-register.patch
new file mode 100644
index 0000000000..657f80335d
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0001-tests-amd64-Do-not-clobber-rsp-register.patch
@@ -0,0 +1,37 @@
+From 8c1ebb564f5eca2baeedc27a703200786d1abb0b Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sat, 22 Dec 2018 15:28:40 -0800
+Subject: [PATCH] tests/amd64: Do not clobber %rsp register
+
+This is seen with gcc-9.0 compiler now which is fix that gcc community
+did recently
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52813
+
+Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=402480]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ none/tests/amd64-linux/bug345887.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/none/tests/amd64-linux/bug345887.c b/none/tests/amd64-linux/bug345887.c
+index 0f9237d..4b07fe1 100644
+--- a/none/tests/amd64-linux/bug345887.c
++++ b/none/tests/amd64-linux/bug345887.c
+@@ -20,13 +20,14 @@ static void inner(void)
+       "movq $0x10d, %%r14\n"
+       "movq $0x10e, %%r15\n"
+       // not %rbp as mdb is then not able to reconstruct stack trace
+-      "movq $0x10f, %%rsp\n"
++      // not %rsp since gcc ignores it and since gcc >= 9.0 errors about it
++      // see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52813
+       "movq $0x1234, (%%rax)\n"  // should cause SEGV here
+       "ud2"                      // should never get here
+       : // no output registers
+       : // no input registers
+       : "memory", "%rax", "%rbx", "%rcx", "%rdx", "%rsi", "%rdi",
+-        "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15", "%rsp");
++        "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15");
+ }
+ 
+ __attribute__((noinline))
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.14.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.14.0.bb
index 50f8221ebb..bbbc3bf695 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.14.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.14.0.bb
@@ -36,6 +36,7 @@ SRC_URI = "http://www.valgrind.org/downloads/valgrind-${PV}.tar.bz2 \
            file://0001-fix-opcode-not-supported-on-mips32-linux.patch \
            file://0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch \
            file://0001-Make-local-functions-static-to-avoid-assembler-error.patch \
+           file://0001-tests-amd64-Do-not-clobber-rsp-register.patch \
            "
 SRC_URI[md5sum] = "74175426afa280184b62591b58c671b3"
 SRC_URI[sha256sum] = "037c11bfefd477cc6e9ebe8f193bb237fe397f7ce791b4a4ce3fa1c6a520baa5"
-- 
2.20.1



  parent reply	other threads:[~2018-12-26 20:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-26 20:09 [PATCH 01/10] grub2: Fix passing null to printf formats Khem Raj
2018-12-26 20:09 ` [PATCH 02/10] gnupg: Upgrade to 2.2.12 release Khem Raj
2018-12-26 20:09 ` [PATCH 03/10] gnupg: Do not apply -Woverride-init guard for gcc >= 9 Khem Raj
2018-12-26 20:09 ` [PATCH 04/10] nfs-utils: Disable format-overflow as Werror Khem Raj
2018-12-26 20:09 ` [PATCH 05/10] musl: Update to latest master Khem Raj
2018-12-26 20:09 ` [PATCH 06/10] libxcrypt: Upgrade to 4.4.2 Khem Raj
2018-12-26 20:09 ` [PATCH 07/10] gdb: Backport a fix to build with gcc9 Khem Raj
2018-12-26 20:09 ` Khem Raj [this message]
2018-12-26 20:09 ` [PATCH 09/10] ffmpeg: Backport patch to fix " Khem Raj
2018-12-26 20:09 ` [PATCH 10/10] binutils: Upgrade to latest on 2.31 release branch Khem Raj

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=20181226200954.5267-8-raj.khem@gmail.com \
    --to=raj.khem@gmail.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