Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/gdb: disable gdb for or1k builds with musl libc
@ 2023-05-02 21:11 Romain Naour
  2023-05-07 13:15 ` Yann E. MORIN
  2023-06-05 20:12 ` Peter Korsgaard
  0 siblings, 2 replies; 3+ messages in thread
From: Romain Naour @ 2023-05-02 21:11 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour, Stafford Horne

The or1k musl port is incomplete, elf_gregset_t definition is missing
(user.h is empty) [1]. It fail to build gdbserver and the full gdb.

[1] https://git.musl-libc.org/cgit/musl/tree/arch/or1k/bits/user.h?h=v1.2.3

Fixes:
https://gitlab.com/buildroot.org/toolchains-builder/-/jobs/4202276569

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Stafford Horne <shorne@gmail.com>
---
host-gdb build fine but it's useless without a gdbserver on the target.
Keep it enabled for now to avoid dependency handling for or1k with musl...
---
 package/gdb/Config.in | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/gdb/Config.in b/package/gdb/Config.in
index 80b1185b5e..0800d39ced 100644
--- a/package/gdb/Config.in
+++ b/package/gdb/Config.in
@@ -17,6 +17,9 @@ config BR2_PACKAGE_GDB
 	depends on BR2_PACKAGE_GDB_ARCH_SUPPORTS
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
 	depends on BR2_INSTALL_LIBSTDCPP
+	# The or1k musl port is incomplete, elf_gregset_t definition is missing:
+	# https://git.musl-libc.org/cgit/musl/tree/arch/or1k/bits/user.h?h=v1.2.3
+	depends on !BR2_or1k || (BR2_or1k && !BR2_TOOLCHAIN_USES_MUSL)
 	select BR2_PACKAGE_ZLIB
 	# When the external toolchain gdbserver is copied to the
 	# target, we don't allow building a separate gdbserver. The
-- 
2.34.3

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/gdb: disable gdb for or1k builds with musl libc
  2023-05-02 21:11 [Buildroot] [PATCH] package/gdb: disable gdb for or1k builds with musl libc Romain Naour
@ 2023-05-07 13:15 ` Yann E. MORIN
  2023-06-05 20:12 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2023-05-07 13:15 UTC (permalink / raw)
  To: Romain Naour; +Cc: Stafford Horne, buildroot

Romain, All,

On 2023-05-02 23:11 +0200, Romain Naour spake thusly:
> The or1k musl port is incomplete, elf_gregset_t definition is missing
> (user.h is empty) [1]. It fail to build gdbserver and the full gdb.
> 
> [1] https://git.musl-libc.org/cgit/musl/tree/arch/or1k/bits/user.h?h=v1.2.3
> 
> Fixes:
> https://gitlab.com/buildroot.org/toolchains-builder/-/jobs/4202276569
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Stafford Horne <shorne@gmail.com>
> ---
> host-gdb build fine but it's useless without a gdbserver on the target.
> Keep it enabled for now to avoid dependency handling for or1k with musl...
> ---
>  package/gdb/Config.in | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/package/gdb/Config.in b/package/gdb/Config.in
> index 80b1185b5e..0800d39ced 100644
> --- a/package/gdb/Config.in
> +++ b/package/gdb/Config.in
> @@ -17,6 +17,9 @@ config BR2_PACKAGE_GDB
>  	depends on BR2_PACKAGE_GDB_ARCH_SUPPORTS
>  	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
>  	depends on BR2_INSTALL_LIBSTDCPP
> +	# The or1k musl port is incomplete, elf_gregset_t definition is missing:
> +	# https://git.musl-libc.org/cgit/musl/tree/arch/or1k/bits/user.h?h=v1.2.3
> +	depends on !BR2_or1k || (BR2_or1k && !BR2_TOOLCHAIN_USES_MUSL)

We can somplify the logic here:
    depends on !BR2_or1k || !BR2_TOOLCHAIN_USES_MUSL

Also, I added a comment:

    comment "gdb needs a glibc or uclibc toolchain"
        depends on BR2_or1k
        depends on BR2_TOOLCHAIN_USES_MUSL

Applied to master, thanks.

Regards,
Yann E. MORIN.

>  	select BR2_PACKAGE_ZLIB
>  	# When the external toolchain gdbserver is copied to the
>  	# target, we don't allow building a separate gdbserver. The
> -- 
> 2.34.3
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH] package/gdb: disable gdb for or1k builds with musl libc
  2023-05-02 21:11 [Buildroot] [PATCH] package/gdb: disable gdb for or1k builds with musl libc Romain Naour
  2023-05-07 13:15 ` Yann E. MORIN
@ 2023-06-05 20:12 ` Peter Korsgaard
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2023-06-05 20:12 UTC (permalink / raw)
  To: Romain Naour; +Cc: Stafford Horne, buildroot

>>>>> "Romain" == Romain Naour <romain.naour@gmail.com> writes:

 > The or1k musl port is incomplete, elf_gregset_t definition is missing
 > (user.h is empty) [1]. It fail to build gdbserver and the full gdb.

 > [1] https://git.musl-libc.org/cgit/musl/tree/arch/or1k/bits/user.h?h=v1.2.3

 > Fixes:
 > https://gitlab.com/buildroot.org/toolchains-builder/-/jobs/4202276569

 > Signed-off-by: Romain Naour <romain.naour@gmail.com>
 > Cc: Stafford Horne <shorne@gmail.com>
 > ---
 > host-gdb build fine but it's useless without a gdbserver on the target.
 > Keep it enabled for now to avoid dependency handling for or1k with musl...

Committed to 2023.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-06-05 20:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-02 21:11 [Buildroot] [PATCH] package/gdb: disable gdb for or1k builds with musl libc Romain Naour
2023-05-07 13:15 ` Yann E. MORIN
2023-06-05 20:12 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox