summaryrefslogtreecommitdiffstats
path: root/toolchain/gdb/Makefile
diff options
context:
space:
mode:
authorHauke Mehrtens <hmehrtens@maxlinear.com>2021-05-28 18:35:40 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2021-06-06 00:26:13 +0200
commit74417f8b3a803c59995887e20437394e1abeaaa2 (patch)
tree951ca6f60a2f4825683d4f4f9918ac37b4055032 /toolchain/gdb/Makefile
parent6fb27e8e6d05ed426f200242fdc1710f6f849127 (diff)
downloadopenwrt-74417f8b3a803c59995887e20437394e1abeaaa2.tar.gz
openwrt-74417f8b3a803c59995887e20437394e1abeaaa2.tar.bz2
openwrt-74417f8b3a803c59995887e20437394e1abeaaa2.zip
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>
Diffstat (limited to 'toolchain/gdb/Makefile')
-rw-r--r--toolchain/gdb/Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile
index 05e3c7de3c..2708eff869 100644
--- a/toolchain/gdb/Makefile
+++ b/toolchain/gdb/Makefile
@@ -36,7 +36,6 @@ HOST_CONFIGURE_ARGS = \
--without-included-gettext \
--enable-threads \
--with-expat \
- --without-python \
--disable-unit-tests \
--disable-ubsan \
--disable-binutils \
@@ -44,11 +43,21 @@ HOST_CONFIGURE_ARGS = \
--disable-gas \
--disable-sim
+ifneq ($(CONFIG_GDB_PYTHON),)
+ HOST_CONFIGURE_ARGS+= --with-python
+else
+ HOST_CONFIGURE_ARGS:= --without-python
+endif
+
define Host/Install
mkdir -p $(TOOLCHAIN_DIR)/bin
$(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
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
define Host/Clean