All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gdb-cross: remove duplicated PACKAGECONFIG
@ 2025-02-10 15:49 ecordonnier
  2025-02-10 16:21 ` [OE-core] " Richard Purdie
  0 siblings, 1 reply; 5+ messages in thread
From: ecordonnier @ 2025-02-10 15:49 UTC (permalink / raw)
  To: openembedded-core; +Cc: Etienne Cordonnier

From: Etienne Cordonnier <ecordonnier@snap.com>

Duplicating the PACKAGECONFIG variable in gdb-cross and gdb-common makes
it easy to forget updating one definition without updating the other.
However at the moment there is no need for two different definitions.

xz is also useful for gdb-cross when minidebuginfo is enabled, so it also needs
to be in the definition of PACKAGECONFIG in gdb-cross.inc

Let's remove the definition from gdb-cross.inc to make maintenance easier.
This enables xz for gdb-cross as side-effect.

Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
---
 meta/recipes-devtools/gdb/gdb-cross.inc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/meta/recipes-devtools/gdb/gdb-cross.inc b/meta/recipes-devtools/gdb/gdb-cross.inc
index 399f4bba97a..4f16deabe3e 100644
--- a/meta/recipes-devtools/gdb/gdb-cross.inc
+++ b/meta/recipes-devtools/gdb/gdb-cross.inc
@@ -5,7 +5,6 @@ DEPENDS = "expat-native gmp-native mpfr-native ncurses-native flex-native bison-
 inherit python3native pkgconfig
 
 # Overrides PACKAGECONFIG variables in gdb-common.inc
-PACKAGECONFIG ??= "python readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}"
 PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3-native"
 PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline-native"
 PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, elfutils-native"
-- 
2.43.0



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

* Re: [OE-core] [PATCH] gdb-cross: remove duplicated PACKAGECONFIG
       [not found] <1822E38F637F1A4A.703@lists.openembedded.org>
@ 2025-02-10 15:57 ` Etienne Cordonnier
  0 siblings, 0 replies; 5+ messages in thread
From: Etienne Cordonnier @ 2025-02-10 15:57 UTC (permalink / raw)
  To: ecordonnier; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 3883 bytes --]

Hi,
I was hesitating a bit for this patch: typically when building gdb-cross
there is no space constraint on the host where gdb-cross runs (a desktop PC
/ laptop, etc), so we could keep the separated definition of PACKAGECONFIG,
and enable xz and minidebuginfod for gdb-cross per default and avoid
requiring a rebuild of gdb-cross depending on which DISTRO_FEATURES is
enabled.

This is especially true because when debugging with gdb-cross, a lot of
libraries can get loaded, and the error message indicating the lack of lzma
support / minidebuginfo is easy to miss, and gdb even reports that symbols
are loaded when using "info sharedlibrary", because minidebuginfo symbols
are not the "main" symbols, making it even more confusing.

On the other hand there are corner-cases where gdb-cross runs on some kind
of embedded X86 SBC / mini-pc, and where there could be some size
constraints.

What do you think?

Étienne

On Mon, Feb 10, 2025 at 4:50 PM Etienne Cordonnier via
lists.openembedded.org <ecordonnier=snap.com@lists.openembedded.org> wrote:

