diff mbox series

[2/2] gdb: Include xz support by default and clean up PACKAGECONFIG

Message ID 20250218152226.1410852-2-richard.purdie@linuxfoundation.org
State Accepted, archived
Commit d6eefdd66171c2bcdeeebc8a9b583c5383c80bf6
Headers show
Series [1/2] base: Fix PACKAGECONFIG handling for cross recipes | expand

Commit Message

Richard Purdie Feb. 18, 2025, 3:22 p.m. UTC
Firstly, just include xz support in all gdb configurations to simplify config.
Most systems would already have the shared library so this isn't a big problem
for a larger debugging tool.

The PACKAGECONFIG duplication is also confusing. The only PACKAGECONFIG which
needs special handking is the python one due to the differing modules needed
in the nativesdk case. Remove all the other duplicate entries which should work
through our usual class extension code.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/recipes-devtools/gdb/gdb-common.inc         | 4 +---
 meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 6 +-----
 meta/recipes-devtools/gdb/gdb-cross.inc          | 4 ----
 3 files changed, 2 insertions(+), 12 deletions(-)

Comments

Etienne Cordonnier Feb. 18, 2025, 3:46 p.m. UTC | #1
Hi Richard,
I've seen that the patch is reverted in master-next. Was an issue
discovered?

Étienne


On Tue, Feb 18, 2025 at 4:22 PM Richard Purdie via lists.openembedded.org
<richard.purdie=linuxfoundation.org@lists.openembedded.org> wrote:

