aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/Makefile15
-rw-r--r--toolchain/binutils/Makefile14
-rw-r--r--toolchain/gcc/Makefile67
-rw-r--r--toolchain/gdb/Makefile15
-rw-r--r--toolchain/info.mk4
-rw-r--r--toolchain/kernel-headers/Makefile39
-rw-r--r--toolchain/uClibc/Makefile73
7 files changed, 113 insertions, 114 deletions
diff --git a/toolchain/Makefile b/toolchain/Makefile
index b11653190e..80bdf485df 100644
--- a/toolchain/Makefile
+++ b/toolchain/Makefile
@@ -19,12 +19,23 @@ ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
$(curdir)/binutils/prepare:=$(curdir)/uClibc/prepare
$(curdir)/gcc/prepare:=$(curdir)/binutils/install
$(curdir)/uClibc/compile:=$(curdir)/gcc/compile
+ $(curdir)/gcc/install:=$(curdir)/uClibc/compile
+ $(curdir)/uClibc/install:=$(curdir)/gcc/install
endif
-$(curdir)/gcc/install:=$(curdir)/uClibc/install
+
+$(TOOLCHAIN_DIR)/info.mk: .config
+ @for dir in $(TOOLCHAIN_DIR); do ( \
+ set -x; \
+ mkdir -p "$$dir"; \
+ cd "$$dir"; \
+ mkdir -p bin lib include stamp; \
+ ); done
+ @grep GCC_VERSION $@ >/dev/null 2>&1 || $(INSTALL_DATA) $(TOPDIR)/toolchain/info.mk $@
+ @touch $@
# prerequisites for the individual targets
$(curdir)/ := .config prereq
-$(curdir)//prepare = $(STAGING_DIR)/include-host/.done
+$(curdir)//prepare = $(STAGING_DIR)/.prepared $(TOOLCHAIN_DIR)/info.mk
$(curdir)//compile = $(1)/prepare
$(curdir)//install = $(1)/compile
diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile
index 902dae85a3..b3a68893b5 100644
--- a/toolchain/binutils/Makefile
+++ b/toolchain/binutils/Makefile
@@ -7,7 +7,8 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=binutils
-PKG_VERSION:=$(strip $(subst ",, $(CONFIG_BINUTILS_VERSION)))#"))
+PKG_VERSION:=$(strip $(subst ",, $(CONFIG_BINUTILS_VERSION)))
+#"))
PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/binutils/ \
ftp://gatekeeper.dec.com/pub/GNU/ \
@@ -17,17 +18,16 @@ PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/binutils/ \
ftp://ftp.leo.org/pub/comp/os/unix/gnu/
PKG_SOURCE:=binutils-$(PKG_VERSION).tar.bz2
-PKG_MD5SUM:=unknown
-PKG_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PKG_CAT:=bzcat
PATCH_DIR:=./patches/$(PKG_VERSION)
+STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
+BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
include $(INCLUDE_DIR)/host-build.mk
define Build/Configure
(cd $(PKG_BUILD_DIR); \
./configure \
- --prefix=$(STAGING_DIR) \
+ --prefix=$(STAGING_DIR_HOST) \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
@@ -37,11 +37,11 @@ define Build/Configure
endef
define Build/Compile
- $(MAKE) -C $(PKG_BUILD_DIR) -j $(CONFIG_JLEVEL) all
+ $(MAKE) -C $(PKG_BUILD_DIR) all
endef
define Build/Install
- $(MAKE) -C $(PKG_BUILD_DIR) -j $(CONFIG_JLEVEL) install
+ $(MAKE) -C $(PKG_BUILD_DIR) install
endef
$(eval $(call HostBuild))
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index 795ff3ee72..cd18098e9f 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -27,39 +27,33 @@ PATCH_DIR=./patches/$(PKG_VERSION)
PKG_SOURCE_URL:=ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-$(PKG_VERSION) \
http://mirrors.rcn.net/pub/sourceware/gcc/releases/gcc-$(PKG_VERSION) \
ftp://ftp.gnu.org/gnu/gcc/releases/gcc-$(PKG_VERSION)
-
PKG_SOURCE:=gcc-$(PKG_VERSION).tar.bz2
-PKG_MD5SUM:=unknown
-PKG_CAT:=bzcat
-
-PKG_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)/gcc-$(PKG_VERSION)
-
-TARGET_LANGUAGES:=c
-ifeq ($(CONFIG_INSTALL_LIBSTDCPP),y)
-TARGET_LANGUAGES:=$(TARGET_LANGUAGES),c++
-endif
-ifeq ($(CONFIG_INSTALL_LIBGCJ),y)
-TARGET_LANGUAGES:=$(TARGET_LANGUAGES),java
-endif
+STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
+BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
include $(INCLUDE_DIR)/host-build.mk
-STAMP_BUILT:=$(STAGING_DIR)/stampfiles/.host_gcc-initial_installed
-BUILD_DIR1:=$(TOOLCHAIN_BUILD_DIR)/gcc-$(PKG_VERSION)-initial
-BUILD_DIR2:=$(TOOLCHAIN_BUILD_DIR)/gcc-$(PKG_VERSION)-final
+STAMP_BUILT:=$(TOOLCHAIN_DIR)/stamp/.gcc-initial_installed
+BUILD_DIR1:=$(BUILD_DIR_HOST)/gcc-$(PKG_VERSION)-initial
+BUILD_DIR2:=$(BUILD_DIR_HOST)/gcc-$(PKG_VERSION)-final
+
+SEP:=,
+TARGET_LANGUAGES:="c$(if $(CONFIG_INSTALL_LIBSTDCPP),$(SEP)c++)$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)"
define Stage1/Configure
+ $(SED) 's,TARGET_CROSS=.*,TARGET_CROSS=$(REAL_GNU_TARGET_NAME)-,' $(TOOLCHAIN_DIR)/info.mk
+ $(SED) 's,GCC_VERSION=.*,GCC_VERSION=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk
mkdir -p $(BUILD_DIR1)
(cd $(BUILD_DIR1); rm -f config.cache; \
SHELL="$(BASH)" \
$(PKG_BUILD_DIR)/configure \
- --prefix=$(STAGING_DIR) \
+ --prefix=$(TOOLCHAIN_DIR) \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
--enable-languages=c \
--disable-shared \
- --with-sysroot=$(TOOLCHAIN_BUILD_DIR)/uClibc_dev/ \
+ --with-sysroot=$(BUILD_DIR_HOST)/uClibc_dev/ \
--disable-__cxa_atexit \
--enable-target-optspace \
--with-gnu-ld \
@@ -77,14 +71,14 @@ endef
define Stage2/Configure
mkdir -p $(BUILD_DIR2)
# Important! Required for limits.h to be fixed.
- rm -rf $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
- ln -sf ../include $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
- rm -rf $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib
- ln -sf ../lib $(STAGING_DIR)/$(REAL_GNU_TARGET_NAME)/lib
+ rm -rf $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
+ ln -sf ../include $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/sys-include
+ rm -rf $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/lib
+ ln -sf ../lib $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME)/lib
(cd $(BUILD_DIR2); rm -f config.cache; \
SHELL="$(BASH)" \
$(PKG_BUILD_DIR)/configure \
- --prefix=$(STAGING_DIR) \
+ --prefix=$(TOOLCHAIN_DIR) \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
@@ -97,15 +91,20 @@ define Stage2/Configure
--disable-libmudflap \
);
endef
+
define Stage2/Compile
- export SHELL="$(BASH)"; $(MAKE) -C $(BUILD_DIR2) all
+ $(MAKE) -C $(BUILD_DIR2) \
+ SHELL="$(BASH)" \
+ all
endef
+
define Stage2/Install
- export SHELL="$(BASH)"; $(MAKE) -C $(BUILD_DIR2) install
- echo $(PKG_VERSION) > $(STAGING_DIR)/gcc_version
+ $(MAKE) -C $(BUILD_DIR2) \
+ SHELL="$(BASH)" \
+ install
# Set up the symlinks to enable lying about target name.
set -e; \
- (cd $(STAGING_DIR); \
+ (cd $(TOOLCHAIN_DIR); \
ln -sf $(REAL_GNU_TARGET_NAME) $(GNU_TARGET_NAME); \
cd bin; \
for app in $(REAL_GNU_TARGET_NAME)-* ; do \
@@ -129,7 +128,7 @@ endef
define Build/Compile
$(call Stage1/Compile)
- $(call Stage1/Install)
+ $(if $(wildcard $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gcc),,$(call Stage1/Install))
endef
define Build/Install
@@ -139,11 +138,13 @@ define Build/Install
endef
define Build/Clean
- rm -rf $(PKG_BUILD_DIR)
- rm -rf $(BUILD_DIR1)
- rm -rf $(BUILD_DIR2)
- rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gc*
- rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-c*
+ rm -rf \
+ $(PKG_BUILD_DIR) \
+ $(BUILD_DIR1) \
+ $(BUILD_DIR2) \
+ $(TOOLCHAIN_DIR)/$(REAL_GNU_TARGET_NAME) \
+ $(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gc* \
+ $(TOOLCHAIN_DIR)/bin/$(REAL_GNU_TARGET_NAME)-c*
endef
$(eval $(call HostBuild))
diff --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile
index 34dca715a7..40fc2789b6 100644
--- a/toolchain/gdb/Makefile
+++ b/toolchain/gdb/Makefile
@@ -14,7 +14,8 @@ PKG_MD5SUM:=05b928f41fa5b482e49ca2c24762a0ae
PKG_SOURCE_URL:=http://ftp.gnu.org/gnu/gdb
PKG_CAT:=bzcat
-PKG_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
+BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
include $(INCLUDE_DIR)/host-build.mk
@@ -22,7 +23,7 @@ define Build/Configure
(cd $(PKG_BUILD_DIR); \
gdb_cv_func_sigsetjmp=yes \
$(PKG_BUILD_DIR)/configure \
- --prefix=$(STAGING_DIR) \
+ --prefix=$(TOOLCHAIN_DIR) \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
--target=$(REAL_GNU_TARGET_NAME) \
@@ -40,16 +41,14 @@ define Build/Compile
endef
define Build/Install
- (cd $(STAGING_DIR)/bin; \
- install -c $(PKG_BUILD_DIR)/gdb/gdb $(TARGET_CROSS)gdb; \
- ln -fs $(TARGET_CROSS)gdb $(GNU_TARGET_NAME)-gdb; \
- );
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/gdb/gdb $(TARGET_CROSS)gdb
+ ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/$(GNU_TARGET_NAME)-gdb; \
endef
define Build/Clean
rm -rf $(PKG_BUILD_DIR)
- rm -f $(STAGING_DIR)/bin/$(TARGET_CROSS)gdb
- rm -f $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-gdb
+ rm -f $(TOOLCHAIN_DIR)/bin/$(TARGET_CROSS)gdb
+ rm -f $(TOOLCHAIN_DIR)/bin/$(GNU_TARGET_NAME)-gdb
endef
$(eval $(call HostBuild))
diff --git a/toolchain/info.mk b/toolchain/info.mk
new file mode 100644
index 0000000000..0675493f77
--- /dev/null
+++ b/toolchain/info.mk
@@ -0,0 +1,4 @@
+TARGET_CROSS=
+GCC_VERSION=unknown
+UCLIBC_VERSION=unknown
+UCLIBC_PATCHVER=
diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile
index d51f91d3a8..68fa1bc4e8 100644
--- a/toolchain/kernel-headers/Makefile
+++ b/toolchain/kernel-headers/Makefile
@@ -5,33 +5,32 @@
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
-include $(INCLUDE_DIR)/kernel.mk
-
-PKG_NAME=kernel-headers
-PKG_VERSION=$(LINUX_VERSION)
-PKG_SOURCE=$(LINUX_SOURCE)
-PKG_SOURCE_URL=$(LINUX_SITE)
+PKG_NAME:=linux
+PKG_VERSION:=$(LINUX_VERSION)
+PKG_SOURCE:=$(LINUX_SOURCE)
+PKG_SOURCE_URL:=$(LINUX_SITE)
-PKG_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)/linux-$(PKG_VERSION)
+KERNEL_BUILD_DIR := $(BUILD_DIR_TOOLCHAIN)
+PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
+LINUX_DIR := $(PKG_BUILD_DIR)
+BUILD_DIR := $(KERNEL_BUILD_DIR)
-LINUX_DIR:=$(PKG_BUILD_DIR)
-KERNEL_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)
+STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
+BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
override QUILT:=
+include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/kernel-defaults.mk
-
define Build/Prepare/cris
- mkdir -p $(TOOLCHAIN_BUILD_DIR)
+ mkdir -p $(BUILD_DIR_TOOLCHAIN)
bzcat $(DL_DIR)/$(PKG_SOURCE) | $(HOST_TAR) -C $(TOOLCHAIN_BUILD_DIR) $(TAR_OPTIONS)
$(PATCH) $(PKG_BUILD_DIR) $(TOPDIR)/target/linux/etrax-2.6/patches/generic_2.6
$(PATCH) $(PKG_BUILD_DIR) $(TOPDIR)/target/linux/etrax-2.6/patches/cris
- ln -sf $(PKG_BUILD_DIR)/include/asm-cris/arch-v10 $(PKG_BUILD_DIR)/include/asm-cris/arch
- ln -sf $(PKG_BUILD_DIR)/arch/cris/arch-v10 $(PKG_BUILD_DIR)/arch/cris/arch
- $(SED) 's/@expr length/@-expr length/' $(PKG_BUILD_DIR)/Makefile
- ln -sf $(PKG_BUILD_DIR) $(LINUX_HEADERS_DIR)
+ ln -sf arch-v10 $(PKG_BUILD_DIR)/include/asm-cris/arch
+ ln -sf arch-v10 $(PKG_BUILD_DIR)/arch/cris/arch
endef
define Build/Configure/powerpc
@@ -48,14 +47,10 @@ KMAKE := $(MAKE) -C $(PKG_BUILD_DIR) \
ARCH=$(LINUX_KARCH) \
CONFIG_SHELL=$(BASH)
-define Build/Prepare/Default
- $(call Kernel/Prepare/Default)
- $(SED) 's/@expr length/@-expr length/' $(PKG_BUILD_DIR)/Makefile
- ln -sf $(PKG_BUILD_DIR) $(LINUX_HEADERS_DIR)
-endef
-
define Build/Prepare
- $(if $(Build/Prepare/$(ARCH)),$(Build/Prepare/$(ARCH)),$(Build/Prepare/Default))
+ $(if $(Build/Prepare/$(ARCH)),$(Build/Prepare/$(ARCH)),$(call Kernel/Prepare/Default))
+ $(SED) 's/@expr length/@-expr length/' $(PKG_BUILD_DIR)/Makefile
+ ln -sf linux-$(LINUX_VERSION) $(LINUX_HEADERS_DIR)
yes '' | $(KMAKE) oldconfig
$(KMAKE) include/linux/version.h include/asm
$(call Build/Configure/$(ARCH))
diff --git a/toolchain/uClibc/Makefile b/toolchain/uClibc/Makefile
index 576fa6e0de..d117cbd890 100644
--- a/toolchain/uClibc/Makefile
+++ b/toolchain/uClibc/Makefile
@@ -16,10 +16,15 @@ PKG_SOURCE_URL:=http://www.uclibc.org/downloads
PKG_MD5SUM:=959f25286e317f0d9e2103445c5a14c2
PKG_CAT:=bzcat
-PKG_BUILD_DIR:=$(TOOLCHAIN_BUILD_DIR)/uClibc-$(PKG_VERSION)$(PKG_EXTRAVERSION)
+STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
+BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
+PKG_BUILD_DIR:=$(BUILD_DIR_HOST)/uClibc-$(PKG_VERSION)$(PKG_EXTRAVERSION)
include $(INCLUDE_DIR)/host-build.mk
+STAMP_BUILT:=$(TOOLCHAIN_DIR)/stamp/.uclibc_installed
+STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.uclibc-utils_installed
+
UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \
-e 's/i.86/i386/' \
-e 's/sparc.*/sparc/' \
@@ -37,32 +42,19 @@ UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \
define Build/Prepare
$(call Build/Prepare/Default)
- if [ -e config/$(ARCH).$(BOARD) ]; then \
- $(CP) config/$(ARCH).$(BOARD) $(PKG_BUILD_DIR)/.config; \
- else \
- $(CP) config/$(ARCH) $(PKG_BUILD_DIR)/.config; \
- fi
+ $(CP) config/$(ARCH)$(if $(wildcard config/$(ARCH).$(BOARD)),$(BOARD)) $(PKG_BUILD_DIR)/.config
$(SED) 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"$(LINUX_HEADERS_DIR)\",g' \
+ -e 's,.*HAS_FPU.*,HAS_FPU=$(if $(CONFIG_SOFT_FLOAT),n\nUCLIBC_HAS_FLOATS=y\nUCLIBC_HAS_SOFT_FLOAT=y,y),g' \
+ -e 's,^.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=$(if $(CONFIG_LARGEFILE),y,n),g' \
+ -e 's,.*DO_C99_MATH.*,DO_C99_MATH=$(if $(CONFIG_C99_MATH),y,n),g' \
$(PKG_BUILD_DIR)/.config
-ifeq ($(CONFIG_LARGEFILE),y)
- $(SED) 's,^.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=y,g' $(PKG_BUILD_DIR)/.config
-else
- $(SED) 's,^.*UCLIBC_HAS_LFS.*,UCLIBC_HAS_LFS=n,g' $(PKG_BUILD_DIR)/.config
-endif
- $(SED) 's,.*UCLIBC_HAS_WCHAR.*,UCLIBC_HAS_WCHAR=y,g' $(PKG_BUILD_DIR)/.config
-ifeq ($(CONFIG_SOFT_FLOAT),y)
- $(SED) 's,.*HAS_FPU.*,HAS_FPU=n\nUCLIBC_HAS_FLOATS=y\nUCLIBC_HAS_SOFT_FLOAT=y,g' $(PKG_BUILD_DIR)/.config
-endif
-ifeq ($(CONFIG_C99_MATH),y)
- $(SED) 's,.*DO_C99_MATH.*,DO_C99_MATH=y,g' $(PKG_BUILD_DIR)/.config
-endif
- mkdir -p $(TOOLCHAIN_BUILD_DIR)/uClibc_dev/usr/include
- mkdir -p $(TOOLCHAIN_BUILD_DIR)/uClibc_dev/usr/lib
- mkdir -p $(TOOLCHAIN_BUILD_DIR)/uClibc_dev/lib
+ mkdir -p $(BUILD_DIR_HOST)/uClibc_dev/usr/include
+ mkdir -p $(BUILD_DIR_HOST)/uClibc_dev/usr/lib
+ mkdir -p $(BUILD_DIR_HOST)/uClibc_dev/lib
PATH=$(TARGET_PATH) $(MAKE) -C $(PKG_BUILD_DIR) \
- PREFIX=$(TOOLCHAIN_BUILD_DIR)/uClibc_dev/ \
+ PREFIX=$(BUILD_DIR_HOST)/uClibc_dev/ \
DEVEL_PREFIX=/usr/ \
- RUNTIME_PREFIX=$(TOOLCHAIN_BUILD_DIR)/uClibc_dev/ \
+ RUNTIME_PREFIX=$(BUILD_DIR_HOST)/uClibc_dev/ \
HOSTCC="$(HOSTCC)" \
CPU_CFLAGS="$(TARGET_CFLAGS)" \
pregen install_dev;
@@ -71,34 +63,31 @@ endef
define Build/Configure
endef
-define Build/Compile
- $(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(PKG_BUILD_DIR)/Rules.mak
- PATH=$(TARGET_PATH) $(MAKE) -C $(PKG_BUILD_DIR) \
- PREFIX= \
+UCLIBC_MAKE := PATH=$(TARGET_PATH) $(MAKE) -C $(PKG_BUILD_DIR) \
DEVEL_PREFIX=/ \
RUNTIME_PREFIX=/ \
HOSTCC="$(HOSTCC)" \
- CPU_CFLAGS="$(TARGET_CFLAGS)" \
- all
+ CPU_CFLAGS="$(TARGET_CFLAGS)"
+
+define Build/Compile
+ $(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(PKG_BUILD_DIR)/Rules.mak
+ $(UCLIBC_MAKE) PREFIX= all
+ $(UCLIBC_MAKE) PREFIX=$(STAGING_DIR_HOST)/ install_runtime install_dev
+ $(SED) 's,UCLIBC_VERSION=.*,UCLIBC_VERSION=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk
+ $(SED) 's,UCLIBC_PATCHVER=.*,UCLIBC_PATCHVER=$(PKG_EXTRAVERSION),' $(TOOLCHAIN_DIR)/info.mk
endef
define Build/Install
- $(MAKE) -C $(PKG_BUILD_DIR) \
- PREFIX=$(STAGING_DIR)/ \
- DEVEL_PREFIX=/ \
- RUNTIME_PREFIX=/ \
- install_runtime
- $(MAKE) -C $(PKG_BUILD_DIR) \
- PREFIX=$(STAGING_DIR)/ \
- DEVEL_PREFIX=/ \
- RUNTIME_PREFIX=/ \
- install_dev
- echo $(PKG_VERSION) > $(STAGING_DIR)/uclibc_version
- echo $(PKG_VERSION)$(PKG_EXTRAVERSION) > $(STAGING_DIR)/uclibc_extra_version
+ $(UCLIBC_MAKE) PREFIX= utils
+ $(INSTALL_DIR) $(TOOLCHAIN_DIR)/target-utils
+ $(INSTALL_BIN) \
+ $(PKG_BUILD_DIR)/utils/ldd \
+ $(PKG_BUILD_DIR)/utils/ldconfig \
+ $(TOOLCHAIN_DIR)/target-utils/
endef
define Build/Clean
- rm -rf $(PKG_BUILD_DIR) $(TOOLCHAIN_BUILD_DIR)/uClibc_dev
+ rm -rf $(PKG_BUILD_DIR) $(BUILD_DIR_HOST)/uClibc_dev
endef
$(eval $(call HostBuild))