> From: Etienne Cordonnier <ecordonnier@snap.com>
>
> Duplicating the PACKAGECONFIG variable in gdb-cross and gdb-common makes
> it easy to forget updating one definition without updating the other.
> However at the moment there is no need for two different definitions.
>
> xz is also useful for gdb-cross when minidebuginfo is enabled, so it also
> needs
> to be in the definition of PACKAGECONFIG in gdb-cross.inc
>
> Let's remove the definition from gdb-cross.inc to make maintenance easier.
> This enables xz for gdb-cross as side-effect.
>
> Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
> ---
>  meta/recipes-devtools/gdb/gdb-cross.inc | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/meta/recipes-devtools/gdb/gdb-cross.inc
> b/meta/recipes-devtools/gdb/gdb-cross.inc
> index 399f4bba97a..4f16deabe3e 100644
> --- a/meta/recipes-devtools/gdb/gdb-cross.inc
> +++ b/meta/recipes-devtools/gdb/gdb-cross.inc
> @@ -5,7 +5,6 @@ DEPENDS = "expat-native gmp-native mpfr-native
> ncurses-native flex-native bison-
>  inherit python3native pkgconfig
>
>  # Overrides PACKAGECONFIG variables in gdb-common.inc
> -PACKAGECONFIG ??= "python readline ${@bb.utils.filter('DISTRO_FEATURES',
> 'debuginfod', d)}"
>  PACKAGECONFIG[python] =
> "--with-python=${PYTHON},--without-python,python3-native"
>  PACKAGECONFIG[readline] =
> "--with-system-readline,--without-system-readline,readline-native"
>  PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod,
> elfutils-native"
> --
> 2.43.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#211099):
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_openembedded-2Dcore_message_211099&d=DwIFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=oSIbflHDGXCKOEtGdeTw0NoVMfB4MNzVnlH24PhVxHu1FqyeKZyzmE5d8tWFu1Uh&s=uEf_KRP3T_J05Xw0q-gEJ9Hfy-sKi3qFqRvO-r5Pb9E&e=
> Mute This Topic:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_mt_111104210_7048771&d=DwIFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=oSIbflHDGXCKOEtGdeTw0NoVMfB4MNzVnlH24PhVxHu1FqyeKZyzmE5d8tWFu1Uh&s=ZRFn5FiVLbIlO9SBIRGTceI69NCc5GtUrsR7CQ_ikd0&e=
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_openembedded-2Dcore_unsub&d=DwIFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=oSIbflHDGXCKOEtGdeTw0NoVMfB4MNzVnlH24PhVxHu1FqyeKZyzmE5d8tWFu1Uh&s=yqZIDTsDedhsAzvWHG7pwQTpvDNru18T6BiYoUkVgt0&e=
> [ecordonnier@snap.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

[-- Attachment #2: Type: text/html, Size: 5916 bytes --]

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

* Re: [OE-core] [PATCH] gdb-cross: remove duplicated PACKAGECONFIG
  2025-02-10 15:49 [PATCH] gdb-cross: remove duplicated PACKAGECONFIG ecordonnier
@ 2025-02-10 16:21 ` Richard Purdie
  2025-02-10 17:30   ` Khem Raj
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Purdie @ 2025-02-10 16:21 UTC (permalink / raw)
  To: ecordonnier, openembedded-core

On Mon, 2025-02-10 at 16:49 +0100, Etienne Cordonnier via lists.openembedded.org wrote:
> From: Etienne Cordonnier <ecordonnier@snap.com>
> 
> Duplicating the PACKAGECONFIG variable in gdb-cross and gdb-common makes
> it easy to forget updating one definition without updating the other.
> However at the moment there is no need for two different definitions.
> 
> xz is also useful for gdb-cross when minidebuginfo is enabled, so it also needs
> to be in the definition of PACKAGECONFIG in gdb-cross.inc
> 
> Let's remove the definition from gdb-cross.inc to make maintenance easier.
> This enables xz for gdb-cross as side-effect.
> 
> Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
> ---
>  meta/recipes-devtools/gdb/gdb-cross.inc | 1 -
>  1 file changed, 1 deletion(-)

At the very least this commit message needs to be a bit clearer as
there is a change of behaviour here.

To be clear, this change adds:

${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'xz', '', d)} 

to the default PACKAGECONFIG for gdb-cross. You can't tell that from
the patch.

I'd also mention that there is still a different definition for gdb-
cross-canadian and if we do this, they should all probably match.

Whether we should do this, I'm unsure. It might be worth just adding xz
unconditionally at this point by default to be honest, it isn't a huge
dependency. gdb is a debugging tool, not for a minimal system.

Cheers,

Richard


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

* Re: [OE-core] [PATCH] gdb-cross: remove duplicated PACKAGECONFIG
  2025-02-10 16:21 ` [OE-core] " Richard Purdie
@ 2025-02-10 17:30   ` Khem Raj
  2025-02-10 18:20     ` Etienne Cordonnier
  0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2025-02-10 17:30 UTC (permalink / raw)
  To: richard.purdie; +Cc: ecordonnier, openembedded-core

On Mon, Feb 10, 2025 at 8:21 AM Richard Purdie via
lists.openembedded.org
<richard.purdie=linuxfoundation.org@lists.openembedded.org> wrote:
>
> On Mon, 2025-02-10 at 16:49 +0100, Etienne Cordonnier via lists.openembedded.org wrote:
> > From: Etienne Cordonnier <ecordonnier@snap.com>
> >
> > Duplicating the PACKAGECONFIG variable in gdb-cross and gdb-common makes
> > it easy to forget updating one definition without updating the other.
> > However at the moment there is no need for two different definitions.
> >
> > xz is also useful for gdb-cross when minidebuginfo is enabled, so it also needs
> > to be in the definition of PACKAGECONFIG in gdb-cross.inc
> >
> > Let's remove the definition from gdb-cross.inc to make maintenance easier.
> > This enables xz for gdb-cross as side-effect.
> >
> > Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
> > ---
> >  meta/recipes-devtools/gdb/gdb-cross.inc | 1 -
> >  1 file changed, 1 deletion(-)
>
> At the very least this commit message needs to be a bit clearer as
> there is a change of behaviour here.
>
> To be clear, this change adds:
>
> ${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'xz', '', d)}
>
> to the default PACKAGECONFIG for gdb-cross. You can't tell that from
> the patch.
>
> I'd also mention that there is still a different definition for gdb-
> cross-canadian and if we do this, they should all probably match.
>
> Whether we should do this, I'm unsure. It might be worth just adding xz
> unconditionally at this point by default to be honest, it isn't a huge
> dependency. gdb is a debugging tool, not for a minimal system.

target gdb where the size and dependencies might matter, for cross and
cross-canadian
IIRC it won't matter as much from size perspective. we can let the
defaults be controlled from
bb itself or from inc and then add/remove as needed in bb files.
Status quo is a mix of both
so we should do something. Perhaps this patch with updated commit log
is a good one

>
> Cheers,
>
> Richard
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#211104): https://lists.openembedded.org/g/openembedded-core/message/211104
> Mute This Topic: https://lists.openembedded.org/mt/111104210/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


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

* Re: [OE-core] [PATCH] gdb-cross: remove duplicated PACKAGECONFIG
  2025-02-10 17:30   ` Khem Raj
@ 2025-02-10 18:20     ` Etienne Cordonnier
  0 siblings, 0 replies; 5+ messages in thread
From: Etienne Cordonnier @ 2025-02-10 18:20 UTC (permalink / raw)
  To: Khem Raj; +Cc: richard.purdie, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 3998 bytes --]

> To be clear, this change adds:
>
> ${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'xz', '', d)}
>
> to the default PACKAGECONFIG for gdb-cross. You can't tell that from
> the patch.

That's what I was referring to in the commit message with "This enables xz
for gdb-cross as side-effect.", but I've reworded it now so that it is
hopefully clearer.
I've sent a new version of the patch as "[PATCH v2] gdb: enable xz in
gdb-cross and gdb-cross-canadian"

Étienne

On Mon, Feb 10, 2025 at 6:31 PM Khem Raj <raj.khem@gmail.com> wrote:

> On Mon, Feb 10, 2025 at 8:21 AM Richard Purdie via
> lists.openembedded.org
> <richard.purdie=linuxfoundation.org@lists.openembedded.org> wrote:
> >
> > On Mon, 2025-02-10 at 16:49 +0100, Etienne Cordonnier via
> lists.openembedded.org wrote:
> > > From: Etienne Cordonnier <ecordonnier@snap.com>
> > >
> > > Duplicating the PACKAGECONFIG variable in gdb-cross and gdb-common
> makes
> > > it easy to forget updating one definition without updating the other.
> > > However at the moment there is no need for two different definitions.
> > >
> > > xz is also useful for gdb-cross when minidebuginfo is enabled, so it
> also needs
> > > to be in the definition of PACKAGECONFIG in gdb-cross.inc
> > >
> > > Let's remove the definition from gdb-cross.inc to make maintenance
> easier.
> > > This enables xz for gdb-cross as side-effect.
> > >
> > > Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
> > > ---
> > >  meta/recipes-devtools/gdb/gdb-cross.inc | 1 -
> > >  1 file changed, 1 deletion(-)
> >
> > At the very least this commit message needs to be a bit clearer as
> > there is a change of behaviour here.
> >
> > To be clear, this change adds:
> >
> > ${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'xz', '', d)}
> >
> > to the default PACKAGECONFIG for gdb-cross. You can't tell that from
> > the patch.
> >
> > I'd also mention that there is still a different definition for gdb-
> > cross-canadian and if we do this, they should all probably match.
> >
> > Whether we should do this, I'm unsure. It might be worth just adding xz
> > unconditionally at this point by default to be honest, it isn't a huge
> > dependency. gdb is a debugging tool, not for a minimal system.
>
> target gdb where the size and dependencies might matter, for cross and
> cross-canadian
> IIRC it won't matter as much from size perspective. we can let the
> defaults be controlled from
> bb itself or from inc and then add/remove as needed in bb files.
> Status quo is a mix of both
> so we should do something. Perhaps this patch with updated commit log
> is a good one
>
> >
> > Cheers,
> >
> > Richard
> >
> > -=-=-=-=-=-=-=-=-=-=-=-
> > Links: You receive all messages sent to this group.
> > View/Reply Online (#211104):
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_openembedded-2Dcore_message_211104&d=DwIFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=B9ScRVJzxS9xTwss3tO6LOaEc25WeGEM_0kgqZqT1CxQ8-mnKsbdAMJWNa1exXOj&s=6q0oPee_RTrM7WSHcfvWsw3iIjGaAulZ0SKtycMXofQ&e=
> > Mute This Topic:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_mt_111104210_1997914&d=DwIFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=B9ScRVJzxS9xTwss3tO6LOaEc25WeGEM_0kgqZqT1CxQ8-mnKsbdAMJWNa1exXOj&s=yfjmYBaSzY87H0_XcTS-BwM3HH6O9x6XrowE4qs0AiE&e=
> > Group Owner: openembedded-core+owner@lists.openembedded.org
> > Unsubscribe:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_openembedded-2Dcore_unsub&d=DwIFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=B9ScRVJzxS9xTwss3tO6LOaEc25WeGEM_0kgqZqT1CxQ8-mnKsbdAMJWNa1exXOj&s=LzjhLaGMsXHO9k8oG2EZBslP7bQuVNQresguoGJre7E&e=
> [raj.khem@gmail.com]
> > -=-=-=-=-=-=-=-=-=-=-=-
> >
>

[-- Attachment #2: Type: text/html, Size: 6508 bytes --]

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

end of thread, other threads:[~2025-02-10 18:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-10 15:49 [PATCH] gdb-cross: remove duplicated PACKAGECONFIG ecordonnier
2025-02-10 16:21 ` [OE-core] " Richard Purdie
2025-02-10 17:30   ` Khem Raj
2025-02-10 18:20     ` Etienne Cordonnier
     [not found] <1822E38F637F1A4A.703@lists.openembedded.org>
2025-02-10 15:57 ` Etienne Cordonnier

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.