From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 07/10] gdb: Backport a fix to build with gcc9
Date: Wed, 26 Dec 2018 12:09:51 -0800 [thread overview]
Message-ID: <20181226200954.5267-7-raj.khem@gmail.com> (raw)
In-Reply-To: <20181226200954.5267-1-raj.khem@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
meta/recipes-devtools/gdb/gdb-8.2.inc | 1 +
...1-Fix-build-with-latest-GCC-9.0-tree.patch | 50 +++++++++++++++++++
2 files changed, 51 insertions(+)
create mode 100644 meta/recipes-devtools/gdb/gdb/0001-Fix-build-with-latest-GCC-9.0-tree.patch
diff --git a/meta/recipes-devtools/gdb/gdb-8.2.inc b/meta/recipes-devtools/gdb/gdb-8.2.inc
index 7e0809de72..f6d75ed081 100644
--- a/meta/recipes-devtools/gdb/gdb-8.2.inc
+++ b/meta/recipes-devtools/gdb/gdb-8.2.inc
@@ -16,6 +16,7 @@ SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \
file://0010-resolve-restrict-keyword-conflict.patch \
file://0011-Fix-invalid-sigprocmask-call.patch \
file://gdbserver-ctrl-c-handling.patch \
+ file://0001-Fix-build-with-latest-GCC-9.0-tree.patch \
"
SRC_URI[md5sum] = "b5a49dbff00d9a87fbe114d14b3101c0"
SRC_URI[sha256sum] = "c3a441a29c7c89720b734e5a9c6289c0a06be7e0c76ef538f7bbcef389347c39"
diff --git a/meta/recipes-devtools/gdb/gdb/0001-Fix-build-with-latest-GCC-9.0-tree.patch b/meta/recipes-devtools/gdb/gdb/0001-Fix-build-with-latest-GCC-9.0-tree.patch
new file mode 100644
index 0000000000..2a962929d7
--- /dev/null
+++ b/meta/recipes-devtools/gdb/gdb/0001-Fix-build-with-latest-GCC-9.0-tree.patch
@@ -0,0 +1,50 @@
+From 7406a50077773e78282a495cb32ef5b8179f6a33 Mon Sep 17 00:00:00 2001
+From: Dimitar Dimitrov <dimitar@dinux.eu>
+Date: Mon, 17 Dec 2018 21:30:52 +0200
+Subject: [PATCH] Fix build with latest GCC 9.0 tree
+
+A recent patch [1] to fix a GCC PR [2] actually broke the GDB build.
+To fix, remove the stack pointer clobber. GCC will ignore the clobber
+marker, and will not save or restore the stack pointer.
+
+I ran "make check-gdb" on x86_64 to ensure there are no regressions.
+
+gdb/ChangeLog:
+
+2018-12-17 Dimitar Dimitrov <dimitar@dinux.eu>
+
+ * nat/linux-ptrace.c (linux_ptrace_test_ret_to_nx): Remove sp clobbers.
+
+[1] https://gcc.gnu.org/ml/gcc-patches/2018-12/msg00532.html
+[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52813
+
+Upstream-Status: Backport
+Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
+---
+ gdb/ChangeLog | 5 +++++
+ gdb/nat/linux-ptrace.c | 4 ++--
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c
+index d4c1b8f9fd..187cfeb9bc 100644
+--- a/gdb/nat/linux-ptrace.c
++++ b/gdb/nat/linux-ptrace.c
+@@ -161,14 +161,14 @@ linux_ptrace_test_ret_to_nx (void)
+ ".globl linux_ptrace_test_ret_to_nx_instr;"
+ "linux_ptrace_test_ret_to_nx_instr:"
+ "ret"
+- : : "r" (return_address) : "%esp", "memory");
++ : : "r" (return_address) : "memory");
+ #elif defined __x86_64__
+ asm volatile ("pushq %0;"
+ ".globl linux_ptrace_test_ret_to_nx_instr;"
+ "linux_ptrace_test_ret_to_nx_instr:"
+ "ret"
+ : : "r" ((uint64_t) (uintptr_t) return_address)
+- : "%rsp", "memory");
++ : "memory");
+ #else
+ # error "!__i386__ && !__x86_64__"
+ #endif
+--
+2.20.1
--
2.20.1
next prev 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 ` Khem Raj [this message]
2018-12-26 20:09 ` [PATCH 08/10] valgrind: Fix x86_64 build failure with gcc9 Khem Raj
2018-12-26 20:09 ` [PATCH 09/10] ffmpeg: Backport patch to fix build " 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-7-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