d3f1e8c0aad2f6c6b2626c8eaa9a7243a855b90a
[openwrt.git] / toolchain / gdb / Makefile
1 #
2 # Copyright (C) 2006-2013 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:=7.8
11
12 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
13 PKG_SOURCE_URL:=@GNU/gdb
14 PKG_MD5SUM:=bd958fe9019d7c7896f29f6724a764ed
15
16 HOST_BUILD_PARALLEL:=1
17
18 include $(INCLUDE_DIR)/toolchain-build.mk
19
20 define Host/Configure
21         (cd $(HOST_BUILD_DIR); \
22                 gdb_cv_func_sigsetjmp=yes \
23                 CFLAGS="-O2" \
24                 $(HOST_BUILD_DIR)/configure \
25                 --prefix=$(TOOLCHAIN_DIR) \
26                 --build=$(GNU_HOST_NAME) \
27                 --host=$(GNU_HOST_NAME) \
28                 --target=$(REAL_GNU_TARGET_NAME) \
29                 --disable-werror \
30                 --without-uiout \
31                 --disable-tui --disable-gdbtk --without-x \
32                 --without-included-gettext \
33                 --enable-threads \
34         );
35 endef
36
37 define Host/Install
38         mkdir -p $(TOOLCHAIN_DIR)/bin
39         $(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
40         ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
41         strip $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
42 endef
43
44 define Host/Clean
45         rm -rf \
46                 $(HOST_BUILD_DIR) \
47                 $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb \
48                 $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
49 endef
50
51 $(eval $(call HostBuild))