All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/gdb: fix build of gdb on riscv
@ 2021-08-13 14:26 Fabrice Fontaine
  2021-08-15 15:57 ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Fontaine @ 2021-08-13 14:26 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

Build of gdb on riscv without host-gdb is broken since commit
4ecd247ead22a6cfb87a4ffafc4be05201328aef because BR2_GDB_VERSION_10 is
never defined if BR2_PACKAGE_HOST_GDB is not selected resulting in the
following build failure:

/bin/bash: line 0: cd: /tmp/instance-0/output-1/build/gdb-10.1/gdb/gdbserver: No such file or directory

Fixes:
 - http://autobuild.buildroot.org/results/ce47d616ee79d5f735779570ebc3b4a9c0f64c6a

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 package/gdb/gdb.mk | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk
index 17e10e8b16..152ea16401 100644
--- a/package/gdb/gdb.mk
+++ b/package/gdb/gdb.mk
@@ -29,6 +29,12 @@ GDB_SOURCE = gdb-$(GDB_VERSION).tar.gz
 GDB_FROM_GIT = y
 endif
 
+# recent gdb versions (>= 10) have gdbserver moved at the top-level,
+# which requires a different build logic.
+ifeq ($(BR2_PACKAGE_HOST_GDB):$(BR2_riscv),:y)
+GDB_GDBSERVER_TOPLEVEL = y
+endif
+
 GDB_LICENSE = GPL-2.0+, LGPL-2.0+, GPL-3.0+, LGPL-3.0+
 GDB_LICENSE_FILES = COPYING COPYING.LIB COPYING3 COPYING3.LIB
 GDB_CPE_ID_VENDOR = gnu
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/gdb: fix build of gdb on riscv
  2021-08-13 14:26 [Buildroot] [PATCH 1/1] package/gdb: fix build of gdb on riscv Fabrice Fontaine
@ 2021-08-15 15:57 ` Thomas Petazzoni
  2021-08-15 16:07   ` Fabrice Fontaine
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2021-08-15 15:57 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: buildroot

On Fri, 13 Aug 2021 16:26:26 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> +# recent gdb versions (>= 10) have gdbserver moved at the top-level,
> +# which requires a different build logic.
> +ifeq ($(BR2_PACKAGE_HOST_GDB):$(BR2_riscv),:y)
> +GDB_GDBSERVER_TOPLEVEL = y
> +endif
> +
>  GDB_LICENSE = GPL-2.0+, LGPL-2.0+, GPL-3.0+, LGPL-3.0+
>  GDB_LICENSE_FILES = COPYING COPYING.LIB COPYING3 COPYING3.LIB
>  GDB_CPE_ID_VENDOR = gnu


While I understand the idea, I'm not entirely sure it's the most
logical way. What about instead changing the current:

ifeq ($(BR2_GDB_VERSION_10),y)
GDB_GDBSERVER_TOPLEVEL = y
endif

by:

ifeq ($(GDB_VERSION_10),10.1)
GDB_GDBSERVER_TOPLEVEL = y
endif

This way, it really expresses what we want: gdb version 10.x require a
different build logic.

Alternatively, we could do a hidden Config.in boolean:

config BR2_PACKAGE_GDB_TOPLEVEL
	bool
	default y if BR2_GDB_VERSION_10
	default y if !BR2_PACKAGE_HOST_GDB && BR2_riscv

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/gdb: fix build of gdb on riscv
  2021-08-15 15:57 ` Thomas Petazzoni
@ 2021-08-15 16:07   ` Fabrice Fontaine
  2021-08-18 20:33     ` Thomas Petazzoni
  0 siblings, 1 reply; 5+ messages in thread
From: Fabrice Fontaine @ 2021-08-15 16:07 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Buildroot Mailing List

Le dim. 15 août 2021 à 17:57, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> a écrit :
>
> On Fri, 13 Aug 2021 16:26:26 +0200
> Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
>
> > +# recent gdb versions (>= 10) have gdbserver moved at the top-level,
> > +# which requires a different build logic.
> > +ifeq ($(BR2_PACKAGE_HOST_GDB):$(BR2_riscv),:y)
> > +GDB_GDBSERVER_TOPLEVEL = y
> > +endif
> > +
> >  GDB_LICENSE = GPL-2.0+, LGPL-2.0+, GPL-3.0+, LGPL-3.0+
> >  GDB_LICENSE_FILES = COPYING COPYING.LIB COPYING3 COPYING3.LIB
> >  GDB_CPE_ID_VENDOR = gnu
>
>
> While I understand the idea, I'm not entirely sure it's the most
> logical way. What about instead changing the current:
>
> ifeq ($(BR2_GDB_VERSION_10),y)
> GDB_GDBSERVER_TOPLEVEL = y
> endif
>
> by:
>
> ifeq ($(GDB_VERSION_10),10.1)
> GDB_GDBSERVER_TOPLEVEL = y
> endif
This one won't work as GDB_VERSION_10 is not defined if host-gdb is
not selected.
>
> This way, it really expresses what we want: gdb version 10.x require a
> different build logic.
>
> Alternatively, we could do a hidden Config.in boolean:
>
> config BR2_PACKAGE_GDB_TOPLEVEL
>         bool
>         default y if BR2_GDB_VERSION_10
>         default y if !BR2_PACKAGE_HOST_GDB && BR2_riscv
I'll test this one but I think that it should work.
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
Best Regards,

Fabrice
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/gdb: fix build of gdb on riscv
  2021-08-15 16:07   ` Fabrice Fontaine
