base-files: leds: do reverse lookup in get_dt_led()
[openwrt/staging/chunkeey.git] / toolchain / gdb / Makefile
1 #
2 # Copyright (C) 2006-2020 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=gdb
10 PKG_VERSION:=11.1
11 PKG_RELEASE:=1
12
13 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
14 PKG_SOURCE_URL:=@GNU/gdb
15 PKG_HASH:=cccfcc407b20d343fb320d4a9a2110776dd3165118ffd41f4b1b162340333f94
16 GDB_DIR:=$(PKG_NAME)-$(PKG_VERSION)
17
18 HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(GDB_DIR)
19
20 HOST_BUILD_PARALLEL:=1
21
22 include $(INCLUDE_DIR)/toolchain-build.mk
23
24 HOST_CONFIGURE_VARS += \
25 acx_cv_cc_gcc_supports_ada=false \
26 gdb_cv_func_sigsetjmp=yes
27
28 HOST_CONFIGURE_ARGS = \
29 --prefix=$(TOOLCHAIN_DIR) \
30 --build=$(GNU_HOST_NAME) \
31 --host=$(GNU_HOST_NAME) \
32 --target=$(REAL_GNU_TARGET_NAME) \
33 --with-gmp=$(TOPDIR)/staging_dir/host \
34 --with-mpfr=$(TOPDIR)/staging_dir/host \
35 --with-mpc=$(TOPDIR)/staging_dir/host \
36 --disable-werror \
37 --without-uiout \
38 --enable-tui --disable-gdbtk --without-x \
39 --without-included-gettext \
40 --enable-threads \
41 --with-expat \
42 --disable-unit-tests \
43 --disable-ubsan \
44 --disable-binutils \
45 --disable-ld \
46 --disable-gas \
47 --disable-sim
48
49 ifneq ($(CONFIG_GDB_PYTHON),)
50 HOST_CONFIGURE_ARGS+= --with-python
51 else
52 HOST_CONFIGURE_ARGS+= --without-python
53 endif
54
55 define Host/Install
56 mkdir -p $(TOOLCHAIN_DIR)/bin
57 $(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
58 ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
59 strip $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
60 mkdir -p $(TOOLCHAIN_DIR)/share/gdb
61 -cp -R $(HOST_BUILD_DIR)/gdb/data-directory/python $(TOOLCHAIN_DIR)/share/gdb/
62 cp -R $(HOST_BUILD_DIR)/gdb/data-directory/syscalls $(TOOLCHAIN_DIR)/share/gdb/
63 cp -R $(HOST_BUILD_DIR)/gdb/data-directory/system-gdbinit $(TOOLCHAIN_DIR)/share/gdb/
64 endef
65
66 define Host/Clean
67 rm -rf \
68 $(HOST_BUILD_DIR) \
69 $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb \
70 $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
71 endef
72
73 $(eval $(call HostBuild))