5377f8de7a
The in-tree build restriction has been added after the move of gnulib to top level [1] [2]. This restriction has been added as a workaround a build issue with gdbserver that still uses its own copy of gnulib. gnulib is configured a second time if we build in-tree gdb and gdbserver: configure: error: source directory already configured; run "make distclean" there first configure: error: .././../../gnulib/configure failed for build-gnulib-gdbserver configure: error: ./configure failed for gdbserver Use the same pre-configure-hook as gcc package. Older gdb version support building out of tree even if it's not required. There is no in-tree build restriction of we only build gdbserver for the target. [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=73cc72729a184f00bf6fc4d74684a8516ba6b683 [2] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=043a0010933a6b55081535ecaf7fde9cc1491be0 See: https://sourceware.org/pipermail/gdb-announce/2020/000122.html https://sourceware.org/pipermail/gdb-announce/2020/000123.html Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru> [Romain: - add in-tree build support - improve commit log] Signed-off-by: Romain Naour <romain.naour@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
56 lines
1.4 KiB
Diff
56 lines
1.4 KiB
Diff
From 72ee19f54fd35595465b2e35eccf1f3d65fe21c6 Mon Sep 17 00:00:00 2001
|
|
From: Khem Raj <raj.khem@gmail.com>
|
|
Date: Sat, 6 Aug 2016 17:32:50 -0700
|
|
Subject: [PATCH] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems
|
|
|
|
Upstream-Status: Pending
|
|
|
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
[Rebase on gdb 8.3]
|
|
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
|
---
|
|
gdb/gdbserver/linux-ppc-low.c | 6 ++++++
|
|
gdb/nat/ppc-linux.h | 6 ++++++
|
|
2 files changed, 12 insertions(+)
|
|
|
|
diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
|
|
index 1b695e53fe9..1978347c02c 100644
|
|
--- a/gdb/gdbserver/linux-ppc-low.c
|
|
+++ b/gdb/gdbserver/linux-ppc-low.c
|
|
@@ -23,7 +23,13 @@
|
|
#include "elf/common.h"
|
|
#include <sys/uio.h>
|
|
#include <elf.h>
|
|
+#if !defined(__GLIBC__)
|
|
+# define pt_regs uapi_pt_regs
|
|
+#endif
|
|
#include <asm/ptrace.h>
|
|
+#if !defined(__GLIBC__)
|
|
+# undef pt_regs
|
|
+#endif
|
|
|
|
#include "arch/ppc-linux-common.h"
|
|
#include "arch/ppc-linux-tdesc.h"
|
|
diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
|
|
index f1561b3b357..40399361c09 100644
|
|
--- a/gdb/nat/ppc-linux.h
|
|
+++ b/gdb/nat/ppc-linux.h
|
|
@@ -18,7 +18,13 @@
|
|
#ifndef NAT_PPC_LINUX_H
|
|
#define NAT_PPC_LINUX_H
|
|
|
|
+#if !defined(__GLIBC__)
|
|
+# define pt_regs uapi_pt_regs
|
|
+#endif
|
|
#include <asm/ptrace.h>
|
|
+#if !defined(__GLIBC__)
|
|
+# undef pt_regs
|
|
+#endif
|
|
#include <asm/cputable.h>
|
|
|
|
/* This sometimes isn't defined. */
|
|
--
|
|
2.21.0
|
|
|