2 # Copyright (C) 2006-2020 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
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
)
18 HOST_BUILD_DIR
:=$(BUILD_DIR_TOOLCHAIN
)/$(GDB_DIR
)
20 HOST_BUILD_PARALLEL
:=1
22 include $(INCLUDE_DIR
)/toolchain-build.mk
24 HOST_CONFIGURE_VARS
+= \
25 acx_cv_cc_gcc_supports_ada
=false \
26 gdb_cv_func_sigsetjmp
=yes
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 \
38 --enable-tui
--disable-gdbtk
--without-x \
39 --without-included-gettext \
42 --disable-unit-tests \
49 ifneq ($(CONFIG_GDB_PYTHON
),)
50 HOST_CONFIGURE_ARGS
+= --with-python
52 HOST_CONFIGURE_ARGS
+= --without-python
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
/
69 $(TOOLCHAIN_DIR
)/bin
/$(TARGET_CROSS
)gdb \
70 $(TOOLCHAIN_DIR
)/bin
/$(GNU_TARGET_NAME
)-gdb
73 $(eval
$(call HostBuild
))