c2a39ba528
https://sourceware.org/ml/gdb-announce/2018/msg00001.html gdb 8.1 has a new optional dependency on mpfr, which according to the NEWS file: GDB now uses the GNU MPFR library, if available, to emulate target floating-point arithmetic during expression evaluation when the target uses different floating-point formats than the host. At least version 3.1 of GNU MPFR is required. So for the target gdb, this is unnecessary, and therefore we forcefully disable mpfr support by passing --without-mpfr. For the host gdb, it would potentially be useful, but since it's a new feature that isn't essential, we for now keep it disabled as well. An option may be added later if needed. To avoid gnulib issues with uClibc/musl, we need to pass additional configure/make variables, like is done in OpenEmbedded [1]. [1] http://git.openembedded.org/openembedded-core/tree/meta/recipes-devtools/gdb/gdb_8.1.bb?id=02664a8dcd1ebb6cd77248e1b97a78390ea06033#n9 We re-add the same patches as the ones present for gdb 8.0.1, except 0004-nat-linux-ptrace.c-add-missing-gdb_byte-cast.patch, which was merged upstream. Signed-off-by: Romain Naour <romain.naour@gmail.com> [Thomas: change mpfr handling.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
63 lines
1.9 KiB
Diff
63 lines
1.9 KiB
Diff
From 80c60ea9fb3634272a98ec526eabff25f5255bae Mon Sep 17 00:00:00 2001
|
|
From: Romain Naour <romain.naour@gmail.com>
|
|
Date: Fri, 22 Jun 2018 22:40:26 +0200
|
|
Subject: [PATCH] gdbserver: fix build for m68k
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
As for strace [1], when <sys/reg.h> is included after <linux/ptrace.h>,
|
|
the build fails on m68k with the following diagnostics:
|
|
|
|
In file included from ./../nat/linux-ptrace.h:28:0,
|
|
from linux-low.h:27,
|
|
from linux-m68k-low.c:20:
|
|
[...]/usr/include/sys/reg.h:26:3: error: expected identifier before numeric constant
|
|
PT_D1 = 0,
|
|
^
|
|
[...]usr/include/sys/reg.h:26:3: error: expected « } » before numeric constant
|
|
[...]usr/include/sys/reg.h:26:3: error: expected unqualified-id before numeric constant
|
|
In file included from linux-m68k-low.c:27:0:
|
|
[...]usr/include/sys/reg.h:99:1: error: expected declaration before « } » token
|
|
};
|
|
^
|
|
|
|
Fix this by moving <sys/reg.h> on top of "linux-low.h".
|
|
|
|
[1] https://github.com/strace/strace/commit/6ebf6c4f9e5ebca123a5b5f24afe67cf0473cf92
|
|
|
|
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
|
---
|
|
gdb/gdbserver/linux-m68k-low.c | 9 +++++----
|
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/gdb/gdbserver/linux-m68k-low.c b/gdb/gdbserver/linux-m68k-low.c
|
|
index 5594f10f927..19b4ef7b259 100644
|
|
--- a/gdb/gdbserver/linux-m68k-low.c
|
|
+++ b/gdb/gdbserver/linux-m68k-low.c
|
|
@@ -17,16 +17,17 @@
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
|
|
|
#include "server.h"
|
|
+
|
|
+#ifdef HAVE_SYS_REG_H
|
|
+#include <sys/reg.h>
|
|
+#endif
|
|
+
|
|
#include "linux-low.h"
|
|
|
|
/* Defined in auto-generated file reg-m68k.c. */
|
|
void init_registers_m68k (void);
|
|
extern const struct target_desc *tdesc_m68k;
|
|
|
|
-#ifdef HAVE_SYS_REG_H
|
|
-#include <sys/reg.h>
|
|
-#endif
|
|
-
|
|
#define m68k_num_regs 29
|
|
#define m68k_num_gregs 18
|
|
|
|
--
|
|
2.14.4
|
|
|