@ 2021-08-18 20:33     ` Thomas Petazzoni
  2021-08-18 21:16       ` Fabrice Fontaine
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2021-08-18 20:33 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: Buildroot Mailing List

Hello Fabrice,

On Sun, 15 Aug 2021 18:07:56 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> > While I understand the idea, I'm not entirely sure it's the most
> > logical way. What about instead changing the current:
> >
> > ifeq ($(BR2_GDB_VERSION_10),y)
> > GDB_GDBSERVER_TOPLEVEL = y
> > endif
> >
> > by:
> >
> > ifeq ($(GDB_VERSION_10),10.1)
> > GDB_GDBSERVER_TOPLEVEL = y
> > endif  
> This one won't work as GDB_VERSION_10 is not defined if host-gdb is
> not selected.

Sorry, I meant to do:

ifeq ($(GDB_VERSION),10.1)

which would work in all cases.

> > This way, it really expresses what we want: gdb version 10.x require a
> > different build logic.
> >
> > Alternatively, we could do a hidden Config.in boolean:
> >
> > config BR2_PACKAGE_GDB_TOPLEVEL
> >         bool
> >         default y if BR2_GDB_VERSION_10
> >         default y if !BR2_PACKAGE_HOST_GDB && BR2_riscv  
>
> I'll test this one but I think that it should work.

But I find this alternative a bit better. Looking forward to the patch!

Thanks,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/gdb: fix build of gdb on riscv
  2021-08-18 20:33     ` Thomas Petazzoni
@ 2021-08-18 21:16       ` Fabrice Fontaine
  0 siblings, 0 replies; 5+ messages in thread
From: Fabrice Fontaine @ 2021-08-18 21:16 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Buildroot Mailing List

Hello Thomas,

Le mer. 18 août 2021 à 22:33, Thomas Petazzoni
<thomas.petazzoni@bootlin.com> a écrit :
>
> Hello Fabrice,
>
> On Sun, 15 Aug 2021 18:07:56 +0200
> Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
>
> > > While I understand the idea, I'm not entirely sure it's the most
> > > logical way. What about instead changing the current:
> > >
> > > ifeq ($(BR2_GDB_VERSION_10),y)
> > > GDB_GDBSERVER_TOPLEVEL = y
> > > endif
> > >
> > > by:
> > >
> > > ifeq ($(GDB_VERSION_10),10.1)
> > > GDB_GDBSERVER_TOPLEVEL = y
> > > endif
> > This one won't work as GDB_VERSION_10 is not defined if host-gdb is
> > not selected.
>
> Sorry, I meant to do:
>
> ifeq ($(GDB_VERSION),10.1)
>
> which would work in all cases.
>
> > > This way, it really expresses what we want: gdb version 10.x require a
> > > different build logic.
> > >
> > > Alternatively, we could do a hidden Config.in boolean:
> > >
> > > config BR2_PACKAGE_GDB_TOPLEVEL
> > >         bool
> > >         default y if BR2_GDB_VERSION_10
> > >         default y if !BR2_PACKAGE_HOST_GDB && BR2_riscv
> >
> > I'll test this one but I think that it should work.
>
> But I find this alternative a bit better. Looking forward to the patch!
It's available here:
https://patchwork.ozlabs.org/project/buildroot/patch/20210815162106.1492967-1-fontaine.fabrice@gmail.com/
>
> Thanks,
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
Best Regards,

Fabrice
_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

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

end of thread, other threads:[~2021-08-18 21:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-13 14:26 [Buildroot] [PATCH 1/1] package/gdb: fix build of gdb on riscv Fabrice Fontaine
2021-08-15 15:57 ` Thomas Petazzoni
2021-08-15 16:07   ` Fabrice Fontaine
2021-08-18 20:33     ` Thomas Petazzoni
2021-08-18 21:16       ` Fabrice Fontaine

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.