Bump buildroot to 2020.11-rc1 (#985)
* Update buildroot-patches for 2020.11-rc1 buildroot * Update buildroot to 2020.11-rc1 Signed-off-by: Stefan Agner <stefan@agner.ch> * Don't rely on sfdisk --list-free output The --list-free (-F) argument does not allow machine readable mode. And it seems that the output format changes over time (different spacing, using size postfixes instead of raw blocks). Use sfdisk json output and calculate free partition space ourselfs. This works for 2.35 and 2.36 and is more robust since we rely on output which is meant for scripts to parse. * Migrate defconfigs for Buildroot 2020.11-rc1 In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE). * Rebase/remove systemd patches for systemd 246 * Drop apparmor/libapparmor from buildroot-external * hassos-persists: use /run as directory for lockfiles The U-Boot tools use /var/lock by default which is not created any more by systemd by default (it is under tmpfiles legacy.conf, which we no longer install). * Disable systemd-update-done.service The service is not suited for pure read-only systems. In particular the service needs to be able to write a file in /etc and /var. Remove the service. Note: This is a static service and cannot be removed using systemd-preset. * Disable apparmor.service for now The service loads all default profiles. Some might actually cause problems. E.g. the profile for ping seems not to match our setup for /etc/resolv.conf: [85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
This commit is contained in:
@@ -1,172 +0,0 @@
|
||||
From 083849deeeec2854b2657b46380273ee13f4fa1b Mon Sep 17 00:00:00 2001
|
||||
From: Sergio Durigan Junior <sergiodj@redhat.com>
|
||||
Date: Wed, 12 Sep 2018 13:16:02 -0400
|
||||
Subject: [PATCH] Move 'is_regular_file' from common-utils.c to filestuff.c
|
||||
|
||||
There is no reason for 'is_regular_file' to be in common-utils.c; it
|
||||
belongs to 'filestuff.c'. This commit moves the function definition
|
||||
and its prototype to the appropriate files.
|
||||
|
||||
The motivation behind this move is a failure that happens on certain
|
||||
cross-compilation environments when compiling the IPA library, due to
|
||||
the way gnulib probes the need for a 'stat' call replacement. Because
|
||||
configure checks when cross-compiling are more limited, gnulib decides
|
||||
that it needs to substitute the 'stat' calls its own 'rpl_stat';
|
||||
however, the IPA library doesn't link with gnulib, which leads to an
|
||||
error when compiling 'common-utils.c':
|
||||
|
||||
...
|
||||
/opt/x86-core2--musl--bleeding-edge-2018.09-1/bin/i686-buildroot-linux-musl-g++ -shared -fPIC -Wl,--soname=libinproctrace.so -Wl,--no-undefined -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -I. -I. -I./../common -I./../regformats -I./.. -I./../../include -I./../gnulib/import -Ibuild-gnulib-gdbserver/import -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized -DGDBSERVER \
|
||||
-Wl,--dynamic-list=./proc-service.list -o libinproctrace.so ax-ipa.o common-utils-ipa.o errors-ipa.o format-ipa.o print-utils-ipa.o regcache-ipa.o remote-utils-ipa.o rsp-low-ipa.o tdesc-ipa.o tracepoint-ipa.o utils-ipa.o vec-ipa.o linux-i386-ipa.o linux-x86-tdesc-ipa.o arch/i386-ipa.o -ldl -pthread
|
||||
/opt/x86-core2--musl--bleeding-edge-2018.09-1/lib/gcc/i686-buildroot-linux-musl/8.2.0/../../../../i686-buildroot-linux-musl/bin/ld: common-utils-ipa.o: in function `is_regular_file(char const*, int*)':
|
||||
common-utils.c:(.text+0x695): undefined reference to `rpl_stat'
|
||||
collect2: error: ld returned 1 exit status
|
||||
Makefile:413: recipe for target 'libinproctrace.so' failed
|
||||
make[1]: *** [libinproctrace.so] Error 1
|
||||
...
|
||||
|
||||
More details can also be found at:
|
||||
|
||||
https://sourceware.org/ml/gdb-patches/2018-09/msg00304.html
|
||||
|
||||
The most simple fix for this problem is to move 'is_regular_file' to
|
||||
'filestuff.c', which is not used by IPA. This ends up making the
|
||||
files more logically organized as well, since 'is_regular_file' is a
|
||||
file operation.
|
||||
|
||||
No regressions found.
|
||||
|
||||
gdb/ChangeLog:
|
||||
2018-09-12 Sergio Durigan Junior <sergiodj@redhat.com>
|
||||
|
||||
* common/common-utils.c: Don't include '<sys/stat.h>'.
|
||||
(is_regular_file): Move to...
|
||||
* common/filestuff.c (is_regular_file): ... here.
|
||||
* common/common-utils.h (is_regular_file): Move to...
|
||||
* common/filestuff.h (is_regular_file): ... here.
|
||||
|
||||
(cherry picked from commit 3c025cfe5efc44eb4dfb03b53dca28e75096dd1e)
|
||||
[Romain: backport to gdb 8.1 and remove ChangeLog enty]
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
gdb/common/common-utils.c | 30 ------------------------------
|
||||
gdb/common/common-utils.h | 5 -----
|
||||
gdb/common/filestuff.c | 31 +++++++++++++++++++++++++++++++
|
||||
gdb/common/filestuff.h | 5 +++++
|
||||
4 files changed, 36 insertions(+), 35 deletions(-)
|
||||
|
||||
diff --git a/gdb/common/common-utils.c b/gdb/common/common-utils.c
|
||||
index 80de826ba78..90a06390141 100644
|
||||
--- a/gdb/common/common-utils.c
|
||||
+++ b/gdb/common/common-utils.c
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "common-defs.h"
|
||||
#include "common-utils.h"
|
||||
#include "host-defs.h"
|
||||
-#include <sys/stat.h>
|
||||
#include <ctype.h>
|
||||
|
||||
/* The xmalloc() (libiberty.h) family of memory management routines.
|
||||
@@ -411,32 +410,3 @@ stringify_argv (const std::vector<char *> &args)
|
||||
}
|
||||
|
||||
/* See common/common-utils.h. */
|
||||
-
|
||||
-bool
|
||||
-is_regular_file (const char *name, int *errno_ptr)
|
||||
-{
|
||||
- struct stat st;
|
||||
- const int status = stat (name, &st);
|
||||
-
|
||||
- /* Stat should never fail except when the file does not exist.
|
||||
- If stat fails, analyze the source of error and return true
|
||||
- unless the file does not exist, to avoid returning false results
|
||||
- on obscure systems where stat does not work as expected. */
|
||||
-
|
||||
- if (status != 0)
|
||||
- {
|
||||
- if (errno != ENOENT)
|
||||
- return true;
|
||||
- *errno_ptr = ENOENT;
|
||||
- return false;
|
||||
- }
|
||||
-
|
||||
- if (S_ISREG (st.st_mode))
|
||||
- return true;
|
||||
-
|
||||
- if (S_ISDIR (st.st_mode))
|
||||
- *errno_ptr = EISDIR;
|
||||
- else
|
||||
- *errno_ptr = EINVAL;
|
||||
- return false;
|
||||
-}
|
||||
diff --git a/gdb/common/common-utils.h b/gdb/common/common-utils.h
|
||||
index 5408c354693..2320318de74 100644
|
||||
--- a/gdb/common/common-utils.h
|
||||
+++ b/gdb/common/common-utils.h
|
||||
@@ -146,9 +146,4 @@ in_inclusive_range (T value, T low, T high)
|
||||
return value >= low && value <= high;
|
||||
}
|
||||
|
||||
-/* Return true if the file NAME exists and is a regular file.
|
||||
- If the result is false then *ERRNO_PTR is set to a useful value assuming
|
||||
- we're expecting a regular file. */
|
||||
-extern bool is_regular_file (const char *name, int *errno_ptr);
|
||||
-
|
||||
#endif
|
||||
diff --git a/gdb/common/filestuff.c b/gdb/common/filestuff.c
|
||||
index f5a754ffa66..fa10165a7ca 100644
|
||||
--- a/gdb/common/filestuff.c
|
||||
+++ b/gdb/common/filestuff.c
|
||||
@@ -417,3 +417,34 @@ make_cleanup_close (int fd)
|
||||
*saved_fd = fd;
|
||||
return make_cleanup_dtor (do_close_cleanup, saved_fd, xfree);
|
||||
}
|
||||
+
|
||||
+/* See common/filestuff.h. */
|
||||
+
|
||||
+bool
|
||||
+is_regular_file (const char *name, int *errno_ptr)
|
||||
+{
|
||||
+ struct stat st;
|
||||
+ const int status = stat (name, &st);
|
||||
+
|
||||
+ /* Stat should never fail except when the file does not exist.
|
||||
+ If stat fails, analyze the source of error and return true
|
||||
+ unless the file does not exist, to avoid returning false results
|
||||
+ on obscure systems where stat does not work as expected. */
|
||||
+
|
||||
+ if (status != 0)
|
||||
+ {
|
||||
+ if (errno != ENOENT)
|
||||
+ return true;
|
||||
+ *errno_ptr = ENOENT;
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ if (S_ISREG (st.st_mode))
|
||||
+ return true;
|
||||
+
|
||||
+ if (S_ISDIR (st.st_mode))
|
||||
+ *errno_ptr = EISDIR;
|
||||
+ else
|
||||
+ *errno_ptr = EINVAL;
|
||||
+ return false;
|
||||
+}
|
||||
diff --git a/gdb/common/filestuff.h b/gdb/common/filestuff.h
|
||||
index 92a2a5f4c70..cc6dd861379 100644
|
||||
--- a/gdb/common/filestuff.h
|
||||
+++ b/gdb/common/filestuff.h
|
||||
@@ -84,4 +84,9 @@ extern int gdb_pipe_cloexec (int filedes[2]);
|
||||
|
||||
extern struct cleanup *make_cleanup_close (int fd);
|
||||
|
||||
+/* Return true if the file NAME exists and is a regular file.
|
||||
+ If the result is false then *ERRNO_PTR is set to a useful value assuming
|
||||
+ we're expecting a regular file. */
|
||||
+extern bool is_regular_file (const char *name, int *errno_ptr);
|
||||
+
|
||||
#endif /* FILESTUFF_H */
|
||||
--
|
||||
2.14.4
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
From 5a6c3296a7a90694ad4042f6256f3da6d4fa4ee8 Mon Sep 17 00:00:00 2001
|
||||
From: James Clarke <jrtc27@jrtc27.com>
|
||||
Date: Fri, 19 Jan 2018 17:22:49 +0000
|
||||
Subject: [PATCH] gdb: Fix ia64 defining TRAP_HWBKPT before including
|
||||
gdb_wait.h
|
||||
|
||||
On ia64, gdb_wait.h eventually includes siginfo-consts-arch.h, which
|
||||
contains an enum with TRAP_HWBKPT, along with a #define. Thus we cannot
|
||||
define TRAP_HWBKPT to 4 beforehand, and so gdb_wait.h must be included
|
||||
earlier; include it from linux-ptrace.h so it can never come afterwards.
|
||||
|
||||
gdb/ChangeLog:
|
||||
|
||||
* nat/linux-ptrace.c: Remove unnecessary reinclusion of
|
||||
gdb_ptrace.h, and move including gdb_wait.h ...
|
||||
* nat/linux-ptrace.h: ... to here.
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Retrieved (and updated to remove ChangeLog update) from:
|
||||
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5a6c3296a7a90694ad4042f6256f3da6d4fa4ee8]
|
||||
---
|
||||
gdb/ChangeLog | 6 ++++++
|
||||
gdb/nat/linux-ptrace.c | 2 --
|
||||
gdb/nat/linux-ptrace.h | 1 +
|
||||
3 files changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c
|
||||
index 5c4ddc9..1f21ef0 100644
|
||||
--- a/gdb/nat/linux-ptrace.c
|
||||
+++ b/gdb/nat/linux-ptrace.c
|
||||
@@ -21,8 +21,6 @@
|
||||
#include "linux-procfs.h"
|
||||
#include "linux-waitpid.h"
|
||||
#include "buffer.h"
|
||||
-#include "gdb_wait.h"
|
||||
-#include "gdb_ptrace.h"
|
||||
#ifdef HAVE_SYS_PROCFS_H
|
||||
#include <sys/procfs.h>
|
||||
#endif
|
||||
diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h
|
||||
index 60967a3..dc180fb 100644
|
||||
--- a/gdb/nat/linux-ptrace.h
|
||||
+++ b/gdb/nat/linux-ptrace.h
|
||||
@@ -21,6 +21,7 @@
|
||||
struct buffer;
|
||||
|
||||
#include "nat/gdb_ptrace.h"
|
||||
+#include "gdb_wait.h"
|
||||
|
||||
#ifdef __UCLIBC__
|
||||
#if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__))
|
||||
--
|
||||
2.9.3
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
From e00c211d51bec301cf04719b77076a8783ef44b5 Mon Sep 17 00:00:00 2001
|
||||
From: Raul Tambre <raul@tambre.ee>
|
||||
Date: Sat, 4 May 2019 15:48:17 -0400
|
||||
Subject: [PATCH] Fix incorrect use of 'is' operator for comparison in
|
||||
python/lib/gdb/command/prompt.py
|
||||
|
||||
The 'is' operator is not meant to be used for comparisons. It currently working
|
||||
is an implementation detail of CPython. CPython 3.8 has added a SyntaxWarning
|
||||
for this.
|
||||
|
||||
(cherry picked from commit b6484282f85bf7f11451b2441599c241d302ad9d)
|
||||
[Romain: backport to gdb 8.x]
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
gdb/python/lib/gdb/command/prompt.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gdb/python/lib/gdb/command/prompt.py b/gdb/python/lib/gdb/command/prompt.py
|
||||
index 3d662a7d3f..04b9e49c22 100644
|
||||
--- a/gdb/python/lib/gdb/command/prompt.py
|
||||
+++ b/gdb/python/lib/gdb/command/prompt.py
|
||||
@@ -45,7 +45,7 @@ The currently defined substitutions are:
|
||||
self.hook_set = False
|
||||
|
||||
def get_show_string (self, pvalue):
|
||||
- if self.value is not '':
|
||||
+ if self.value:
|
||||
return "The extended prompt is: " + self.value
|
||||
else:
|
||||
return "The extended prompt is not set."
|
||||
@@ -57,7 +57,7 @@ The currently defined substitutions are:
|
||||
return ""
|
||||
|
||||
def before_prompt_hook(self, current):
|
||||
- if self.value is not '':
|
||||
+ if self.value:
|
||||
return gdb.prompt.substitute_prompt(self.value)
|
||||
else:
|
||||
return None
|
||||
--
|
||||
2.25.4
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
From e00c211d51bec301cf04719b77076a8783ef44b5 Mon Sep 17 00:00:00 2001
|
||||
From: Raul Tambre <raul@tambre.ee>
|
||||
Date: Sat, 4 May 2019 15:48:17 -0400
|
||||
Subject: [PATCH] Fix incorrect use of 'is' operator for comparison in
|
||||
python/lib/gdb/command/prompt.py
|
||||
|
||||
The 'is' operator is not meant to be used for comparisons. It currently working
|
||||
is an implementation detail of CPython. CPython 3.8 has added a SyntaxWarning
|
||||
for this.
|
||||
|
||||
(cherry picked from commit b6484282f85bf7f11451b2441599c241d302ad9d)
|
||||
[Romain: backport to gdb 8.x]
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
gdb/python/lib/gdb/command/prompt.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/gdb/python/lib/gdb/command/prompt.py b/gdb/python/lib/gdb/command/prompt.py
|
||||
index 3d662a7d3f..04b9e49c22 100644
|
||||
--- a/gdb/python/lib/gdb/command/prompt.py
|
||||
+++ b/gdb/python/lib/gdb/command/prompt.py
|
||||
@@ -45,7 +45,7 @@ The currently defined substitutions are:
|
||||
self.hook_set = False
|
||||
|
||||
def get_show_string (self, pvalue):
|
||||
- if self.value is not '':
|
||||
+ if self.value:
|
||||
return "The extended prompt is: " + self.value
|
||||
else:
|
||||
return "The extended prompt is not set."
|
||||
@@ -57,7 +57,7 @@ The currently defined substitutions are:
|
||||
return ""
|
||||
|
||||
def before_prompt_hook(self, current):
|
||||
- if self.value is not '':
|
||||
+ if self.value:
|
||||
return gdb.prompt.substitute_prompt(self.value)
|
||||
else:
|
||||
return None
|
||||
--
|
||||
2.25.4
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 2acd9d3eb703b9a64ac92b3880ed546bec92af95 Mon Sep 17 00:00:00 2001
|
||||
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
|
||||
@@ -7,7 +7,7 @@ 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.0]
|
||||
[Rebase on gdb 8.3]
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
gdb/gdbserver/linux-ppc-low.c | 6 ++++++
|
||||
@@ -15,12 +15,12 @@ Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
2 files changed, 12 insertions(+)
|
||||
|
||||
diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
|
||||
index 33a9feb..1a9141f 100644
|
||||
index 1b695e53fe9..1978347c02c 100644
|
||||
--- a/gdb/gdbserver/linux-ppc-low.c
|
||||
+++ b/gdb/gdbserver/linux-ppc-low.c
|
||||
@@ -21,7 +21,13 @@
|
||||
#include "linux-low.h"
|
||||
|
||||
@@ -23,7 +23,13 @@
|
||||
#include "elf/common.h"
|
||||
#include <sys/uio.h>
|
||||
#include <elf.h>
|
||||
+#if !defined(__GLIBC__)
|
||||
+# define pt_regs uapi_pt_regs
|
||||
@@ -30,15 +30,15 @@ index 33a9feb..1a9141f 100644
|
||||
+# undef pt_regs
|
||||
+#endif
|
||||
|
||||
#include "nat/ppc-linux.h"
|
||||
#include "linux-ppc-tdesc.h"
|
||||
#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 5837ea1..7233929 100644
|
||||
index f1561b3b357..40399361c09 100644
|
||||
--- a/gdb/nat/ppc-linux.h
|
||||
+++ b/gdb/nat/ppc-linux.h
|
||||
@@ -18,7 +18,13 @@
|
||||
#ifndef PPC_LINUX_H
|
||||
#define PPC_LINUX_H 1
|
||||
#ifndef NAT_PPC_LINUX_H
|
||||
#define NAT_PPC_LINUX_H
|
||||
|
||||
+#if !defined(__GLIBC__)
|
||||
+# define pt_regs uapi_pt_regs
|
||||
@@ -51,5 +51,5 @@ index 5837ea1..7233929 100644
|
||||
|
||||
/* This sometimes isn't defined. */
|
||||
--
|
||||
2.9.4
|
||||
2.21.0
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
From dfe4a40bc9d2fc1fd1b1a11ed733a0c0a1f59f3c Mon Sep 17 00:00:00 2001
|
||||
From ef630288fdc2d4d22651702672f9d5c9cd767e5b Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Date: Sat, 3 Jun 2017 21:23:52 +0200
|
||||
Subject: [PATCH] sh/ptrace: Define pt_{dsp,}regs uapi_pt_{dsp,}regs on
|
||||
!GLIBC systems
|
||||
Subject: [PATCH] sh/ptrace: Define pt_{dsp,}regs uapi_pt_{dsp,}regs on !GLIBC
|
||||
systems
|
||||
|
||||
Fixes a pt_{dsp,}regs redefinition when building with the musl C library
|
||||
on SuperH.
|
||||
@@ -19,7 +19,7 @@ Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/gdb/gdbserver/linux-sh-low.c b/gdb/gdbserver/linux-sh-low.c
|
||||
index ac084c9..08e104a 100644
|
||||
index 0953721a190..c331c1382f7 100644
|
||||
--- a/gdb/gdbserver/linux-sh-low.c
|
||||
+++ b/gdb/gdbserver/linux-sh-low.c
|
||||
@@ -27,7 +27,15 @@ extern const struct target_desc *tdesc_sh;
|
||||
@@ -39,5 +39,5 @@ index ac084c9..08e104a 100644
|
||||
#define sh_num_regs 41
|
||||
|
||||
--
|
||||
2.9.4
|
||||
2.21.0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 12a0b8d81e1fda6ba98abdce8d6f09f9555ebcf5 Mon Sep 17 00:00:00 2001
|
||||
From 19a0f664809b6858e69aa98188eb739415de044c Mon Sep 17 00:00:00 2001
|
||||
From: Andre McCurdy <amccurdy@gmail.com>
|
||||
Date: Sat, 30 Apr 2016 15:29:06 -0700
|
||||
Subject: [PATCH] use <asm/sgidefs.h>
|
||||
@@ -23,7 +23,7 @@ Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c
|
||||
index f2df1b9907..d24664cb56 100644
|
||||
index e68ed1e4da9..bc42aa59685 100644
|
||||
--- a/gdb/mips-linux-nat.c
|
||||
+++ b/gdb/mips-linux-nat.c
|
||||
@@ -31,7 +31,7 @@
|
||||
@@ -36,5 +36,5 @@ index f2df1b9907..d24664cb56 100644
|
||||
#include <asm/ptrace.h>
|
||||
#include "inf-ptrace.h"
|
||||
--
|
||||
2.13.1
|
||||
2.21.0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 80c60ea9fb3634272a98ec526eabff25f5255bae Mon Sep 17 00:00:00 2001
|
||||
From 448e481aab86c823d908530038e20a14213db0a2 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
|
||||
@@ -32,7 +32,7 @@ Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
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
|
||||
index 16f639d02fc..969d9973737 100644
|
||||
--- a/gdb/gdbserver/linux-m68k-low.c
|
||||
+++ b/gdb/gdbserver/linux-m68k-low.c
|
||||
@@ -17,16 +17,17 @@
|
||||
@@ -58,5 +58,5 @@ index 5594f10f927..19b4ef7b259 100644
|
||||
#define m68k_num_gregs 18
|
||||
|
||||
--
|
||||
2.14.4
|
||||
2.21.0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
From 887c667089e5417fdc7c5bbb364b027e86a7c113 Mon Sep 17 00:00:00 2001
|
||||
From d84ecfa3a8c8fbade89229ac66c09f2a97ab00fb Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
Date: Sun, 24 Jun 2018 23:33:55 +0200
|
||||
Subject: [PATCH] nat/fork-inferior: include linux-ptrace.h
|
||||
@@ -30,22 +30,24 @@ Fixes the following build issue:
|
||||
vfork
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
[Romain: rebase on gdb 8.3]
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
gdb/nat/fork-inferior.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/gdb/nat/fork-inferior.c b/gdb/nat/fork-inferior.c
|
||||
index 8b59387fa5..05167628a6 100644
|
||||
index fe9360a5039..626fe7c1fbf 100644
|
||||
--- a/gdb/nat/fork-inferior.c
|
||||
+++ b/gdb/nat/fork-inferior.c
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "common-gdbthread.h"
|
||||
#include "signals-state-save-restore.h"
|
||||
#include "gdb_tilde_expand.h"
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "gdbsupport/pathstuff.h"
|
||||
#include "gdbsupport/signals-state-save-restore.h"
|
||||
#include "gdbsupport/gdb_tilde_expand.h"
|
||||
+#include "linux-ptrace.h"
|
||||
#include <vector>
|
||||
|
||||
extern char **environ;
|
||||
--
|
||||
2.14.4
|
||||
2.21.0
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
From ad8464f799a4c96c7ab8bdfec3f95846cf54f9b0 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||
Date: Wed, 1 Jul 2020 19:29:55 +0200
|
||||
Subject: [PATCH] sim/ppc: Fix linker error with -fno-common
|
||||
|
||||
GCC 10 enables -fno-common by default. This resulted in a multiple
|
||||
definition linker error since global variables were declared and defined
|
||||
in a header file:
|
||||
|
||||
ld: ld-insn.o:sim/ppc/ld-insn.h:221: multiple definition of
|
||||
`max_model_fields_len'; igen.o:sim/ppc/ld-insn.h:221: first defined here
|
||||
|
||||
sim/ppc
|
||||
|
||||
* ld-insn.h (last_model, last_model_data, last_model_function,
|
||||
last_model_internal, last_model_macro, last_model_static):
|
||||
Delete.
|
||||
(max_model_fields_len, model_data, model_functions,
|
||||
model_internal, model_macros, model_static, models): Declare, but do not
|
||||
define.
|
||||
* ld-insn.c (last_model, last_model_data, last_model_function,
|
||||
last_model_internal, last_model_macro, last_model_static,
|
||||
max_model_fields_len, model_data, model_functions,
|
||||
model_internal, model_macros, model_static, models): Define.
|
||||
|
||||
Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
|
||||
Fetch from: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=ad8464f799a4c96c7ab8bdfec3f95846cf54f9b0
|
||||
---
|
||||
sim/ppc/ld-insn.c | 18 ++++++++++++++++++
|
||||
sim/ppc/ld-insn.h | 24 +++++++-----------------
|
||||
2 files changed, 25 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/sim/ppc/ld-insn.c b/sim/ppc/ld-insn.c
|
||||
index e39131ca133..585071a861f 100644
|
||||
--- a/sim/ppc/ld-insn.c
|
||||
+++ b/sim/ppc/ld-insn.c
|
||||
@@ -28,6 +28,24 @@
|
||||
|
||||
#include "igen.h"
|
||||
|
||||
+static model *last_model;
|
||||
+
|
||||
+static insn *last_model_macro;
|
||||
+static insn *last_model_function;
|
||||
+static insn *last_model_internal;
|
||||
+static insn *last_model_static;
|
||||
+static insn *last_model_data;
|
||||
+
|
||||
+model *models;
|
||||
+
|
||||
+insn *model_macros;
|
||||
+insn *model_functions;
|
||||
+insn *model_internal;
|
||||
+insn *model_static;
|
||||
+insn *model_data;
|
||||
+
|
||||
+int max_model_fields_len;
|
||||
+
|
||||
static void
|
||||
update_depth(insn_table *entry,
|
||||
lf *file,
|
||||
diff --git a/sim/ppc/ld-insn.h b/sim/ppc/ld-insn.h
|
||||
index 88318ffa2b3..52baeaa2d84 100644
|
||||
--- a/sim/ppc/ld-insn.h
|
||||
+++ b/sim/ppc/ld-insn.h
|
||||
@@ -200,25 +200,15 @@ extern insn_table *load_insn_table
|
||||
table_include *includes,
|
||||
cache_table **cache_rules);
|
||||
|
||||
-model *models;
|
||||
-model *last_model;
|
||||
+extern model *models;
|
||||
|
||||
-insn *model_macros;
|
||||
-insn *last_model_macro;
|
||||
+extern insn *model_macros;
|
||||
+extern insn *model_functions;
|
||||
+extern insn *model_internal;
|
||||
+extern insn *model_static;
|
||||
+extern insn *model_data;
|
||||
|
||||
-insn *model_functions;
|
||||
-insn *last_model_function;
|
||||
-
|
||||
-insn *model_internal;
|
||||
-insn *last_model_internal;
|
||||
-
|
||||
-insn *model_static;
|
||||
-insn *last_model_static;
|
||||
-
|
||||
-insn *model_data;
|
||||
-insn *last_model_data;
|
||||
-
|
||||
-int max_model_fields_len;
|
||||
+extern int max_model_fields_len;
|
||||
|
||||
extern void insn_table_insert_insn
|
||||
(insn_table *table,
|
||||
--
|
||||
2.18.4
|
||||
|
||||
@@ -49,11 +49,6 @@ config BR2_PACKAGE_GDB_SERVER
|
||||
bool "gdbserver"
|
||||
depends on !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY
|
||||
depends on !BR2_riscv
|
||||
# Simultaneous build of gdbserver and full gdb is not possible
|
||||
# with arc-2019.09. This bug comes from upstream GDB. So
|
||||
# simultaneous usage of full gdb and gdbserver is temporaly
|
||||
# disabled for ARC until a fix becomes available.
|
||||
depends on !(BR2_arc && BR2_PACKAGE_GDB_DEBUGGER)
|
||||
help
|
||||
Build the gdbserver stub to run on the target.
|
||||
A full gdb is needed to debug the progam.
|
||||
|
||||
@@ -32,10 +32,28 @@ config BR2_PACKAGE_HOST_GDB_TUI
|
||||
help
|
||||
This option enables terminal user interface (TUI) for gdb
|
||||
|
||||
config BR2_PACKAGE_HOST_GDB_PYTHON
|
||||
bool "Python support"
|
||||
choice
|
||||
prompt "Python support"
|
||||
default BR2_PACKAGE_HOST_GDB_NOPYTHON
|
||||
help
|
||||
This option enables the Python support in the cross gdb.
|
||||
Select the version of Python you wish to use
|
||||
|
||||
config BR2_PACKAGE_HOST_GDB_NOPYTHON
|
||||
bool "None"
|
||||
help
|
||||
This option disables Python support in the cross gdb.
|
||||
|
||||
config BR2_PACKAGE_HOST_GDB_PYTHON
|
||||
bool "Python 2"
|
||||
help
|
||||
This option enables the Python 2 support in the cross gdb.
|
||||
|
||||
config BR2_PACKAGE_HOST_GDB_PYTHON3
|
||||
bool "Python 3"
|
||||
help
|
||||
This option enables the Python 3 support in the cross gdb.
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_PACKAGE_HOST_GDB_SIM
|
||||
bool "Simulator support"
|
||||
@@ -45,21 +63,21 @@ config BR2_PACKAGE_HOST_GDB_SIM
|
||||
|
||||
choice
|
||||
prompt "GDB debugger Version"
|
||||
default BR2_GDB_VERSION_8_2
|
||||
default BR2_GDB_VERSION_8_3
|
||||
depends on !BR2_arc
|
||||
depends on !BR2_csky
|
||||
help
|
||||
Select the version of gdb you wish to use.
|
||||
|
||||
config BR2_GDB_VERSION_8_1
|
||||
bool "gdb 8.1.x"
|
||||
|
||||
config BR2_GDB_VERSION_8_2
|
||||
bool "gdb 8.2.x"
|
||||
|
||||
config BR2_GDB_VERSION_8_3
|
||||
bool "gdb 8.3.x"
|
||||
|
||||
config BR2_GDB_VERSION_9_2
|
||||
bool "gdb 9.2.x"
|
||||
|
||||
endchoice
|
||||
|
||||
endif
|
||||
@@ -67,9 +85,9 @@ endif
|
||||
# If cross-gdb is not enabled, the latest working version is chosen.
|
||||
config BR2_GDB_VERSION
|
||||
string
|
||||
default "arc-2019.09-release-gdb" if BR2_arc
|
||||
default "arc-2020.09-release-gdb" if BR2_arc
|
||||
default "4ecb98fbc2f94dbe01b69384afbc515107de73df" if BR2_csky
|
||||
default "8.1.1" if BR2_GDB_VERSION_8_1
|
||||
default "8.2.1" if BR2_GDB_VERSION_8_2 || !BR2_PACKAGE_HOST_GDB
|
||||
default "8.3" if BR2_GDB_VERSION_8_3
|
||||
default "8.3.1" if BR2_GDB_VERSION_8_3
|
||||
default "9.2" if BR2_GDB_VERSION_9_2
|
||||
depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# From ftp://gcc.gnu.org/pub/gdb/releases/sha512.sum
|
||||
sha512 7dcd5e8c90de92f577834d887b5f54edb93a07083bfe661bc46c270a6cc4919f0b348e7e2fe8ae4511298a570ef150eeefdc667ef7cf527f0cf60943177ab6c9 gdb-8.1.1.tar.xz
|
||||
sha512 2aa81cfd389bb48c35d7d9f95cc10e88b4f7ad4597bdde0f8f1fd312f60f10d9fb2cc6e5a9355227d89ff328f7feb0fc411a69394560cafeb9fa75d35d896d11 gdb-8.2.1.tar.xz
|
||||
sha512 47ac074d20a09a3fac8f4a41dce0a0cbe6ef702f7dc21ba8b7d650d306128dcae481e9a16bf65e596b3a541dc82ae57c02bcbb786d551b4ef3e2917b9b6f0ae1 gdb-8.3.tar.xz
|
||||
sha512 2aa81cfd389bb48c35d7d9f95cc10e88b4f7ad4597bdde0f8f1fd312f60f10d9fb2cc6e5a9355227d89ff328f7feb0fc411a69394560cafeb9fa75d35d896d11 gdb-8.2.1.tar.xz
|
||||
sha512 9053a2dc6b9eb921907afbc4cecc75d635aa76df5e8c4f0e5824ccf57cb206b299c19b127fff000b65c334826ff8304a54ff6098428365a8e997cca886c39e9a gdb-8.3.1.tar.xz
|
||||
sha512 73635f00f343117aa5e2436f1e1597099e2bfb31ef7bb162b273fa1ea282c3fa9b0f52762e70bfc7ad0334addb8d159e9ac7cbe5998ca4f755ea8cf90714d274 gdb-9.2.tar.xz
|
||||
|
||||
# Locally calculated (fetched from Github)
|
||||
sha512 c33818f8679d99d5315220578864b04b87f69c46ebe62472809ee6e1d260e5ec84d598f38d80c127a2045d6624f28803c2720d89434204acbd94e988a45870f1 gdb-arc-2019.09-release-gdb.tar.gz
|
||||
sha512 5a2acf2fd33ab2ff589e1037ca40abda54328997dcff26b2b49b874bd3be980be5a63342962254f3c3bda98e32ce7a33af704d37353352833dee193135600458 gdb-arc-2020.09-release-gdb.tar.gz
|
||||
|
||||
# Locally calculated (fetched from https://github.com/c-sky/binutils-gdb)
|
||||
sha512 c421e1f3c0d6cfb3c04544573c0c4b0075c8d8e3d563c6c234fcc1e4c2167ab203d1e57aec3b58abd348dc46f8cf9b47b753d3a43dba3ea970c9c9a6bd78c07b gdb-4ecb98fbc2f94dbe01b69384afbc515107de73df.tar.gz
|
||||
sha512 c421e1f3c0d6cfb3c04544573c0c4b0075c8d8e3d563c6c234fcc1e4c2167ab203d1e57aec3b58abd348dc46f8cf9b47b753d3a43dba3ea970c9c9a6bd78c07b gdb-4ecb98fbc2f94dbe01b69384afbc515107de73df.tar.gz
|
||||
|
||||
@@ -12,6 +12,9 @@ ifeq ($(BR2_arc),y)
|
||||
GDB_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,binutils-gdb,$(GDB_VERSION))
|
||||
GDB_SOURCE = gdb-$(GDB_VERSION).tar.gz
|
||||
GDB_FROM_GIT = y
|
||||
# recent gdb versions (>= 10) have gdbserver moved at the top-level,
|
||||
# which requires a different build logic.
|
||||
GDB_GDBSERVER_TOPLEVEL = y
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_csky),y)
|
||||
@@ -23,19 +26,30 @@ endif
|
||||
GDB_LICENSE = GPL-2.0+, LGPL-2.0+, GPL-3.0+, LGPL-3.0+
|
||||
GDB_LICENSE_FILES = COPYING COPYING.LIB COPYING3 COPYING3.LIB
|
||||
|
||||
# We only want gdbserver and not the entire debugger.
|
||||
ifeq ($(BR2_PACKAGE_GDB_DEBUGGER),)
|
||||
# On gdb < 10, if you want to build only gdbserver, you need to
|
||||
# configure only gdb/gdbserver.
|
||||
ifeq ($(BR2_PACKAGE_GDB_DEBUGGER)$(GDB_GDBSERVER_TOPLEVEL),)
|
||||
GDB_SUBDIR = gdb/gdbserver
|
||||
HOST_GDB_SUBDIR = .
|
||||
|
||||
# When we want to build the full gdb, or for very recent versions of
|
||||
# gdb with gdbserver at the top-level, out of tree build is mandatory,
|
||||
# so we create a 'build' subdirectory in the gdb sources, and build
|
||||
# from there.
|
||||
else
|
||||
GDB_DEPENDENCIES = ncurses \
|
||||
$(if $(BR2_PACKAGE_LIBICONV),libiconv)
|
||||
GDB_SUBDIR = build
|
||||
define GDB_CONFIGURE_SYMLINK
|
||||
mkdir -p $(@D)/$(GDB_SUBDIR)
|
||||
ln -sf ../configure $(@D)/$(GDB_SUBDIR)/configure
|
||||
endef
|
||||
GDB_PRE_CONFIGURE_HOOKS += GDB_CONFIGURE_SYMLINK
|
||||
endif
|
||||
|
||||
# For the host variant, we really want to build with XML support,
|
||||
# which is needed to read XML descriptions of target architectures. We
|
||||
# also need ncurses.
|
||||
HOST_GDB_DEPENDENCIES = host-expat host-ncurses
|
||||
# As for libiberty, gdb may use a system-installed one if present, so
|
||||
# we must ensure ours is installed first.
|
||||
HOST_GDB_DEPENDENCIES = host-expat host-libiberty host-ncurses
|
||||
|
||||
# Disable building documentation
|
||||
GDB_MAKE_OPTS += MAKEINFO=true
|
||||
@@ -126,13 +140,29 @@ GDB_CONF_OPTS = \
|
||||
--without-x \
|
||||
--disable-sim \
|
||||
$(GDB_DISABLE_BINUTILS_CONF_OPTS) \
|
||||
$(if $(BR2_PACKAGE_GDB_SERVER),--enable-gdbserver,--disable-gdbserver) \
|
||||
--with-curses \
|
||||
--without-included-gettext \
|
||||
--disable-werror \
|
||||
--enable-static \
|
||||
--without-mpfr
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GDB_DEBUGGER),y)
|
||||
GDB_CONF_OPTS += \
|
||||
--enable-gdb \
|
||||
--with-curses
|
||||
GDB_DEPENDENCIES = ncurses \
|
||||
$(if $(BR2_PACKAGE_LIBICONV),libiconv)
|
||||
else
|
||||
GDB_CONF_OPTS += \
|
||||
--disable-gdb \
|
||||
--without-curses
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GDB_SERVER),y)
|
||||
GDB_CONF_OPTS += --enable-gdbserver
|
||||
else
|
||||
GDB_CONF_OPTS += --disable-gdbserver
|
||||
endif
|
||||
|
||||
# When gdb is built as C++ application for ARC it segfaults at runtime
|
||||
# So we pass --disable-build-with-cxx config option to force gdb not to
|
||||
# be built as C++ app.
|
||||
@@ -237,6 +267,9 @@ endif
|
||||
ifeq ($(BR2_PACKAGE_HOST_GDB_PYTHON),y)
|
||||
HOST_GDB_CONF_OPTS += --with-python=$(HOST_DIR)/bin/python2
|
||||
HOST_GDB_DEPENDENCIES += host-python
|
||||
else ifeq ($(BR2_PACKAGE_HOST_GDB_PYTHON3),y)
|
||||
HOST_GDB_CONF_OPTS += --with-python=$(HOST_DIR)/bin/python3
|
||||
HOST_GDB_DEPENDENCIES += host-python3
|
||||
else
|
||||
HOST_GDB_CONF_OPTS += --without-python
|
||||
endif
|
||||
@@ -247,6 +280,17 @@ else
|
||||
HOST_GDB_CONF_OPTS += --disable-sim
|
||||
endif
|
||||
|
||||
# Since gdb 9, in-tree builds for GDB are not allowed anymore,
|
||||
# so we create a 'build' subdirectory in the gdb sources, and
|
||||
# build from there.
|
||||
HOST_GDB_SUBDIR = build
|
||||
|
||||
define HOST_GDB_CONFIGURE_SYMLINK
|
||||
mkdir -p $(@D)/build
|
||||
ln -sf ../configure $(@D)/build/configure
|
||||
endef
|
||||
HOST_GDB_PRE_CONFIGURE_HOOKS += HOST_GDB_CONFIGURE_SYMLINK
|
||||
|
||||
# legacy $arch-linux-gdb symlink
|
||||
define HOST_GDB_ADD_SYMLINK
|
||||
cd $(HOST_DIR)/bin && \
|
||||
|
||||
Reference in New Issue
Block a user