mirror of
https://git.busybox.net/buildroot.git
synced 2024-11-23 13:33:28 +08:00
package/strace: fix build for mips
Upstream changes in mips specific code of the last release broke build for that target. Add a patch that restores build. Fixes: http://autobuild.buildroot.net/results/858/8585e75df6462b6d07476a81982e88ec81655c8b/ http://autobuild.buildroot.net/results/b2f/b2f24976ddda1adc9b9ba3d9bfb7167721814f78/ http://autobuild.buildroot.net/results/031/0313245fe555e0c0890c3f475bf6586db23535ed/ Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
10f902368b
commit
4a8c6e6c08
68
package/strace/0002-Fix-build-for-mips-targets.patch
Normal file
68
package/strace/0002-Fix-build-for-mips-targets.patch
Normal file
@ -0,0 +1,68 @@
|
||||
From 8150854b5dd030a47f601931daf827ca33bc9bd9 Mon Sep 17 00:00:00 2001
|
||||
From: Baruch Siach <baruch@tkos.co.il>
|
||||
Date: Tue, 8 Jan 2019 19:52:21 +0200
|
||||
Subject: [PATCH] Fix build for mips targets
|
||||
|
||||
Commit 917c2ccf3a67 ("Refactor stack pointers") removed
|
||||
linux/mips/arch_regs.h that defines mips_REG_* macros and struct
|
||||
mips_regs. These symbols are referenced in mips code. Restore
|
||||
arch_regs.h to fix the build failure:
|
||||
|
||||
syscall.c: In function 'decode_syscall_subcall':
|
||||
syscall.c:370:7: error: 'mips_REG_SP' undeclared (first use in this function)
|
||||
mips_REG_SP + MAX_ARGS * sizeof(tcp->u_arg[0]),
|
||||
^~~~~~~~~~~
|
||||
|
||||
[ baruch: drop the Makefile.in hunk to avoid autoreconf ]
|
||||
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
|
||||
---
|
||||
Upstream status:
|
||||
https://lists.strace.io/pipermail/strace-devel/2019-January/008598.html
|
||||
|
||||
linux/mips/arch_regs.c | 4 +---
|
||||
linux/mips/arch_regs.h | 18 ++++++++++++++++++
|
||||
3 files changed, 20 insertions(+), 3 deletions(-)
|
||||
create mode 100644 linux/mips/arch_regs.h
|
||||
|
||||
diff --git a/linux/mips/arch_regs.c b/linux/mips/arch_regs.c
|
||||
index 0874e31efea4..3ed841ee7c1a 100644
|
||||
--- a/linux/mips/arch_regs.c
|
||||
+++ b/linux/mips/arch_regs.c
|
||||
@@ -5,9 +5,7 @@
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*/
|
||||
|
||||
-static struct {
|
||||
- uint64_t uregs[38];
|
||||
-} mips_regs;
|
||||
+struct mips_regs mips_regs; /* not static */
|
||||
|
||||
#define REG_V0 2
|
||||
#define REG_A0 4
|
||||
diff --git a/linux/mips/arch_regs.h b/linux/mips/arch_regs.h
|
||||
new file mode 100644
|
||||
index 000000000000..6372badce646
|
||||
--- /dev/null
|
||||
+++ b/linux/mips/arch_regs.h
|
||||
@@ -0,0 +1,18 @@
|
||||
+struct mips_regs {
|
||||
+ uint64_t uregs[38];
|
||||
+};
|
||||
+
|
||||
+extern struct mips_regs mips_regs;
|
||||
+
|
||||
+#define REG_V0 2
|
||||
+#define REG_A0 4
|
||||
+
|
||||
+#define mips_REG_V0 mips_regs.uregs[REG_V0]
|
||||
+#define mips_REG_A0 mips_regs.uregs[REG_A0 + 0]
|
||||
+#define mips_REG_A1 mips_regs.uregs[REG_A0 + 1]
|
||||
+#define mips_REG_A2 mips_regs.uregs[REG_A0 + 2]
|
||||
+#define mips_REG_A3 mips_regs.uregs[REG_A0 + 3]
|
||||
+#define mips_REG_A4 mips_regs.uregs[REG_A0 + 4]
|
||||
+#define mips_REG_A5 mips_regs.uregs[REG_A0 + 5]
|
||||
+#define mips_REG_SP mips_regs.uregs[29]
|
||||
+#define mips_REG_EPC mips_regs.uregs[34]
|
||||
--
|
||||
2.20.1
|
||||
|
Loading…
Reference in New Issue
Block a user