All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/gdb: add support for gdb 8.0
@ 2017-06-05 20:46 Romain Naour
  2017-06-11 16:10 ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Romain Naour @ 2017-06-05 20:46 UTC (permalink / raw)
  To: buildroot

Add a dependency on gcc >= 4.8 since gdb needs a C++11 compiler.

Remove included patch since 7.12.1:
0001-Remove-const-in-xtensa-linux-nat.c-fetch_gregs.patch
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=d274ecf4ddf76768af57e27f654b9ce6784b391c

Rebase remaining patches:
0002-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
0003-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch

See https://sourceware.org/ml/gdb-announce/2017/msg00003.html

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
This patch is rebased after [1], [2] and [3]

[1] http://patchwork.ozlabs.org/patch/770835
[2] http://patchwork.ozlabs.org/patch/770834
[3] http://patchwork.ozlabs.org/patch/770836

This new release support Synopsys ARC support but it
can be enabled in a followup commit.
---
 ...Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch | 55 ++++++++++++++++++++++
 ...efine-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch | 43 +++++++++++++++++
 package/gdb/Config.in.host                         |  8 ++++
 package/gdb/gdb.hash                               |  1 +
 4 files changed, 107 insertions(+)
 create mode 100644 package/gdb/8.0/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
 create mode 100644 package/gdb/8.0/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch

diff --git a/package/gdb/8.0/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch b/package/gdb/8.0/0001-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
new file mode 100644
index 0000000..98f0c24
--- /dev/null
+++ b/package/gdb/8.0/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 <raj.khem@gmail.com>
+Date: Sat, 6 Aug 2016 17:32:50 -0700
+Subject: [PATCH 1/2] 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.0]
+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 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 <elf.h>
++#if !defined(__GLIBC__)
++# define pt_regs uapi_pt_regs
++#endif
+ #include <asm/ptrace.h>
++#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 <asm/ptrace.h>
++#if !defined(__GLIBC__)
++# undef pt_regs
++#endif
+ #include <asm/cputable.h>
+ 
+ /* This sometimes isn't defined.  */
+-- 
+2.9.4
+
diff --git a/package/gdb/8.0/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch b/package/gdb/8.0/0002-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch
new file mode 100644
index 0000000..d94788a
--- /dev/null
+++ b/package/gdb/8.0/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 <thomas.petazzoni@free-electrons.com>
+Date: Sat, 3 Jun 2017 21:23:52 +0200
+Subject: [PATCH 2/2] 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 <thomas.petazzoni@free-electrons.com>
+[Rebase	on gdb 8.0]
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+---
+ 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 <sys/reg.h>
+ #endif
+ 
++#if !defined(__GLIBC__)
++# define pt_regs uapi_pt_regs
++# define pt_dspregs uapi_pt_dspregs
++#endif
+ #include <asm/ptrace.h>
++#if !defined(__GLIBC__)
++# undef pt_regs
++# undef pt_dspregs
++#endif
+ 
+ #define sh_num_regs 41
+ 
+-- 
+2.9.4
+
diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host
index 027300e..0849b67 100644
--- a/package/gdb/Config.in.host
+++ b/package/gdb/Config.in.host
@@ -50,6 +50,13 @@ config BR2_GDB_VERSION_7_11
 config BR2_GDB_VERSION_7_12
 	bool "gdb 7.12.x"
 
+config BR2_GDB_VERSION_8_0
+	bool "gdb 8.0.x"
+	# Needs a C++11 compiler
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_HOST_GCC_AT_LEAST_4_8
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+
 endchoice
 
 endif
@@ -62,4 +69,5 @@ config BR2_GDB_VERSION
 	default "7.10.1"   if BR2_GDB_VERSION_7_10
 	default "7.11.1"   if BR2_GDB_VERSION_7_11 || !BR2_PACKAGE_HOST_GDB
 	default "7.12.1"   if BR2_GDB_VERSION_7_12
+	default "8.0"      if BR2_GDB_VERSION_8_0
 	depends on BR2_PACKAGE_GDB || BR2_PACKAGE_HOST_GDB
