package/gdb: allow building against python3 for host-gdb
PATCH 1/1 package/gdb: allow building against python3 for host-gdb
Some gdb extensions require python3, so this simply adds a configuration option to point the host GDB at python3.
Signed-off-by Angelos Oikonomopoulos <[email protected]>
--- package/gdb/Config.in.host | 14 ++++++++++++++ package/gdb/gdb.mk | 7 +++++++ 2 files changed, 21 insertions(+)
package/gdb/Config.in.host +14 -0
@@ -37,6 +37,20 @@ config BR2_PACKAGE_HOST_GDB_PYTHON help This option enables the Python support in the cross gdb. +if BR2_PACKAGE_HOST_GDB_PYTHON + +choice BR2_PACKAGE_HOST_GDB_PYTHON_VERSION + prompt "Python version for GDB" + default BR2_PACKAGE_HOST_GDB_PYTHON_VERSION_2 +config BR2_PACKAGE_HOST_GDB_PYTHON_VERSION_2 + bool "python 2.7" +config BR2_PACKAGE_HOST_GDB_PYTHON_VERSION_3 + bool "python 3.8" + select BR2_PACKAGE_HOST_PYTHON3 +endchoice + +endif + config BR2_PACKAGE_HOST_GDB_SIM bool "Simulator support" depends on !BR2_arc
package/gdb/gdb.mk +7 -0
@@ -236,8 +236,15 @@ HOST_GDB_CONF_OPTS += --disable-tui endif ifeq ($(BR2_PACKAGE_HOST_GDB_PYTHON),y) +ifeq ($(BR2_PACKAGE_HOST_GDB_PYTHON_VERSION_2),y) HOST_GDB_CONF_OPTS += --with-python=$(HOST_DIR)/bin/python2 HOST_GDB_DEPENDENCIES += host-python +else ifeq ($(BR2_PACKAGE_HOST_GDB_PYTHON_VERSION_3),y) +HOST_GDB_CONF_OPTS += --with-python=$(HOST_DIR)/bin/python3 +HOST_GDB_DEPENDENCIES += host-python3 +else +$(error Unknown python version selected for GDB) +endif else HOST_GDB_CONF_OPTS += --without-python endif
Signature · 1 line
2.21.1
PATCH 1/1 package/gdb: allow building against python3 for host-gdb
Quoted 8 lines · On Thu, 9 Apr 2020 13:46:38 +0200 Angelos Oikonomopoulos <[email protected]>…
Some gdb extensions require python3, so this simply adds a configuration option to point the host GDB at python3.
Signed-off-by Angelos Oikonomopoulos <[email protected]>--- package/gdb/Config.in.host | 14 ++++++++++++++ package/gdb/gdb.mk | 7 +++++++ 2 files changed, 21 insertions(+)
Thanks a lot Angelos for your contribution. However, we already have a similar patch in our backlog of patches to review and merge:
http://patchwork.ozlabs.org/patch/1259866/
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com