> Firstly, just include xz support in all gdb configurations to simplify
> config.
> Most systems would already have the shared library so this isn't a big
> problem
> for a larger debugging tool.
>
> The PACKAGECONFIG duplication is also confusing. The only PACKAGECONFIG
> which
> needs special handking is the python one due to the differing modules
> needed
> in the nativesdk case. Remove all the other duplicate entries which should
> work
> through our usual class extension code.
>
> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
>  meta/recipes-devtools/gdb/gdb-common.inc         | 4 +---
>  meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 6 +-----
>  meta/recipes-devtools/gdb/gdb-cross.inc          | 4 ----
>  3 files changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/meta/recipes-devtools/gdb/gdb-common.inc
> b/meta/recipes-devtools/gdb/gdb-common.inc
> index ea1fc27a61b..c0312f0f05c 100644
> --- a/meta/recipes-devtools/gdb/gdb-common.inc
> +++ b/meta/recipes-devtools/gdb/gdb-common.inc
> @@ -30,9 +30,7 @@ EXTRA_OECONF = "--disable-gdbtk --disable-x
> --disable-werror \
>                  --with-libgmp-prefix=${STAGING_EXECPREFIXDIR} \
>  "
>
> -PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES',
> 'debuginfod', d)} python \
> -                   ${@bb.utils.contains('DISTRO_FEATURES',
> 'minidebuginfo', 'xz', '', d)} \
> -                  "
> +PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES',
> 'debuginfod', d)} python xz"
>  # Use --without-system-readline to compile with readline 5.
>  PACKAGECONFIG[readline] =
> "--with-system-readline,--without-system-readline,readline"
>  PACKAGECONFIG[python] =
> "--with-python=${WORKDIR}/python,--without-python,python3,python3-codecs"
> diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
> b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
> index 9150c196a85..7b4a7719e44 100644
> --- a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
> +++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
> @@ -12,13 +12,9 @@ DEPENDS = "nativesdk-ncurses nativesdk-expat
> nativesdk-gettext nativesdk-gmp nat
>  GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
>
>  # Overrides PACKAGECONFIG variables in gdb-common.inc
> -PACKAGECONFIG ??= "python readline ${@bb.utils.filter('DISTRO_FEATURES',
> 'debuginfod', d)}"
>  PACKAGECONFIG[python] =
> "--with-python=${WORKDIR}/python,--without-python,nativesdk-python3, \
>                           nativesdk-python3-core \
> -                         nativesdk-python3-codecs
> nativesdk-python3-netclient \
> -                         "
> -PACKAGECONFIG[readline] =
> "--with-system-readline,--without-system-readline,nativesdk-readline"
> -PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod,
> nativesdk-elfutils"
> +                         nativesdk-python3-codecs
> nativesdk-python3-netclient"
>
>  SSTATE_ALLOW_OVERLAP_FILES += "${STAGING_DATADIR}/gdb"
>
> diff --git a/meta/recipes-devtools/gdb/gdb-cross.inc
> b/meta/recipes-devtools/gdb/gdb-cross.inc
> index 399f4bba97a..110a536db72 100644
> --- a/meta/recipes-devtools/gdb/gdb-cross.inc
> +++ b/meta/recipes-devtools/gdb/gdb-cross.inc
> @@ -4,11 +4,7 @@ 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"
>
>  do_compile:prepend() {
>      export STAGING_LIBDIR="${STAGING_LIBDIR_NATIVE}"
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#211629):
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_g_openembedded-2Dcore_message_211629&d=DwIFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=-grp2Hw5YGFRTHvkycAWrFmUjldRg_rcEJFxKxXFVceWKtghvEjBS2qH8LuVsWpf&s=ejI0vbxFm_uIs7vDFnxMONoR1dQqerFBxsgqvirIg5w&e=
> Mute This Topic:
> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.openembedded.org_mt_111252056_7048771&d=DwIFaQ&c=ncDTmphkJTvjIDPh0hpF_4vCHvabgGkICC2epckfdiw&r=AhkbNonVuMIGRfPx_Qj9TsRih1DULJTKUkSGa66m67E&m=-grp2Hw5YGFRTHvkycAWrFmUjldRg_rcEJFxKxXFVceWKtghvEjBS2qH8LuVsWpf&s=yUKWvZDz8t12LWkKRErnsTMx2ggprRrXtXcSPchfGMQ&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=-grp2Hw5YGFRTHvkycAWrFmUjldRg_rcEJFxKxXFVceWKtghvEjBS2qH8LuVsWpf&s=5zixhZvdEIdbPjYGLRifFWUkGmc5NFns0shvwHFHvT4&e=
> [ecordonnier@snap.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Richard Purdie Feb. 18, 2025, 4:50 p.m. UTC | #2
On Tue, 2025-02-18 at 16:46 +0100, Etienne Cordonnier wrote:
> Hi Richard,
> I've seen that the patch is reverted in master-next. Was an issue
> discovered?

Yes, it failed in testing. I've added a new version though so hopefully
better this time.

Cheers,

Richard
diff mbox series

Patch

diff --git a/meta/recipes-devtools/gdb/gdb-common.inc b/meta/recipes-devtools/gdb/gdb-common.inc
index ea1fc27a61b..c0312f0f05c 100644
--- a/meta/recipes-devtools/gdb/gdb-common.inc
+++ b/meta/recipes-devtools/gdb/gdb-common.inc
@@ -30,9 +30,7 @@  EXTRA_OECONF = "--disable-gdbtk --disable-x --disable-werror \
                 --with-libgmp-prefix=${STAGING_EXECPREFIXDIR} \
 "
 
-PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)} python \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'minidebuginfo', 'xz', '', d)} \
-                  "
+PACKAGECONFIG ??= "readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)} python xz"
 # Use --without-system-readline to compile with readline 5.
 PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,readline"
 PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python3,python3-codecs"
diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index 9150c196a85..7b4a7719e44 100644
--- a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -12,13 +12,9 @@  DEPENDS = "nativesdk-ncurses nativesdk-expat nativesdk-gettext nativesdk-gmp nat
 GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
 
 # Overrides PACKAGECONFIG variables in gdb-common.inc
-PACKAGECONFIG ??= "python readline ${@bb.utils.filter('DISTRO_FEATURES', 'debuginfod', d)}"
 PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,nativesdk-python3, \
                          nativesdk-python3-core \
-                         nativesdk-python3-codecs nativesdk-python3-netclient \
-                         "
-PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,nativesdk-readline"
-PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod, nativesdk-elfutils"
+                         nativesdk-python3-codecs nativesdk-python3-netclient"
 
 SSTATE_ALLOW_OVERLAP_FILES += "${STAGING_DATADIR}/gdb"
 
diff --git a/meta/recipes-devtools/gdb/gdb-cross.inc b/meta/recipes-devtools/gdb/gdb-cross.inc
index 399f4bba97a..110a536db72 100644
--- a/meta/recipes-devtools/gdb/gdb-cross.inc
+++ b/meta/recipes-devtools/gdb/gdb-cross.inc
@@ -4,11 +4,7 @@  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"
 
 do_compile:prepend() {
     export STAGING_LIBDIR="${STAGING_LIBDIR_NATIVE}"