Sfoglia il codice sorgente

package/gdb: remove python2 support

Since at least gdb 7.8, python3 support has been available. As part of
the progressive retiring of python2 support, it is time to drop its
support in gdb by:

- Removing BR2_PACKAGE_HOST_GDB_PYTHON in package/gdb/Config.in.host
  and removing the choice to leave just a BR2_PACKAGE_HOST_GDB_PYTHON3
  option.

- Adding BR2_PACKAGE_HOST_GDB_PYTHON to Config.in.legacy

- Changing depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3 to
  depends on BR2_PACKAGE_PYTHON3 in package/gdb/Config.in

Signed-off-by: Adam Duskett <aduskett@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Adam Duskett 3 anni fa
parent
commit
a607efc6d3
4 ha cambiato i file con 10 aggiunte e 31 eliminazioni
  1. 7 0
      Config.in.legacy
  2. 1 1
      package/gdb/Config.in
  3. 1 19
      package/gdb/Config.in.host
  4. 1 11
      package/gdb/gdb.mk

+ 7 - 0
Config.in.legacy

@@ -146,6 +146,13 @@ endif
 
 comment "Legacy options removed in 2022.02"
 
+config BR2_PACKAGE_HOST_GDB_PYTHON
+	bool "GDB Python2 support removed"
+	select BR2_LEGACY
+	help
+	  Python2 is deprecated and no longer supported.
+	  Please migrate to Python3.
+
 config BR2_PACKAGE_GSTREAMER1_MM
 	bool "gstreamer1-mm package removed"
 	select BR2_LEGACY

+ 1 - 1
package/gdb/Config.in

@@ -77,7 +77,7 @@ config BR2_PACKAGE_GDB_TUI
 
 config BR2_PACKAGE_GDB_PYTHON
 	bool "Python support"
-	depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
+	depends on BR2_PACKAGE_PYTHON3
 	help
 	  This option enables Python support in the target gdb.
 

+ 1 - 19
package/gdb/Config.in.host

@@ -30,29 +30,11 @@ config BR2_PACKAGE_HOST_GDB_TUI
 	help
 	  This option enables terminal user interface (TUI) for gdb
 
-choice
-	prompt "Python support"
-	default BR2_PACKAGE_HOST_GDB_NOPYTHON
-	help
-	  Select the version of Python you wish to use
-
-config BR2_PACKAGE_HOST_GDB_NOPYTHON
-	bool "None"
-	help
-	  This option disables Python support in the cross gdb.
-
-config BR2_PACKAGE_HOST_GDB_PYTHON
-	bool "Python 2"
-	help
-	  This option enables the Python 2 support in the cross gdb.
-
 config BR2_PACKAGE_HOST_GDB_PYTHON3
-	bool "Python 3"
+	bool "Python support"
 	help
 	  This option enables the Python 3 support in the cross gdb.
 
-endchoice
-
 config BR2_PACKAGE_HOST_GDB_SIM
 	bool "Simulator support"
 	depends on !BR2_arc

+ 1 - 11
package/gdb/gdb.mk

@@ -201,17 +201,10 @@ GDB_CONF_OPTS += --disable-tui
 endif
 
 ifeq ($(BR2_PACKAGE_GDB_PYTHON),y)
-ifeq ($(BR2_PACKAGE_PYTHON3),y)
 # CONF_ENV: for top-level configure; MAKE_ENV: for sub-projects' configure.
 GDB_CONF_ENV += BR_PYTHON_VERSION=$(PYTHON3_VERSION_MAJOR)
 GDB_MAKE_ENV += BR_PYTHON_VERSION=$(PYTHON3_VERSION_MAJOR)
 GDB_DEPENDENCIES += python3
-else
-# CONF_ENV: for top-level configure; MAKE_ENV: for sub-projects' configure.
-GDB_CONF_ENV += BR_PYTHON_VERSION=$(PYTHON_VERSION_MAJOR)
-GDB_MAKE_ENV += BR_PYTHON_VERSION=$(PYTHON_VERSION_MAJOR)
-GDB_DEPENDENCIES += python
-endif
 GDB_CONF_OPTS += --with-python=$(TOPDIR)/package/gdb/gdb-python-config
 else
 GDB_CONF_OPTS += --without-python
@@ -287,10 +280,7 @@ else
 HOST_GDB_CONF_OPTS += --disable-tui
 endif
 
-ifeq ($(BR2_PACKAGE_HOST_GDB_PYTHON),y)
-HOST_GDB_CONF_OPTS += --with-python=$(HOST_DIR)/bin/python2
-HOST_GDB_DEPENDENCIES += host-python
-else ifeq ($(BR2_PACKAGE_HOST_GDB_PYTHON3),y)
+ifeq ($(BR2_PACKAGE_HOST_GDB_PYTHON3),y)
 HOST_GDB_CONF_OPTS += --with-python=$(HOST_DIR)/bin/python3
 HOST_GDB_DEPENDENCIES += host-python3
 else