From: Romain Naour Date: Sun, 9 Sep 2018 16:37:49 +0000 (+0200) Subject: package/gdb: move patch directory X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=521676cfe021497b535e87c98c484ac0790c4db4;p=buildroot.git package/gdb: move patch directory commit 9cf4964da56863dfe4ce729c32400bd9acf25ee7 forgot to move patch directory. Fixes: https://gitlab.com/free-electrons/toolchains-builder/-/jobs/95552306 Signed-off-by: Romain Naour Signed-off-by: Thomas Petazzoni --- diff --git a/package/gdb/8.1.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/package/gdb/8.1.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch new file mode 100644 index 0000000000..9e011c728d --- /dev/null +++ b/package/gdb/8.1.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch @@ -0,0 +1,55 @@ +From 2acd9d3eb703b9a64ac92b3880ed546bec92af95 Mon Sep 17 00:00:00 2001 +From: Khem Raj +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 +Signed-off-by: Thomas Petazzoni +[Rebase on gdb 8.0] +Signed-off-by: Romain Naour +--- + 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 33a9feb..1a9141f 100644 +--- a/gdb/gdbserver/linux-ppc-low.c ++++ b/gdb/gdbserver/linux-ppc-low.c +@@ -21,7 +21,13 @@ + #include "linux-low.h" + + #include ++#if !defined(__GLIBC__) ++# define pt_regs uapi_pt_regs ++#endif + #include ++#if !defined(__GLIBC__) ++# undef pt_regs ++#endif + + #include "nat/ppc-linux.h" + #include "linux-ppc-tdesc.h" +diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h +index 5837ea1..7233929 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 + ++#if !defined(__GLIBC__) ++# define pt_regs uapi_pt_regs ++#endif + #include ++#if !defined(__GLIBC__) ++# undef pt_regs ++#endif + #include + + /* This sometimes isn't defined. */ +-- +2.9.4 + diff --git a/package/gdb/8.1.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch b/package/gdb/8.1.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch new file mode 100644 index 0000000000..d31e5dd11a --- /dev/null +++ b/package/gdb/8.1.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch @@ -0,0 +1,43 @@ +From dfe4a40bc9d2fc1fd1b1a11ed733a0c0a1f59f3c Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sat, 3 Jun 2017 21:23:52 +0200 +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. + +Inspired by +http://git.yoctoproject.org/clean/cgit.cgi/poky/plain/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch, +adapted for SuperH. + +Signed-off-by: Thomas Petazzoni +[Rebase on gdb 8.0] +Signed-off-by: Romain Naour +--- + gdb/gdbserver/linux-sh-low.c | 8 ++++++++ + 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 +--- 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; + #include + #endif + ++#if !defined(__GLIBC__) ++# define pt_regs uapi_pt_regs ++# define pt_dspregs uapi_pt_dspregs ++#endif + #include ++#if !defined(__GLIBC__) ++# undef pt_regs ++# undef pt_dspregs ++#endif + + #define sh_num_regs 41 + +-- +2.9.4 + diff --git a/package/gdb/8.1.1/0003-use-asm-sgidefs.h.patch b/package/gdb/8.1.1/0003-use-asm-sgidefs.h.patch new file mode 100644 index 0000000000..d30336904f --- /dev/null +++ b/package/gdb/8.1.1/0003-use-asm-sgidefs.h.patch @@ -0,0 +1,40 @@ +From 12a0b8d81e1fda6ba98abdce8d6f09f9555ebcf5 Mon Sep 17 00:00:00 2001 +From: Andre McCurdy +Date: Sat, 30 Apr 2016 15:29:06 -0700 +Subject: [PATCH] use + +Build fix for MIPS with musl libc + +The MIPS specific header is provided by glibc and uclibc +but not by musl. Regardless of the libc, the kernel headers provide + which provides the same definitions, so use that +instead. + +Upstream-Status: Pending + +[Vincent: +Taken from: https://sourceware.org/bugzilla/show_bug.cgi?id=21070] + +Signed-off-by: Andre McCurdy +Signed-off-by: Khem Raj +Signed-off-by: Vicente Olivert Riera +--- + gdb/mips-linux-nat.c | 2 +- + 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 +--- a/gdb/mips-linux-nat.c ++++ b/gdb/mips-linux-nat.c +@@ -31,7 +31,7 @@ + #include "gdb_proc_service.h" + #include "gregset.h" + +-#include ++#include + #include "nat/gdb_ptrace.h" + #include + #include "inf-ptrace.h" +-- +2.13.1 + diff --git a/package/gdb/8.1.1/0004-gdbserver-fix-build-for-m68k.patch b/package/gdb/8.1.1/0004-gdbserver-fix-build-for-m68k.patch new file mode 100644 index 0000000000..451bed312c --- /dev/null +++ b/package/gdb/8.1.1/0004-gdbserver-fix-build-for-m68k.patch @@ -0,0 +1,62 @@ +From 80c60ea9fb3634272a98ec526eabff25f5255bae Mon Sep 17 00:00:00 2001 +From: Romain Naour +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 is included after , +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 on top of "linux-low.h". + +[1] https://github.com/strace/strace/commit/6ebf6c4f9e5ebca123a5b5f24afe67cf0473cf92 + +Signed-off-by: Romain Naour +--- + 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 . */ + + #include "server.h" ++ ++#ifdef HAVE_SYS_REG_H ++#include ++#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 +-#endif +- + #define m68k_num_regs 29 + #define m68k_num_gregs 18 + +-- +2.14.4 + diff --git a/package/gdb/8.1.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch b/package/gdb/8.1.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch new file mode 100644 index 0000000000..dea24725fc --- /dev/null +++ b/package/gdb/8.1.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch @@ -0,0 +1,51 @@ +From 887c667089e5417fdc7c5bbb364b027e86a7c113 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Sun, 24 Jun 2018 23:33:55 +0200 +Subject: [PATCH] nat/fork-inferior: include linux-ptrace.h + +To decide whether fork() or vfork() should be used, fork-inferior.c +uses the following test: + + #if !(defined(__UCLIBC__) && defined(HAS_NOMMU)) + +However, HAS_NOMMU is never defined, because it gets defined in +linux-ptrace.h, which is not included by fork-inferior.c. Due to this, +gdbserver fails to build on noMMU architectures. This commit fixes +that by simply including linux-ptrace.h. + +This bug was introduced by commit +2090129c36c7e582943b7d300968d19b46160d84 ("Share fork_inferior et al +with gdbserver"). Indeed, the same fork()/vfork() selection was done, +but in another file where linux-ptrace.h was included. + +Fixes the following build issue: + +../nat/fork-inferior.c: In function 'pid_t fork_inferior(const char*, const string&, char**, void (*)(), void (*)(int), void (*)(), const char*, void (*)(const char*, char* const*, char* const*))': +../nat/fork-inferior.c:376:11: error: 'fork' was not declared in this scope + pid = fork (); + ^~~~ +../nat/fork-inferior.c:376:11: note: suggested alternative: 'vfork' + pid = fork (); + ^~~~ + vfork + +Signed-off-by: Thomas Petazzoni +--- + 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 +--- 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" ++#include "linux-ptrace.h" + #include + + extern char **environ; +-- +2.14.4 + diff --git a/package/gdb/8.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/package/gdb/8.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch deleted file mode 100644 index 9e011c728d..0000000000 --- a/package/gdb/8.1/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 2acd9d3eb703b9a64ac92b3880ed546bec92af95 Mon Sep 17 00:00:00 2001 -From: Khem Raj -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 -Signed-off-by: Thomas Petazzoni -[Rebase on gdb 8.0] -Signed-off-by: Romain Naour ---- - 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 33a9feb..1a9141f 100644 ---- a/gdb/gdbserver/linux-ppc-low.c -+++ b/gdb/gdbserver/linux-ppc-low.c -@@ -21,7 +21,13 @@ - #include "linux-low.h" - - #include -+#if !defined(__GLIBC__) -+# define pt_regs uapi_pt_regs -+#endif - #include -+#if !defined(__GLIBC__) -+# undef pt_regs -+#endif - - #include "nat/ppc-linux.h" - #include "linux-ppc-tdesc.h" -diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h -index 5837ea1..7233929 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 - -+#if !defined(__GLIBC__) -+# define pt_regs uapi_pt_regs -+#endif - #include -+#if !defined(__GLIBC__) -+# undef pt_regs -+#endif - #include - - /* This sometimes isn't defined. */ --- -2.9.4 - diff --git a/package/gdb/8.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch b/package/gdb/8.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch deleted file mode 100644 index d31e5dd11a..0000000000 --- a/package/gdb/8.1/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch +++ /dev/null @@ -1,43 +0,0 @@ -From dfe4a40bc9d2fc1fd1b1a11ed733a0c0a1f59f3c Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Sat, 3 Jun 2017 21:23:52 +0200 -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. - -Inspired by -http://git.yoctoproject.org/clean/cgit.cgi/poky/plain/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch, -adapted for SuperH. - -Signed-off-by: Thomas Petazzoni -[Rebase on gdb 8.0] -Signed-off-by: Romain Naour ---- - gdb/gdbserver/linux-sh-low.c | 8 ++++++++ - 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 ---- 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; - #include - #endif - -+#if !defined(__GLIBC__) -+# define pt_regs uapi_pt_regs -+# define pt_dspregs uapi_pt_dspregs -+#endif - #include -+#if !defined(__GLIBC__) -+# undef pt_regs -+# undef pt_dspregs -+#endif - - #define sh_num_regs 41 - --- -2.9.4 - diff --git a/package/gdb/8.1/0003-use-asm-sgidefs.h.patch b/package/gdb/8.1/0003-use-asm-sgidefs.h.patch deleted file mode 100644 index d30336904f..0000000000 --- a/package/gdb/8.1/0003-use-asm-sgidefs.h.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 12a0b8d81e1fda6ba98abdce8d6f09f9555ebcf5 Mon Sep 17 00:00:00 2001 -From: Andre McCurdy -Date: Sat, 30 Apr 2016 15:29:06 -0700 -Subject: [PATCH] use - -Build fix for MIPS with musl libc - -The MIPS specific header is provided by glibc and uclibc -but not by musl. Regardless of the libc, the kernel headers provide - which provides the same definitions, so use that -instead. - -Upstream-Status: Pending - -[Vincent: -Taken from: https://sourceware.org/bugzilla/show_bug.cgi?id=21070] - -Signed-off-by: Andre McCurdy -Signed-off-by: Khem Raj -Signed-off-by: Vicente Olivert Riera ---- - gdb/mips-linux-nat.c | 2 +- - 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 ---- a/gdb/mips-linux-nat.c -+++ b/gdb/mips-linux-nat.c -@@ -31,7 +31,7 @@ - #include "gdb_proc_service.h" - #include "gregset.h" - --#include -+#include - #include "nat/gdb_ptrace.h" - #include - #include "inf-ptrace.h" --- -2.13.1 - diff --git a/package/gdb/8.1/0004-gdbserver-fix-build-for-m68k.patch b/package/gdb/8.1/0004-gdbserver-fix-build-for-m68k.patch deleted file mode 100644 index 451bed312c..0000000000 --- a/package/gdb/8.1/0004-gdbserver-fix-build-for-m68k.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 80c60ea9fb3634272a98ec526eabff25f5255bae Mon Sep 17 00:00:00 2001 -From: Romain Naour -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 is included after , -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 on top of "linux-low.h". - -[1] https://github.com/strace/strace/commit/6ebf6c4f9e5ebca123a5b5f24afe67cf0473cf92 - -Signed-off-by: Romain Naour ---- - 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 . */ - - #include "server.h" -+ -+#ifdef HAVE_SYS_REG_H -+#include -+#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 --#endif -- - #define m68k_num_regs 29 - #define m68k_num_gregs 18 - --- -2.14.4 - diff --git a/package/gdb/8.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch b/package/gdb/8.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch deleted file mode 100644 index dea24725fc..0000000000 --- a/package/gdb/8.1/0005-nat-fork-inferior-include-linux-ptrace.h.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 887c667089e5417fdc7c5bbb364b027e86a7c113 Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni -Date: Sun, 24 Jun 2018 23:33:55 +0200 -Subject: [PATCH] nat/fork-inferior: include linux-ptrace.h - -To decide whether fork() or vfork() should be used, fork-inferior.c -uses the following test: - - #if !(defined(__UCLIBC__) && defined(HAS_NOMMU)) - -However, HAS_NOMMU is never defined, because it gets defined in -linux-ptrace.h, which is not included by fork-inferior.c. Due to this, -gdbserver fails to build on noMMU architectures. This commit fixes -that by simply including linux-ptrace.h. - -This bug was introduced by commit -2090129c36c7e582943b7d300968d19b46160d84 ("Share fork_inferior et al -with gdbserver"). Indeed, the same fork()/vfork() selection was done, -but in another file where linux-ptrace.h was included. - -Fixes the following build issue: - -../nat/fork-inferior.c: In function 'pid_t fork_inferior(const char*, const string&, char**, void (*)(), void (*)(int), void (*)(), const char*, void (*)(const char*, char* const*, char* const*))': -../nat/fork-inferior.c:376:11: error: 'fork' was not declared in this scope - pid = fork (); - ^~~~ -../nat/fork-inferior.c:376:11: note: suggested alternative: 'vfork' - pid = fork (); - ^~~~ - vfork - -Signed-off-by: Thomas Petazzoni ---- - 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 ---- 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" -+#include "linux-ptrace.h" - #include - - extern char **environ; --- -2.14.4 -