summaryrefslogtreecommitdiffstats
path: root/toolchain
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/Config.in7
-rw-r--r--toolchain/Makefile23
-rw-r--r--toolchain/binutils/Makefile5
-rw-r--r--toolchain/gcc/Makefile2
-rw-r--r--toolchain/gdb/Makefile2
-rw-r--r--toolchain/ipkg-utils/Makefile5
-rw-r--r--toolchain/libnotimpl/Makefile2
-rw-r--r--toolchain/sed/Makefile6
-rw-r--r--toolchain/uClibc/Makefile9
-rw-r--r--toolchain/utils/Makefile2
10 files changed, 34 insertions, 29 deletions
diff --git a/toolchain/Config.in b/toolchain/Config.in
index d376c1462..3f0d13fe9 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -6,6 +6,13 @@ menuconfig TOOLCHAINOPTS
source "toolchain/binutils/Config.in"
source "toolchain/gcc/Config.in"
+config GDB
+ bool
+ prompt "Build gdb" if TOOLCHAINOPTS
+ default n
+ help
+ Enable if you want to build the gdb
+
config ENABLE_MULTILIB
bool
prompt "Enable multilib support?" if TOOLCHAINOPTS
diff --git a/toolchain/Makefile b/toolchain/Makefile
index 8a39def37..8e26db562 100644
--- a/toolchain/Makefile
+++ b/toolchain/Makefile
@@ -1,9 +1,10 @@
# Main makefile for the toolchain
include $(TOPDIR)/rules.mk
-TARGETS:=sed utils binutils gcc uClibc ipkg-utils gdb libnotimpl
+TARGETS-y:=sed utils binutils gcc uClibc ipkg-utils libnotimpl
+TARGETS-$(CONFIG_GDB) += gdb
-TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS))
-TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS))
+TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS-y))
+TARGETS_CLEAN:=$(patsubst %,%-clean,$(TARGETS-y))
all: install
install: $(TARGETS_INSTALL)
@@ -18,18 +19,18 @@ gcc-compile: uClibc-install
TOOLCHAIN_STAMP_DIR:=$(STAGING_DIR)/stampfiles
$(TOOLCHAIN_STAMP_DIR):
- mkdir -p $(TOOLCHAIN_STAMP_DIR)
+ mkdir -p $@
$(STAGING_DIR):
- @mkdir -p $(STAGING_DIR)/lib
- @mkdir -p $(STAGING_DIR)/include
- @mkdir -p $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)
- @ln -sf ../lib $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib
+ @mkdir -p $@/lib
+ @mkdir -p $@/include
+ @mkdir -p $@/$(REAL_GNU_TARGET_NAME)
+ @ln -sf ../lib $@/$(REAL_GNU_TARGET_NAME)/lib
$(TOOL_BUILD_DIR):
- @mkdir -p $(TOOL_BUILD_DIR)
+ @mkdir -p $@
-%-prepare: $(TOOLCHAIN_STAMP_DIR) $(STAGING_DIR) $(TOOL_BUILD_DIR)
+%-prepare: $(TOOLCHAIN_STAMP_DIR) $(STAGING_DIR) $(TOOL_BUILD_DIR) FORCE
@[ -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@ ] || { \
$(MAKE) -C $(patsubst %-prepare,%,$@) prepare; \
}
@@ -47,7 +48,7 @@ $(TOOL_BUILD_DIR):
}
@touch $(TOOLCHAIN_STAMP_DIR)/.toolchain_$@
-%-clean:
+%-clean: FORCE
@$(MAKE) -C $(patsubst %-clean,%,$@) clean
@rm -f $(TOOLCHAIN_STAMP_DIR)/.toolchain_$(patsubst %-clean,%,$@)-*
diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile
index 7d405664b..43755c5fb 100644
--- a/toolchain/binutils/Makefile
+++ b/toolchain/binutils/Makefile
@@ -5,8 +5,7 @@ include $(TOPDIR)/rules.mk
# build binutils for use on the host system
#
#############################################################
-BINUTILS_VERSION:=$(strip $(subst ",, $(CONFIG_BINUTILS_VERSION)))
-#"
+BINUTILS_VERSION:=$(strip $(subst ",, $(CONFIG_BINUTILS_VERSION)))#"))
BINUTILS_SITE:=http://www.fr.kernel.org/pub/linux/devel/binutils \
http://www.fi.kernel.org/pub/linux/devel/binutils \
@@ -99,7 +98,7 @@ source: $(DL_DIR)/$(BINUTILS_SOURCE)
prepare: $(BINUTILS_DIR)/.patched
compile: $(BINUTILS_DIR1)/binutils/objdump
install: $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-ld
-clean:
+clean: FORCE
rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)*
rm -rf $(BINUTILS_DIR) $(BINUTILS_DIR1)
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index 1ce00101b..b0686297d 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -145,7 +145,7 @@ $(GCC_BUILD_DIR2)/.compiled: $(GCC_BUILD_DIR2)/.configured
PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR2) all
touch $(GCC_BUILD_DIR2)/.compiled
-gcc-install: $(GCC_BUILD_DIR2)/.compiled
+gcc-install: $(GCC_BUILD_DIR2)/.compiled FORCE
PATH=$(TARGET_PATH) $(MAKE) -C $(GCC_BUILD_DIR2) install
echo $(GCC_VERSION) > $(STAGING_DIR)/gcc_version
# Set up the symlinks to enable lying about target name.
diff --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile
index b1a2ad5fe..f122881a7 100644
--- a/toolchain/gdb/Makefile
+++ b/toolchain/gdb/Makefile
@@ -55,5 +55,5 @@ source: $(DL_DIR)/$(GDB_SOURCE)
prepare: $(GDB_DIR)/.patched
compile:
install: $(TARGET_CROSS)gdb
-clean:
+clean: FORCE
rm -rf $(GDB_CLIENT_DIR) $(GDB_DIR)
diff --git a/toolchain/ipkg-utils/Makefile b/toolchain/ipkg-utils/Makefile
index 41c78fc24..0183257b3 100644
--- a/toolchain/ipkg-utils/Makefile
+++ b/toolchain/ipkg-utils/Makefile
@@ -40,14 +40,11 @@ $(STAGING_DIR)/usr/bin/ipkg-build: $(PKG_BUILD_DIR)/.patched
install -m0755 $(PKG_BUILD_DIR)/ipkg.py $(STAGING_DIR)/usr/bin
source: $(DL_DIR)/$(PKG_SOURCE_FILE)
-
prepare: $(PKG_BUILD_DIR)/.patched
-
compile:
-
install: $(STAGING_DIR)/usr/bin/ipkg-build
-clean:
+clean: FORCE
rm -f $(STAGING_DIR)/etc/ipkg.conf
rm -f $(STAGING_DIR)/usr/bin/ipkg*
rm -rf $(PKG_BUILD_DIR)
diff --git a/toolchain/libnotimpl/Makefile b/toolchain/libnotimpl/Makefile
index f68346c37..86ab927c1 100644
--- a/toolchain/libnotimpl/Makefile
+++ b/toolchain/libnotimpl/Makefile
@@ -24,7 +24,7 @@ source:
prepare: $(LIBNOTIMPL_DIR)/.prepared
compile: $(LIBNOTIMPL_DIR)/libnotimpl.a
install: $(STAGING_DIR)/usr/lib/libnotimpl.a
-clean:
+clean: FORCE
rm -rf \
$(STAGING_DIR)/usr/lib/libnotimpl.a \
$(LIBNOTIMPL_DIR) \
diff --git a/toolchain/sed/Makefile b/toolchain/sed/Makefile
index 637bc6597..e14aadd8f 100644
--- a/toolchain/sed/Makefile
+++ b/toolchain/sed/Makefile
@@ -46,7 +46,7 @@ $(SED_DIR1)/$(SED_BINARY): $(SED_DIR1)/.configured
$(MAKE) -C $(SED_DIR1)
# This stuff is needed to work around GNU make deficiencies
-build-sed-host-binary: $(SED_DIR1)/$(SED_BINARY)
+build-sed-host-binary: $(SED_DIR1)/$(SED_BINARY) FORCE
@if [ -L $(STAGING_DIR)/$(SED_TARGET_BINARY) ] ; then \
rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY); fi;
@if [ ! -f $(STAGING_DIR)/$(SED_TARGET_BINARY) -o $(STAGING_DIR)/$(SED_TARGET_BINARY) \
@@ -58,7 +58,7 @@ build-sed-host-binary: $(SED_DIR1)/$(SED_BINARY)
rm -rf $(STAGING_DIR)/share/locale $(STAGING_DIR)/usr/info \
$(STAGING_DIR)/usr/man $(STAGING_DIR)/usr/share/doc; fi
-use-sed-host-binary:
+use-sed-host-binary: FORCE
@if [ -x /usr/bin/sed ]; then SED="/usr/bin/sed"; else \
if [ -x /bin/sed ]; then SED="/bin/sed"; fi; fi; \
mkdir -p $(STAGING_DIR)/bin; \
@@ -69,7 +69,7 @@ source:
prepare:
compile:
install: $(HOST_SED_TARGET)
-clean:
+clean: FORCE
rm -rf $(SED_DIR1)
rm -f $(STAGING_DIR)/$(SED_TARGET_BINARY)
diff --git a/toolchain/uClibc/Makefile b/toolchain/uClibc/Makefile
index 1fd9b4a3b..f7691e4f1 100644
--- a/toolchain/uClibc/Makefile
+++ b/toolchain/uClibc/Makefile
@@ -9,15 +9,16 @@ include $(TOPDIR)/rules.mk
ifeq ($(CONFIG_UCLIBC_VERSION_SNAPSHOT),y)
# Be aware that this changes daily....
UCLIBC_DIR:=$(TOOL_BUILD_DIR)/uClibc
-UCLIBC_SOURCE:=uClibc-$(strip $(subst ",, $(CONFIG_USE_UCLIBC_SNAPSHOT))).tar.bz2
-#"
+UCLIBC_SOURCE:=uClibc-$(strip $(subst ",, $(CONFIG_USE_UCLIBC_SNAPSHOT))).tar.bz2#"))
UCLIBC_SITE:=http://www.uclibc.org/downloads/snapshots
UCLIBC_VER:=PKG_VERSION:=0.${shell date +"%G%m%d"}
+UCLIBC_MD5SUM:=x
else
UCLIBC_VER:=0.9.28
UCLIBC_DIR:=$(TOOL_BUILD_DIR)/uClibc-$(UCLIBC_VER)
UCLIBC_SOURCE:=uClibc-$(UCLIBC_VER).tar.bz2
UCLIBC_SITE:=http://www.uclibc.org/downloads
+UCLIBC_MD5SUM:=1ada58d919a82561061e4741fb6abd29
endif
UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \
@@ -37,7 +38,7 @@ UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \
$(DL_DIR)/$(UCLIBC_SOURCE):
mkdir -p $(DL_DIR)
- $(SCRIPT_DIR)/download.pl $(DL_DIR) $(UCLIBC_SOURCE) x $(UCLIBC_SITE)
+ $(SCRIPT_DIR)/download.pl $(DL_DIR) $(UCLIBC_SOURCE) $(UCLIBC_MD5SUM) $(UCLIBC_SITE)
$(UCLIBC_DIR)/.unpacked: $(DL_DIR)/$(UCLIBC_SOURCE)
mkdir -p $(TOOL_BUILD_DIR)
@@ -99,5 +100,5 @@ source: $(DL_DIR)/$(UCLIBC_SOURCE)
prepare: $(UCLIBC_DIR)/.configured
compile: $(UCLIBC_DIR)/lib/libc.a
install: $(STAGING_DIR)/lib/libc.a $(UCLIBC_TARGETS)
-clean:
+clean: FORCE
rm -rf $(UCLIBC_DIR) $(TOOL_BUILD_DIR)/uClibc_dev
diff --git a/toolchain/utils/Makefile b/toolchain/utils/Makefile
index 2af6b139d..65e488f4e 100644
--- a/toolchain/utils/Makefile
+++ b/toolchain/utils/Makefile
@@ -14,7 +14,7 @@ install: compile
mkdir -p $(STAGING_DIR)/bin
$(CP) $(UTILS_BUILD_DIR)/* $(STAGING_DIR)/bin/
package:
-clean:
+clean: FORCE
rm -rf $(UTILS_BUILD_DIR)
$(UTILS_BUILD_DIR):