diff --git a/package/gdb/gdb.hash b/package/gdb/gdb.hash
index b0f8a6e..098d20a 100644
--- a/package/gdb/gdb.hash
+++ b/package/gdb/gdb.hash
@@ -2,6 +2,7 @@
 sha512	17a5138277a31685a5c2a841cb47ed9bc4626ea617b8ca77750513b300299f4fbbffe504958b5372de610dcb952c679cf8fa9c1bdadd380294fbf59b6e366010	gdb-7.10.1.tar.xz
 sha512  f80ec6c8a0f0b54c8b945666e875809174402b7e121efb378ebac931a91f9a1cc0048568f8e2f42ae8ae2392ff8d144c2e51d41c7398935017450aaf29838360	gdb-7.11.1.tar.xz
 sha512  0ac8d0a495103611ef41167a08313a010dce6ca4c6d827cbe8558a0c1a1a8a6bfa53f1b7704251289cababbfaaf9e075550cdf741a54d6cd9ca3433d910efcd8	gdb-7.12.1.tar.xz
+sha512  e4044bdd162cbf95044ec1eaa44d2fa62a33e051bdbbacbc97afd4dfb07bae1bea514381fc1966aede89d6796ef2377a15748a93d95e2ad494c8497db489e886	gdb-8.0.tar.xz
 
 # Locally calculated (fetched from Github)
 sha512  0a467091d4b01fbecabb4b8da1cb743025c70e7f4874a0b5c8fa2ec623569a39bde6762b91806de0be6e63711aeb6909715cfbe43860de73d8aec6159a9f10a7	gdb-6be65fb56ea6694a9260733a536a023a1e2d4d57.tar.gz
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] package/gdb: add support for gdb 8.0
  2017-06-05 20:46 [Buildroot] [PATCH] package/gdb: add support for gdb 8.0 Romain Naour
@ 2017-06-11 16:10 ` Thomas Petazzoni
  2017-06-11 21:17   ` Arnout Vandecappelle
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2017-06-11 16:10 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon,  5 Jun 2017 22:46:48 +0200, Romain Naour wrote:
> Add a dependency on gcc >= 4.8 since gdb needs a C++11 compiler.
> 
> Remove included patch since 7.12.1:
> 0001-Remove-const-in-xtensa-linux-nat.c-fetch_gregs.patch
> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=d274ecf4ddf76768af57e27f654b9ce6784b391c
> 
> Rebase remaining patches:
> 0002-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
> 0003-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch
> 
> See https://sourceware.org/ml/gdb-announce/2017/msg00003.html
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> ---
> This patch is rebased after [1], [2] and [3]

Applied to master, thanks. Do you intend to send a patch that updates
the default gdb version to 7.12, and drop support for 7.10 ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] package/gdb: add support for gdb 8.0
  2017-06-11 16:10 ` Thomas Petazzoni
@ 2017-06-11 21:17   ` Arnout Vandecappelle
  2017-06-12  7:36     ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2017-06-11 21:17 UTC (permalink / raw)
  To: buildroot



On 11-06-17 18:10, Thomas Petazzoni wrote:
> Hello,
> 
> On Mon,  5 Jun 2017 22:46:48 +0200, Romain Naour wrote:
>> Add a dependency on gcc >= 4.8 since gdb needs a C++11 compiler.
>>
>> Remove included patch since 7.12.1:
>> 0001-Remove-const-in-xtensa-linux-nat.c-fetch_gregs.patch
>> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=d274ecf4ddf76768af57e27f654b9ce6784b391c
>>
>> Rebase remaining patches:
>> 0002-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch
>> 0003-sh-ptrace-Define-pt_-dsp-regs-uapi_pt_-dsp-regs-on-G.patch
>>
>> See https://sourceware.org/ml/gdb-announce/2017/msg00003.html
>>
>> Signed-off-by: Romain Naour <romain.naour@gmail.com>
>> ---
>> This patch is rebased after [1], [2] and [3]
> 
> Applied to master, thanks. Do you intend to send a patch that updates
> the default gdb version to 7.12, and drop support for 7.10 ?

 Since we've been discussing version dropping, perhaps it's time to consider gdb
as well.

 Is there really any reason to support multiple versions of gdb?

 If yes, is there a reason to not use the latest version as default?

 And the same questions for binutils.

 Regards,
 Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] package/gdb: add support for gdb 8.0
  2017-06-11 21:17   ` Arnout Vandecappelle
@ 2017-06-12  7:36     ` Thomas Petazzoni
  2017-06-12  8:19       ` Arnout Vandecappelle
  2017-06-13 21:37       ` Peter Korsgaard
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2017-06-12  7:36 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 11 Jun 2017 23:17:36 +0200, Arnout Vandecappelle wrote:

