From 8f76b317f7e1c8700fbf6cea7d1c7563f8f5d738 Mon Sep 17 00:00:00 2001 From: nbd Date: Tue, 13 Jan 2009 16:27:51 +0000 Subject: replace the gdbserver package with a full gdb package that also includes gdbserver git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14024 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- package/gdb/Makefile | 66 ++++++ package/gdb/patches/100-native_readline.patch | 322 ++++++++++++++++++++++++++ 2 files changed, 388 insertions(+) create mode 100644 package/gdb/Makefile create mode 100644 package/gdb/patches/100-native_readline.patch (limited to 'package/gdb') diff --git a/package/gdb/Makefile b/package/gdb/Makefile new file mode 100644 index 000000000..a2d5c8534 --- /dev/null +++ b/package/gdb/Makefile @@ -0,0 +1,66 @@ +# Copyright (C) 2006 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id$ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=gdb +PKG_VERSION:=6.3 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_MD5SUM:=05b928f41fa5b482e49ca2c24762a0ae +PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/gdb +PKG_CAT:=bzcat + +include $(INCLUDE_DIR)/package.mk + +define Package/gdb + SECTION:=utils + CATEGORY:=Utilities + DEPENDS:=+libreadline +libncurses + TITLE:=GNU Debugger +endef + +define Package/gdbserver + SECTION:=utils + CATEGORY:=Utilities + TITLE:=Remote server for GNU Debugger +endef + +define Package/gdb/description + GNU debugger +endef + +define Package/gdbserver/description + GDBSERVER is a program that allows you to run GDB on a different machine + than the one which is running the program being debugged. +endef + +TARGET_CPPFLAGS += -I$(STAGING_DIR)/usr/include +TARGET_LDFLAGS += -L$(STAGING_DIR)/usr/lib + +export ac_cv_search_tgetent=$(TARGET_LDFLAGS) -lncurses -lreadline + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all install-gdb +endef + +define Package/gdb/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdb $(1)/usr/bin/ +endef + +define Package/gdbserver/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gdb $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,gdb)) +$(eval $(call BuildPackage,gdbserver)) + diff --git a/package/gdb/patches/100-native_readline.patch b/package/gdb/patches/100-native_readline.patch new file mode 100644 index 000000000..cbd9022c9 --- /dev/null +++ b/package/gdb/patches/100-native_readline.patch @@ -0,0 +1,322 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -15590,236 +15590,40 @@ maintainer-clean-rcs: + + + .PHONY: configure-readline maybe-configure-readline +-maybe-configure-readline: +-@if readline +-maybe-configure-readline: configure-readline +-configure-readline: +- @test ! -f readline/Makefile || exit 0; \ +- [ -d readline ] || mkdir readline; \ +- r=`${PWD_COMMAND}`; export r; \ +- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ +- $(HOST_EXPORTS) \ +- echo Configuring in readline; \ +- cd readline || exit 1; \ +- case $(srcdir) in \ +- \.) \ +- srcdiroption="--srcdir=."; \ +- libsrcdir=".";; \ +- /* | [A-Za-z]:[\\/]*) \ +- srcdiroption="--srcdir=$(srcdir)/readline"; \ +- libsrcdir="$$s/readline";; \ +- *) \ +- srcdiroption="--srcdir=../$(srcdir)/readline"; \ +- libsrcdir="$$s/readline";; \ +- esac; \ +- $(SHELL) $${libsrcdir}/configure \ +- $(HOST_CONFIGARGS) $${srcdiroption} \ +- || exit 1 +-@endif readline ++maybe-configure-readline: ; + + .PHONY: all-readline maybe-all-readline +-maybe-all-readline: +-@if readline +-TARGET-readline=all +-maybe-all-readline: all-readline +-all-readline: configure-readline +- @r=`${PWD_COMMAND}`; export r; \ +- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ +- $(SET_LIB_PATH) \ +- $(HOST_EXPORTS) \ +- (cd readline && $(MAKE) $(FLAGS_TO_PASS) \ +- $(TARGET-readline)) +-@endif readline ++maybe-all-readline: ; + + .PHONY: check-readline maybe-check-readline +-maybe-check-readline: +-@if readline +-maybe-check-readline: check-readline +- +-check-readline: +- @r=`${PWD_COMMAND}`; export r; \ +- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ +- $(SET_LIB_PATH) \ +- $(HOST_EXPORTS) \ +- (cd readline && $(MAKE) $(FLAGS_TO_PASS) check) +- +-@endif readline ++maybe-check-readline: ; + + .PHONY: install-readline maybe-install-readline +-maybe-install-readline: +-@if readline +-maybe-install-readline: install-readline +- +-install-readline: installdirs +- @r=`${PWD_COMMAND}`; export r; \ +- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ +- $(SET_LIB_PATH) \ +- $(HOST_EXPORTS) \ +- (cd readline && $(MAKE) $(FLAGS_TO_PASS) install) +- +-@endif readline ++maybe-install-readline: ; + + # Other targets (info, dvi, etc.) + + .PHONY: maybe-info-readline info-readline +-maybe-info-readline: +-@if readline +-maybe-info-readline: info-readline +- +-info-readline: \ +- configure-readline +- @[ -f ./readline/Makefile ] || exit 0; \ +- r=`${PWD_COMMAND}`; export r; \ +- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ +- $(SET_LIB_PATH) \ +- $(HOST_EXPORTS) \ +- for flag in $(EXTRA_HOST_FLAGS) ; do \ +- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ +- done; \ +- echo "Doing info in readline" ; \ +- (cd readline && \ +- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ +- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ +- "RANLIB=$${RANLIB}" \ +- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ +- info) \ +- || exit 1 +- +-@endif readline ++maybe-info-readline: ; + + .PHONY: maybe-dvi-readline dvi-readline +-maybe-dvi-readline: +-@if readline +-maybe-dvi-readline: dvi-readline +- +-dvi-readline: \ +- configure-readline +- @[ -f ./readline/Makefile ] || exit 0; \ +- r=`${PWD_COMMAND}`; export r; \ +- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ +- $(SET_LIB_PATH) \ +- $(HOST_EXPORTS) \ +- for flag in $(EXTRA_HOST_FLAGS) ; do \ +- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ +- done; \ +- echo "Doing dvi in readline" ; \ +- (cd readline && \ +- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ +- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ +- "RANLIB=$${RANLIB}" \ +- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ +- dvi) \ +- || exit 1 +- +-@endif readline ++maybe-dvi-readline: ; + + .PHONY: maybe-TAGS-readline TAGS-readline +-maybe-TAGS-readline: +-@if readline +-maybe-TAGS-readline: TAGS-readline +- +-TAGS-readline: \ +- configure-readline +- @[ -f ./readline/Makefile ] || exit 0; \ +- r=`${PWD_COMMAND}`; export r; \ +- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ +- $(SET_LIB_PATH) \ +- $(HOST_EXPORTS) \ +- for flag in $(EXTRA_HOST_FLAGS) ; do \ +- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ +- done; \ +- echo "Doing TAGS in readline" ; \ +- (cd readline && \ +- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ +- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ +- "RANLIB=$${RANLIB}" \ +- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ +- TAGS) \ +- || exit 1 +- +-@endif readline ++maybe-TAGS-readline: ; + + .PHONY: maybe-install-info-readline install-info-readline +-maybe-install-info-readline: +-@if readline +-maybe-install-info-readline: install-info-readline +- +-install-info-readline: \ +- configure-readline \ +- info-readline +- @[ -f ./readline/Makefile ] || exit 0; \ +- r=`${PWD_COMMAND}`; export r; \ +- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ +- $(SET_LIB_PATH) \ +- $(HOST_EXPORTS) \ +- for flag in $(EXTRA_HOST_FLAGS) ; do \ +- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ +- done; \ +- echo "Doing install-info in readline" ; \ +- (cd readline && \ +- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ +- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ +- "RANLIB=$${RANLIB}" \ +- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ +- install-info) \ +- || exit 1 +- +-@endif readline ++maybe-install-info-readline: ; + + .PHONY: maybe-installcheck-readline installcheck-readline +-maybe-installcheck-readline: +-@if readline +-maybe-installcheck-readline: installcheck-readline +- +-installcheck-readline: \ +- configure-readline +- @[ -f ./readline/Makefile ] || exit 0; \ +- r=`${PWD_COMMAND}`; export r; \ +- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ +- $(SET_LIB_PATH) \ +- $(HOST_EXPORTS) \ +- for flag in $(EXTRA_HOST_FLAGS) ; do \ +- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ +- done; \ +- echo "Doing installcheck in readline" ; \ +- (cd readline && \ +- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ +- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ +- "RANLIB=$${RANLIB}" \ +- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ +- installcheck) \ +- || exit 1 +- +-@endif readline ++maybe-installcheck-readline: ; + + .PHONY: maybe-mostlyclean-readline mostlyclean-readline +-maybe-mostlyclean-readline: +-@if readline +-maybe-mostlyclean-readline: mostlyclean-readline +- +-mostlyclean-readline: +- @[ -f ./readline/Makefile ] || exit 0; \ +- r=`${PWD_COMMAND}`; export r; \ +- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ +- $(SET_LIB_PATH) \ +- $(HOST_EXPORTS) \ +- for flag in $(EXTRA_HOST_FLAGS) ; do \ +- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ +- done; \ +- echo "Doing mostlyclean in readline" ; \ +- (cd readline && \ +- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ +- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ +- "RANLIB=$${RANLIB}" \ +- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ +- mostlyclean) \ +- || exit 1 +- +-@endif readline ++maybe-mostlyclean-readline: ; + + .PHONY: maybe-clean-readline clean-readline +-maybe-clean-readline: +-@if readline ++maybe-clean-readline: ; ++@if readline-disabled + maybe-clean-readline: clean-readline + + clean-readline: +@@ -15844,53 +15648,9 @@ clean-readline: + + .PHONY: maybe-distclean-readline distclean-readline + maybe-distclean-readline: +-@if readline +-maybe-distclean-readline: distclean-readline +- +-distclean-readline: +- @[ -f ./readline/Makefile ] || exit 0; \ +- r=`${PWD_COMMAND}`; export r; \ +- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ +- $(SET_LIB_PATH) \ +- $(HOST_EXPORTS) \ +- for flag in $(EXTRA_HOST_FLAGS) ; do \ +- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ +- done; \ +- echo "Doing distclean in readline" ; \ +- (cd readline && \ +- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ +- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ +- "RANLIB=$${RANLIB}" \ +- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ +- distclean) \ +- || exit 1 +- +-@endif readline + + .PHONY: maybe-maintainer-clean-readline maintainer-clean-readline +-maybe-maintainer-clean-readline: +-@if readline +-maybe-maintainer-clean-readline: maintainer-clean-readline +- +-maintainer-clean-readline: +- @[ -f ./readline/Makefile ] || exit 0; \ +- r=`${PWD_COMMAND}`; export r; \ +- s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ +- $(SET_LIB_PATH) \ +- $(HOST_EXPORTS) \ +- for flag in $(EXTRA_HOST_FLAGS) ; do \ +- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ +- done; \ +- echo "Doing maintainer-clean in readline" ; \ +- (cd readline && \ +- $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ +- "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ +- "RANLIB=$${RANLIB}" \ +- "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" \ +- maintainer-clean) \ +- || exit 1 +- +-@endif readline ++maybe-maintainer-clean-readline: ; + + + .PHONY: configure-release maybe-configure-release +--- a/gdb/Makefile.in ++++ b/gdb/Makefile.in +@@ -121,10 +121,10 @@ BFD_SRC = $(srcdir)/$(BFD_DIR) + BFD_CFLAGS = -I$(BFD_DIR) -I$(BFD_SRC) + + # Where is the READLINE library? Typically in ../readline. +-READLINE_DIR = ../readline +-READLINE = $(READLINE_DIR)/libreadline.a ++READLINE = + READLINE_SRC = $(srcdir)/$(READLINE_DIR) +-READLINE_CFLAGS = -I$(READLINE_SRC)/.. ++READLINE_CFLAGS = ++READLINE_LDFLAGS = -lreadline + + WARN_CFLAGS = @WARN_CFLAGS@ + WERROR_CFLAGS = @WERROR_CFLAGS@ -- cgit v1.2.3