summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2011-06-02 18:25:51 +0200
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2011-06-02 18:25:51 +0200
commit71fff4edf79e819f703d95c55cb44c5fe4fb13df (patch)
tree3674f1f7710e37a350a49b919fcbf25553aa2003 /mk
parentc7f4a038457f80ea6d3a10de7512a14054b72bd8 (diff)
downloadembtoolkit-71fff4edf79e819f703d95c55cb44c5fe4fb13df.tar.gz
embtoolkit-71fff4edf79e819f703d95c55cb44c5fe4fb13df.tar.bz2
embtoolkit-71fff4edf79e819f703d95c55cb44c5fe4fb13df.tar.xz
Toolchain: GDB: rework deeply the build infrastructure and add gdb-7.2 and associated patches
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'mk')
-rw-r--r--mk/gdb.mk99
-rw-r--r--mk/packages.mk18
2 files changed, 1 insertions, 116 deletions
diff --git a/mk/gdb.mk b/mk/gdb.mk
deleted file mode 100644
index 5883d5f..0000000
--- a/mk/gdb.mk
+++ /dev/null
@@ -1,99 +0,0 @@
-################################################################################
-# Embtoolkit
-# Copyright(C) 2009-2011 Abdoulaye Walsimou GAYE.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-################################################################################
-#
-# \file gdb.mk
-# \brief gdb.mk of Embtoolkit.
-# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
-# \date July 2009
-################################################################################
-
-GDB_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_GDB_VERSION_STRING)))
-GDB_SITE := http://ftp.gnu.org/gnu/gdb
-GDB_PACKAGE := gdb-$(GDB_VERSION).tar.bz2
-GDB_HOST_BUILD_DIR :=$(TOOLS_BUILD)/gdb
-GDB_TARGET_BUILD_DIR :=$(PACKAGES_BUILD)/gdb
-GDBSERVER_TARGET_BUILD_DIR :=$(PACKAGES_BUILD)/gdbserver
-
-gdb_host_install: $(GDB_HOST_BUILD_DIR)/.installed
-gdb_target_install: $(GDB_TARGET_BUILD_DIR)/.installed
-gdbserver_target_install: $(GDBSERVER_TARGET_BUILD_DIR)/.installed
-
-#gdb for target
-$(GDB_TARGET_BUILD_DIR)/.installed: ncurses_install download_gdb \
- decompress_gdb $(GDB_TARGET_BUILD_DIR)/.configured
- $(Q)$(MAKE) -C $(GDB_TARGET_BUILD_DIR) $(J)
- $(Q)$(MAKE) -C $(GDB_TARGET_BUILD_DIR) install
-
-$(GDBSERVER_TARGET_BUILD_DIR)/.installed: ncurses_install download_gdb \
- decompress_gdb $(GDB_TARGET_BUILD_DIR)/.configured
- cd $(GDB_TARGET_BUILD_DIR); make; cd gdb/gdbserver; make install
- @touch $@
-
-$(GDB_TARGET_BUILD_DIR)/.configured:
- $(call EMBTK_GENERIC_MESSAGE,"Configuring gdb-$(GDB_VERSION) for \
- $(STRICT_GNU_TARGET) ...")
- @cd $(GDB_TARGET_BUILD_DIR); \
- CC=$(TARGETCC_CACHED) CXX=$(TARGETCXX_CACHED) \
- AR=$(TARGETAR) LD=$(TARGETLD) RANLIB=$(TARGETRANLIB) \
- NM=$(TARGETNM) STRIP=$(TARGETSTRIP) \
- $(TOOLS_BUILD)/gdb-$(GDB_VERSION)/configure \
- --host=$(STRICT_GNU_TARGET) \
- --target=$(STRICT_GNU_TARGET) --prefix=$(SYSROOT)/usr --disable-werror
- @touch $@
-
-gdb_target_clean:
- $(call EMBTK_GENERIC_MESSAGE,"Cleanup gdb for target...")
-gdbserver_target_clean:
- $(call EMBTK_GENERIC_MESSAGE,"Cleanup gdbserver for target...")
-
-#gdb for host
-$(GDB_HOST_BUILD_DIR)/.installed: download_gdb decompress_gdb \
-$(GDB_HOST_BUILD_DIR)/.configured
- @cd $(GDB_HOST_BUILD_DIR); make $(J); make install
- @touch $@
-
-$(GDB_HOST_BUILD_DIR)/.configured:
- $(call EMBTK_GENERIC_MESSAGE,"Configuring gdb-$(GDB_VERSION) for \
- your host development machine ...")
- @cd $(GDB_HOST_BUILD_DIR); \
- CC=$(HOSTCC_CACHED) CXX=$(HOSTCXX_CACHED) \
- CC_FOR_TARGET=$(TARGETCC_CACHED) CXX_FOR_TARGET=$(TARGETCXX_CACHED) \
- AR_FOR_TARGET=$(TARGETAR) LD_FOR_TARGET=$(TARGETLD) \
- NM_FOR_TARGET=$(TARGETNM) RANLIB_FOR_TARGET=$(TARGETRANLIB) \
- STRIP_FOR_TARGET=$(TARGETSTRIP) OBJDUMP_FOR_TARGET=$(TARGETOBJDUMP) \
- $(TOOLS_BUILD)/gdb-$(GDB_VERSION)/configure \
- --host=$(HOST_ARCH) --build=$(HOST_ARCH) --target=$(STRICT_GNU_TARGET) \
- --prefix=$(TOOLS) --disable-werror
- @touch $@
-
-download_gdb:
- $(call EMBTK_GENERIC_MESSAGE,"Downloading $(GDB_PACKAGE) \
- if necessary ...")
- @test -e $(DOWNLOAD_DIR)/$(GDB_PACKAGE) || \
- wget -O $(DOWNLOAD_DIR)/$(GDB_PACKAGE) \
- $(GDB_SITE)/$(GDB_PACKAGE)
-
-decompress_gdb:
- $(call EMBTK_GENERIC_MESSAGE,"Decompressing $(GDB_PACKAGE) ...")
- @cd $(TOOLS_BUILD); test -e gdb-$(GDB_VERSION) || \
- tar xjf $(DOWNLOAD_DIR)/$(GDB_PACKAGE)
- @mkdir -p $(GDB_TARGET_BUILD_DIR)
- @mkdir -p $(GDBSERVER_TARGET_BUILD_DIR)
- @mkdir -p $(GDB_HOST_BUILD_DIR)
-
diff --git a/mk/packages.mk b/mk/packages.mk
index 236e198..2b62a0b 100644
--- a/mk/packages.mk
+++ b/mk/packages.mk
@@ -31,19 +31,10 @@ HOSTTOOLS_COMPONENTS-y := mkimage_install
include $(EMBTK_ROOT)/mk/mkimage.mk
include $(EMBTK_ROOT)/mk/mtd-utils.mk
-#gdb
-include $(EMBTK_ROOT)/mk/gdb.mk
-
################################################################################
-############################# Packages for TARGET ##############################
+######################### Packages for TARGET and HOST #########################
################################################################################
-#gdb
-ROOTFS_COMPONENTS-$(CONFIG_EMBTK_HAVE_GDB_ON_TARGET) += gdb_target_install
-
-#gdbserver
-ROOTFS_COMPONENTS-$(CONFIG_EMBTK_HAVE_GDBSERVER_ON_TARGET) += gdbserver_target_install
-
#strace
ROOTFS_COMPONENTS-$(CONFIG_EMBTK_ROOTFS_HAVE_STRACE) += strace_install
include $(EMBTK_ROOT)/mk/strace.mk
@@ -88,13 +79,6 @@ include $(EMBTK_ROOT)/packages/busybox/busybox.mk
ROOTFS_COMPONENTS_CLEAN := $(subst install,clean,$(ROOTFS_COMPONENTS-))
################################################################################
-########################## Packages for HOST MACHINE ###########################
-################################################################################
-
-#gdb
-HOSTTOOLS_COMPONENTS-$(CONFIG_EMBTK_HAVE_GDB_ON_HOST) += gdb_host_install
-
-################################################################################
########################### Targets for HOST MACHINE ###########################
################################################################################
host_packages_build: