Skip to contentSkip to conversation

gdb: Rationalise PACKAGECONFIG

PATCH In review Richard Purdie 2 participants 2 messages Feb 14, 2016 – Mar 25, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gdb: Rationalise PACKAGECONFIG

Having two separate PACKAGECONFIG defaults and settings in two separate files is confusing. Move all to the common inc file.

meta/recipes-devtools/gdb/gdb-common.inc +2 -0
index 06272a9..0d28ee4 100644
@@ -45,6 +45,8 @@ EXTRA_OECONF = "--disable-gdbtk --disable-tui --disable-x --disable-werror \
 PACKAGECONFIG ??= "readline"
 # 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,python,python python-codecs"
+PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace"
 
 GDBPROPREFIX = "--program-prefix=''"
 
meta/recipes-devtools/gdb/gdb_7.10.1.bb +0 -4
index cd52e27..f897e12 100644
@@ -3,10 +3,6 @@ require gdb-${PV}.inc
 
 inherit python-dir
 
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python,python python-codecs"
-PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace"
-
 do_configure_prepend() {
 	if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" ]; then
 		cat > ${WORKDIR}/python << EOF
#1 lore raw

Hi Richard,

Quoted 25 lines · Richard Purdie

Having two separate PACKAGECONFIG defaults and settings in two separate files is confusing. Move all to the common inc file.

meta/recipes-devtools/gdb/gdb-common.inc +2 -0
index 06272a9..0d28ee4 100644
@@ -45,6 +45,8 @@ EXTRA_OECONF = "--disable-gdbtk --disable-tui --disable-x --disable-werror \
 PACKAGECONFIG ??= "readline"
 # 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,python,python python-codecs"
+PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace"
 
 GDBPROPREFIX = "--program-prefix=''"
 
meta/recipes-devtools/gdb/gdb_7.10.1.bb +0 -0
index cd52e27..f897e12 100644

meta/recipes-devtools/gdb/gdb_7.10.1.bb require gdb-${PV}.inc · line 8

Quoted 10 lines
meta/recipes-devtools/gdb/gdb_7.10.1.bb +0 -4
@@ -3,10 +3,6 @@ require gdb-${PV}.inc
 
 inherit python-dir
 
-PACKAGECONFIG ??= ""
-PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,python,python python-codecs"
-PACKAGECONFIG[babeltrace] = "--with-babeltrace,--without-babeltrace,babeltrace"
-
 do_configure_prepend() {
        if [ -n "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', '', d)}" ]; then
                cat > ${WORKDIR}/python << EOF

This change causes Python support to not be enabled properly in gdb-cross and gdb-cross-canadian as --without-python is now added to the EXTRA_OECONF after --with-python=...

I have submitted patches to the mailing list to fix this.

Regards,
Jonathan