mirror of
				git://git.openwrt.org/openwrt/openwrt.git
				synced 2025-11-03 14:34:27 -05:00 
			
		
		
		
	toolchain: gdb: Add optional python support
Compile gdb with python support optionally. To use the Python support in gdb some extra python files are needed, install them too. While at it also install other shared files which we did not install before. If gdb is built without Python support the python folder does not exists. Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
This commit is contained in:
		
							parent
							
								
									6fb27e8e6d
								
							
						
					
					
						commit
						74417f8b3a
					
				@ -259,6 +259,14 @@ config GDB
 | 
				
			|||||||
	help
 | 
						help
 | 
				
			||||||
	  Enable if you want to build the gdb.
 | 
						  Enable if you want to build the gdb.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					config GDB_PYTHON
 | 
				
			||||||
 | 
						bool
 | 
				
			||||||
 | 
						depends on GDB
 | 
				
			||||||
 | 
						prompt "Build gdb with python binding"
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						help
 | 
				
			||||||
 | 
						  Enable the python bindings for GDB to allow using python in the gdb shell.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
config USE_GLIBC
 | 
					config USE_GLIBC
 | 
				
			||||||
	default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (arc)
 | 
						default y if !TOOLCHAINOPTS && !EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN && (arc)
 | 
				
			||||||
	bool
 | 
						bool
 | 
				
			||||||
 | 
				
			|||||||
@ -36,7 +36,6 @@ HOST_CONFIGURE_ARGS = \
 | 
				
			|||||||
	--without-included-gettext \
 | 
						--without-included-gettext \
 | 
				
			||||||
	--enable-threads \
 | 
						--enable-threads \
 | 
				
			||||||
	--with-expat \
 | 
						--with-expat \
 | 
				
			||||||
	--without-python \
 | 
					 | 
				
			||||||
	--disable-unit-tests \
 | 
						--disable-unit-tests \
 | 
				
			||||||
	--disable-ubsan \
 | 
						--disable-ubsan \
 | 
				
			||||||
	--disable-binutils \
 | 
						--disable-binutils \
 | 
				
			||||||
@ -44,11 +43,21 @@ HOST_CONFIGURE_ARGS = \
 | 
				
			|||||||
	--disable-gas \
 | 
						--disable-gas \
 | 
				
			||||||
	--disable-sim
 | 
						--disable-sim
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					ifneq ($(CONFIG_GDB_PYTHON),)
 | 
				
			||||||
 | 
					  HOST_CONFIGURE_ARGS+= --with-python
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					  HOST_CONFIGURE_ARGS:= --without-python
 | 
				
			||||||
 | 
					endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Host/Install
 | 
					define Host/Install
 | 
				
			||||||
	mkdir -p $(TOOLCHAIN_DIR)/bin
 | 
						mkdir -p $(TOOLCHAIN_DIR)/bin
 | 
				
			||||||
	$(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
 | 
						$(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
 | 
				
			||||||
	ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
 | 
						ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
 | 
				
			||||||
	strip $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
 | 
						strip $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
 | 
				
			||||||
 | 
						mkdir -p $(TOOLCHAIN_DIR)/share/gdb
 | 
				
			||||||
 | 
						-cp -R $(HOST_BUILD_DIR)/gdb/data-directory/python $(TOOLCHAIN_DIR)/share/gdb/
 | 
				
			||||||
 | 
						cp -R $(HOST_BUILD_DIR)/gdb/data-directory/syscalls $(TOOLCHAIN_DIR)/share/gdb/
 | 
				
			||||||
 | 
						cp -R $(HOST_BUILD_DIR)/gdb/data-directory/system-gdbinit $(TOOLCHAIN_DIR)/share/gdb/
 | 
				
			||||||
endef
 | 
					endef
 | 
				
			||||||
 | 
					
 | 
				
			||||||
define Host/Clean
 | 
					define Host/Clean
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user