> > Applied to master, thanks. Do you intend to send a patch that updates
> > the default gdb version to 7.12, and drop support for 7.10 ?  
> 
>  Since we've been discussing version dropping, perhaps it's time to consider gdb
> as well.
> 
>  Is there really any reason to support multiple versions of gdb?
> 
>  If yes, is there a reason to not use the latest version as default?
> 
>  And the same questions for binutils.

All this version selection stuff is very historical. I guess one reason
for it is to allow people to upgrade Buildroot while keeping the same
toolchain components, which are often quite sensitive to changes.
That's the main reasoning.

Now, as we have discussed, while such a concern is very valid for gcc,
it's probably less true for binutils/gdb.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] package/gdb: add support for gdb 8.0
  2017-06-12  7:36     ` Thomas Petazzoni
@ 2017-06-12  8:19       ` Arnout Vandecappelle
  2017-06-13 21:37       ` Peter Korsgaard
  1 sibling, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2017-06-12  8:19 UTC (permalink / raw)
  To: buildroot



On 12-06-17 09:36, Thomas Petazzoni wrote:
> Hello,
> 
> On Sun, 11 Jun 2017 23:17:36 +0200, Arnout Vandecappelle wrote:
> 
>>> Applied to master, thanks. Do you intend to send a patch that updates
>>> the default gdb version to 7.12, and drop support for 7.10 ?  
>>
>>  Since we've been discussing version dropping, perhaps it's time to consider gdb
>> as well.
>>
>>  Is there really any reason to support multiple versions of gdb?
>>
>>  If yes, is there a reason to not use the latest version as default?
>>
>>  And the same questions for binutils.
> 
> All this version selection stuff is very historical. I guess one reason
> for it is to allow people to upgrade Buildroot while keeping the same
> toolchain components, which are often quite sensitive to changes.
> That's the main reasoning.

 But in practice this probably won't work. What I've seen with the +- 10
customers who use Buildroot is that they update Buildroot once every 3 years or
so (or they don't update at all). By that time, whatever toolchain version they
were using is already gone. So offering the last 3 versions is possibly not a
useful service for anybody.


> Now, as we have discussed, while such a concern is very valid for gcc,
> it's probably less true for binutils/gdb.

 Well, they both are a sensitive to regressions (especially on "exotic" arches)
and when they break it's kind of fundamental :-)


 Anyway, if we plan to remove the version choice, the first thing to do (for
about a year I'd say) is to default to the latest. Because that may be an
additional reason to offer a choice: because the latest has a good chance of
breaking packages (this is certainly the case for GCC, not sure about binutils,
probably not true for gdb).


 Regards,
 Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH] package/gdb: add support for gdb 8.0
  2017-06-12  7:36     ` Thomas Petazzoni
  2017-06-12  8:19       ` Arnout Vandecappelle
@ 2017-06-13 21:37       ` Peter Korsgaard
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2017-06-13 21:37 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Hello,
 > On Sun, 11 Jun 2017 23:17:36 +0200, Arnout Vandecappelle wrote:

 >> > Applied to master, thanks. Do you intend to send a patch that updates
 >> > the default gdb version to 7.12, and drop support for 7.10 ?  
 >> 
 >> Since we've been discussing version dropping, perhaps it's time to consider gdb
 >> as well.
 >> 
 >> Is there really any reason to support multiple versions of gdb?
 >> 
 >> If yes, is there a reason to not use the latest version as default?
 >> 
 >> And the same questions for binutils.

 > All this version selection stuff is very historical. I guess one reason
 > for it is to allow people to upgrade Buildroot while keeping the same
 > toolchain components, which are often quite sensitive to changes.
 > That's the main reasoning.

Indeed. People should normally not use the internal toolchain support
(E.G. rebuilding the toolchain every time) for real projects, but
yeah. You can still reuse a toolchain built with an older BR version,
but you naturally don't get any of the new fixes.

With that said, our internal toolchain component version options do make
it unrealistic for us to really test all combinations, so gradually
limiting the number of supported versions going forward is probably the
way to go.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-06-13 21:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-05 20:46 [Buildroot] [PATCH] package/gdb: add support for gdb 8.0 Romain Naour
2017-06-11 16:10 ` Thomas Petazzoni
2017-06-11 21:17   ` Arnout Vandecappelle
2017-06-12  7:36     ` Thomas Petazzoni
2017-06-12  8:19       ` Arnout Vandecappelle
2017-06-13 21:37       ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.