aboutsummaryrefslogtreecommitdiffstats
path: root/toolchain
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/binutils/Makefile22
-rw-r--r--toolchain/eglibc/Makefile56
-rw-r--r--toolchain/gcc/Makefile66
-rw-r--r--toolchain/gdb/Makefile18
-rw-r--r--toolchain/glibc-ports/Makefile14
-rw-r--r--toolchain/glibc/Makefile50
-rw-r--r--toolchain/kernel-headers/Makefile96
-rw-r--r--toolchain/uClibc/Makefile60
8 files changed, 191 insertions, 191 deletions
diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile
index dba6d45688..b0b65f381b 100644
--- a/toolchain/binutils/Makefile
+++ b/toolchain/binutils/Makefile
@@ -61,30 +61,30 @@ ifneq ($(CONFIG_EXTRA_TARGET_ARCH),)
--enable-targets=$(call qstrip,$(CONFIG_EXTRA_TARGET_ARCH_NAME))-linux-$(TARGET_SUFFIX)
endif
-define Build/Prepare
- $(call Build/Prepare/Default)
+define Host/Prepare
+ $(call Host/Prepare/Default)
ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
- $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/
+ $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_BUILD_DIR)/
endef
-define Build/Configure
- (cd $(PKG_BUILD_DIR); \
+define Host/Configure
+ (cd $(HOST_BUILD_DIR); \
$(BINUTILS_CONFIGURE) \
);
endef
-define Build/Compile
- $(MAKE) -C $(PKG_BUILD_DIR) all
+define Host/Compile
+ $(MAKE) -C $(HOST_BUILD_DIR) all
endef
-define Build/Install
- $(MAKE) -C $(PKG_BUILD_DIR) install
+define Host/Install
+ $(MAKE) -C $(HOST_BUILD_DIR) install
$(CP) $(TOOLCHAIN_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-readelf $(REAL_STAGING_DIR_HOST)/bin/readelf
endef
-define Build/Clean
+define Host/Clean
rm -rf \
- $(PKG_BUILD_DIR) \
+ $(HOST_BUILD_DIR) \
$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
endef
diff --git a/toolchain/eglibc/Makefile b/toolchain/eglibc/Makefile
index 6e4e3e025f..4eabbbfe6c 100644
--- a/toolchain/eglibc/Makefile
+++ b/toolchain/eglibc/Makefile
@@ -35,7 +35,7 @@ PATCH_DIR:=./patches/$(PKG_VERSION)
STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
-PKG_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_SOURCE_SUBDIR)
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_SOURCE_SUBDIR)
override CONFIG_AUTOREBUILD=
@@ -44,8 +44,8 @@ include $(INCLUDE_DIR)/host-build.mk
STAMP_BUILT:=$(TOOLCHAIN_DIR)/stamp/.eglibc_built
STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.eglibc_installed
-PKG_BUILD_DIR1:=$(PKG_BUILD_DIR)-initial
-PKG_BUILD_DIR2:=$(PKG_BUILD_DIR)-final
+HOST_BUILD_DIR1:=$(HOST_BUILD_DIR)-initial
+HOST_BUILD_DIR2:=$(HOST_BUILD_DIR)-final
# XXX: {e,}glibc does not build w/ -Os
# http://sourceware.org/bugzilla/show_bug.cgi?id=5203
@@ -55,7 +55,7 @@ EGLIBC_CONFIGURE:= \
BUILD_CC="$(HOSTCC)" \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(EGLIBC_CFLAGS)" \
- $(PKG_BUILD_DIR)/libc/configure \
+ $(HOST_BUILD_DIR)/libc/configure \
--prefix=/usr \
--build=$(GNU_HOST_NAME) \
--host=$(REAL_GNU_TARGET_NAME) \
@@ -77,7 +77,7 @@ EGLIBC_MAKE:= \
$(MAKE) \
-define Build/SetToolchainInfo
+define Host/SetToolchainInfo
$(SED) 's,^\(LIBC_TYPE\)=.*,\1=$(PKG_NAME),' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_URL\)=.*,\1=http://www.eglibc.org/,' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk
@@ -85,9 +85,9 @@ define Build/SetToolchainInfo
endef
define Stage1/Configure
- mkdir -p $(PKG_BUILD_DIR1)
- $(CP) $(PKG_BUILD_DIR)/libc/option-groups.config $(PKG_BUILD_DIR1)/
- ( cd $(PKG_BUILD_DIR1); rm -f config.cache; \
+ mkdir -p $(HOST_BUILD_DIR1)
+ $(CP) $(HOST_BUILD_DIR)/libc/option-groups.config $(HOST_BUILD_DIR1)/
+ ( cd $(HOST_BUILD_DIR1); rm -f config.cache; \
$(EGLIBC_CONFIGURE) \
);
endef
@@ -97,13 +97,13 @@ endef
define Stage1/Install
mkdir -p $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/usr/{include,lib}
- $(EGLIBC_MAKE) -C $(PKG_BUILD_DIR1) \
+ $(EGLIBC_MAKE) -C $(HOST_BUILD_DIR1) \
install_root="$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev" \
install-bootstrap-headers=yes \
install-headers
- $(EGLIBC_MAKE) -C $(PKG_BUILD_DIR1) \
+ $(EGLIBC_MAKE) -C $(HOST_BUILD_DIR1) \
csu/subdir_lib
- ( cd $(PKG_BUILD_DIR1); \
+ ( cd $(HOST_BUILD_DIR1); \
$(CP) csu/crt1.o csu/crti.o csu/crtn.o $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/usr/lib/ \
)
$(TARGET_CC) -nostdlib -nostartfiles -shared -x c /dev/null \
@@ -111,19 +111,19 @@ define Stage1/Install
endef
define Stage2/Configure
- mkdir -p $(PKG_BUILD_DIR2)
- $(CP) $(PKG_BUILD_DIR)/libc/option-groups.config $(PKG_BUILD_DIR2)/
- ( cd $(PKG_BUILD_DIR2); rm -f config.cache; \
+ mkdir -p $(HOST_BUILD_DIR2)
+ $(CP) $(HOST_BUILD_DIR)/libc/option-groups.config $(HOST_BUILD_DIR2)/
+ ( cd $(HOST_BUILD_DIR2); rm -f config.cache; \
$(EGLIBC_CONFIGURE) \
);
endef
define Stage2/Compile
- $(EGLIBC_MAKE) -C $(PKG_BUILD_DIR2) all
+ $(EGLIBC_MAKE) -C $(HOST_BUILD_DIR2) all
endef
define Stage2/Install
- $(EGLIBC_MAKE) -C $(PKG_BUILD_DIR2) \
+ $(EGLIBC_MAKE) -C $(HOST_BUILD_DIR2) \
install_root="$(TOOLCHAIN_DIR)" \
install
( cd $(TOOLCHAIN_DIR) ; \
@@ -137,33 +137,33 @@ define Stage2/Install
)
endef
-define Build/Prepare
- $(call Build/SetToolchainInfo)
- $(call Build/Prepare/Default)
+define Host/Prepare
+ $(call Host/SetToolchainInfo)
+ $(call Host/Prepare/Default)
ln -snf $(PKG_SOURCE_SUBDIR) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
- $(SED) 's,y,n,' $(PKG_BUILD_DIR)/libc/option-groups.defaults
- grep 'CONFIG_EGLIBC_OPTION_' $(TOPDIR)/.config | sed -e "s,\\(# \)\\?CONFIG_EGLIBC_\\(.*\\),\\1\\2,g" > $(PKG_BUILD_DIR)/libc/option-groups.config
- ln -sf ../ports $(PKG_BUILD_DIR)/libc/
- ( cd $(PKG_BUILD_DIR)/libc; autoconf --force )
+ $(SED) 's,y,n,' $(HOST_BUILD_DIR)/libc/option-groups.defaults
+ grep 'CONFIG_EGLIBC_OPTION_' $(TOPDIR)/.config | sed -e "s,\\(# \)\\?CONFIG_EGLIBC_\\(.*\\),\\1\\2,g" > $(HOST_BUILD_DIR)/libc/option-groups.config
+ ln -sf ../ports $(HOST_BUILD_DIR)/libc/
+ ( cd $(HOST_BUILD_DIR)/libc; autoconf --force )
$(call Stage1/Configure)
$(call Stage1/Compile)
$(call Stage1/Install)
endef
-define Build/Configure
+define Host/Configure
endef
-define Build/Compile
+define Host/Compile
$(call Stage2/Configure)
$(call Stage2/Compile)
$(call Stage2/Install)
endef
-define Build/Install
+define Host/Install
endef
-define Build/Clean
- rm -rf $(PKG_BUILD_DIR) $(PKG_BUILD_DIR1) $(PKG_BUILD_DIR2) \
+define Host/Clean
+ rm -rf $(HOST_BUILD_DIR) $(HOST_BUILD_DIR1) $(HOST_BUILD_DIR2) \
$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev \
$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
endef
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index 039643db9b..10dab856fd 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -56,16 +56,16 @@ include $(INCLUDE_DIR)/host-build.mk
STAMP_BUILT:=$(TOOLCHAIN_DIR)/stamp/.gcc-initial_installed
-PKG_BUILD_DIR0:=$(PKG_BUILD_DIR)-minimal
-PKG_BUILD_DIR1:=$(PKG_BUILD_DIR)-initial
-PKG_BUILD_DIR2:=$(PKG_BUILD_DIR)-final
+HOST_BUILD_DIR0:=$(HOST_BUILD_DIR)-minimal
+HOST_BUILD_DIR1:=$(HOST_BUILD_DIR)-initial
+HOST_BUILD_DIR2:=$(HOST_BUILD_DIR)-final
SEP:=,
TARGET_LANGUAGES:="c$(if $(CONFIG_INSTALL_LIBSTDCPP),$(SEP)c++)$(if $(CONFIG_INSTALL_LIBGCJ),$(SEP)java)"
GCC_CONFIGURE:= \
SHELL="$(BASH)" \
- $(PKG_BUILD_DIR)/configure \
+ $(HOST_BUILD_DIR)/configure \
--prefix=$(TOOLCHAIN_DIR)/usr \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
@@ -138,45 +138,45 @@ GCC_MAKE:= \
$(MAKE) \
-define Build/SetToolchainInfo
+define Host/SetToolchainInfo
$(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
endef
define Stage0/Configure
- mkdir -p $(PKG_BUILD_DIR0)
- (cd $(PKG_BUILD_DIR0); rm -f config.cache; \
+ mkdir -p $(HOST_BUILD_DIR0)
+ (cd $(HOST_BUILD_DIR0); rm -f config.cache; \
$(GCC_CONFIGURE_STAGE0) \
);
endef
define Stage0/Compile
- $(GCC_MAKE) -C $(PKG_BUILD_DIR0) all-gcc
+ $(GCC_MAKE) -C $(HOST_BUILD_DIR0) all-gcc
endef
define Stage0/Install
- $(GCC_MAKE) -C $(PKG_BUILD_DIR0) install-gcc
+ $(GCC_MAKE) -C $(HOST_BUILD_DIR0) install-gcc
endef
define Stage1/Configure
- mkdir -p $(PKG_BUILD_DIR1)
- (cd $(PKG_BUILD_DIR1); rm -f config.cache; \
+ mkdir -p $(HOST_BUILD_DIR1)
+ (cd $(HOST_BUILD_DIR1); rm -f config.cache; \
$(GCC_CONFIGURE_STAGE1) \
);
endef
define Stage1/Compile
$(CP) $(BUILD_DIR_TOOLCHAIN)/linux-dev/* $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/
- $(GCC_MAKE) -C $(PKG_BUILD_DIR1) \
+ $(GCC_MAKE) -C $(HOST_BUILD_DIR1) \
all-build-libiberty \
all-gcc \
$(if $(GCC_BUILD_TARGET_LIBGCC),all-target-libgcc)
endef
define Stage1/Install
- $(GCC_MAKE) -C $(PKG_BUILD_DIR1) \
+ $(GCC_MAKE) -C $(HOST_BUILD_DIR1) \
install-gcc \
$(if $(GCC_BUILD_TARGET_LIBGCC),install-target-libgcc)
@@ -188,19 +188,19 @@ endef
define Stage2/Configure
- mkdir -p $(PKG_BUILD_DIR2) $(TOOLCHAIN_DIR)/usr/$(REAL_GNU_TARGET_NAME)
+ mkdir -p $(HOST_BUILD_DIR2) $(TOOLCHAIN_DIR)/usr/$(REAL_GNU_TARGET_NAME)
# Important! Required for limits.h to be fixed.
rm -rf $(TOOLCHAIN_DIR)/usr/$(REAL_GNU_TARGET_NAME)/sys-include
ln -sf ../include $(TOOLCHAIN_DIR)/usr/$(REAL_GNU_TARGET_NAME)/sys-include
rm -rf $(TOOLCHAIN_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib
ln -sf ../lib $(TOOLCHAIN_DIR)/usr/$(REAL_GNU_TARGET_NAME)/lib
- (cd $(PKG_BUILD_DIR2); rm -f config.cache; \
+ (cd $(HOST_BUILD_DIR2); rm -f config.cache; \
$(GCC_CONFIGURE_STAGE2) \
);
endef
define Stage2/Compile
- $(GCC_MAKE) -C $(PKG_BUILD_DIR2) all
+ $(GCC_MAKE) -C $(HOST_BUILD_DIR2) all
endef
define SetupExtraArch
@@ -217,7 +217,7 @@ define SetupExtraArch
endef
define Stage2/Install
- $(GCC_MAKE) -C $(PKG_BUILD_DIR2) install
+ $(GCC_MAKE) -C $(HOST_BUILD_DIR2) install
# Set up the symlinks to enable lying about target name.
set -e; \
(cd $(TOOLCHAIN_DIR)/usr; \
@@ -232,41 +232,41 @@ define Stage2/Install
endef
-define Build/Prepare
- $(call Build/SetToolchainInfo)
- $(call Build/Prepare/Default)
+define Host/Prepare
+ $(call Host/SetToolchainInfo)
+ $(call Host/Prepare/Default)
ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
- $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(PKG_BUILD_DIR)/
- $(SED) 's,\(version_string.. = "[0-9\.]*\).*\(";\),\1 (OpenWrt-2.0)\2,' $(PKG_BUILD_DIR)/gcc/version.c
- $(SED) 's,\(bug_report_url.. = "\).*\(";\),\1<URL:https://dev.openwrt.org/>\2,' $(PKG_BUILD_DIR)/gcc/version.c
- (cd $(PKG_BUILD_DIR)/libstdc++-v3; autoconf;);
- $(SED) 's,gcc_no_link=yes,gcc_no_link=no,' $(PKG_BUILD_DIR)/libstdc++-v3/configure
+ $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_BUILD_DIR)/
+ $(SED) 's,\(version_string.. = "[0-9\.]*\).*\(";\),\1 (OpenWrt-2.0)\2,' $(HOST_BUILD_DIR)/gcc/version.c
+ $(SED) 's,\(bug_report_url.. = "\).*\(";\),\1<URL:https://dev.openwrt.org/>\2,' $(HOST_BUILD_DIR)/gcc/version.c
+ (cd $(HOST_BUILD_DIR)/libstdc++-v3; autoconf;);
+ $(SED) 's,gcc_no_link=yes,gcc_no_link=no,' $(HOST_BUILD_DIR)/libstdc++-v3/configure
$(call Stage0/Configure)
$(call Stage0/Compile)
$(call Stage0/Install)
endef
-define Build/Configure
+define Host/Configure
endef
-define Build/Compile
+define Host/Compile
$(call Stage1/Configure)
$(call Stage1/Compile)
$(call Stage1/Install)
endef
-define Build/Install
+define Host/Install
$(call Stage2/Configure)
$(call Stage2/Compile)
$(call Stage2/Install)
endef
-define Build/Clean
+define Host/Clean
rm -rf \
- $(PKG_BUILD_DIR) \
- $(PKG_BUILD_DIR0) \
- $(PKG_BUILD_DIR1) \
- $(PKG_BUILD_DIR2) \
+ $(HOST_BUILD_DIR) \
+ $(HOST_BUILD_DIR0) \
+ $(HOST_BUILD_DIR1) \
+ $(HOST_BUILD_DIR2) \
$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) \
$(TOOLCHAIN_DIR)/usr/$(REAL_GNU_TARGET_NAME) \
$(TOOLCHAIN_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-gc* \
diff --git a/toolchain/gdb/Makefile b/toolchain/gdb/Makefile
index be3e423a1c..4911faef1c 100644
--- a/toolchain/gdb/Makefile
+++ b/toolchain/gdb/Makefile
@@ -19,11 +19,11 @@ BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
include $(INCLUDE_DIR)/host-build.mk
-define Build/Configure
- (cd $(PKG_BUILD_DIR); \
+define Host/Configure
+ (cd $(HOST_BUILD_DIR); \
gdb_cv_func_sigsetjmp=yes \
CFLAGS="-O2" \
- $(PKG_BUILD_DIR)/configure \
+ $(HOST_BUILD_DIR)/configure \
--prefix=$(TOOLCHAIN_DIR)/usr \
--build=$(GNU_HOST_NAME) \
--host=$(GNU_HOST_NAME) \
@@ -36,20 +36,20 @@ define Build/Configure
);
endef
-define Build/Compile
- $(MAKE) -C $(PKG_BUILD_DIR)
+define Host/Compile
+ $(MAKE) -C $(HOST_BUILD_DIR)
endef
-define Build/Install
+define Host/Install
mkdir -p $(TOOLCHAIN_DIR)/usr/bin
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CROSS)gdb
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/gdb/gdb $(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CROSS)gdb
ln -fs $(TARGET_CROSS)gdb $(TOOLCHAIN_DIR)/usr/bin/$(GNU_TARGET_NAME)-gdb
strip $(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CROSS)gdb
endef
-define Build/Clean
+define Host/Clean
rm -rf \
- $(PKG_BUILD_DIR) \
+ $(HOST_BUILD_DIR) \
$(TOOLCHAIN_DIR)/usr/bin/$(TARGET_CROSS)gdb \
$(TOOLCHAIN_DIR)/usr/bin/$(GNU_TARGET_NAME)-gdb
endef
diff --git a/toolchain/glibc-ports/Makefile b/toolchain/glibc-ports/Makefile
index d9e5d0d7f5..a60b71f431 100644
--- a/toolchain/glibc-ports/Makefile
+++ b/toolchain/glibc-ports/Makefile
@@ -34,23 +34,23 @@ include $(INCLUDE_DIR)/host-build.mk
STAMP_BUILT:=$(TOOLCHAIN_DIR)/stamp/.glibc-ports_built
STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.glibc-ports_installed
-define Build/Prepare
-$(call Build/Prepare/Default)
+define Host/Prepare
+$(call Host/Prepare/Default)
ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
endef
-define Build/Configure
+define Host/Configure
endef
-define Build/Compile
+define Host/Compile
endef
-define Build/Install
+define Host/Install
endef
-define Build/Clean
+define Host/Clean
rm -rf \
- $(PKG_BUILD_DIR) \
+ $(HOST_BUILD_DIR) \
$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
endef
diff --git a/toolchain/glibc/Makefile b/toolchain/glibc/Makefile
index f808615cd4..73dbdd8fe5 100644
--- a/toolchain/glibc/Makefile
+++ b/toolchain/glibc/Makefile
@@ -34,15 +34,15 @@ include $(INCLUDE_DIR)/host-build.mk
STAMP_BUILT:=$(TOOLCHAIN_DIR)/stamp/.glibc_built
STAMP_INSTALLED:=$(TOOLCHAIN_DIR)/stamp/.glibc_installed
-PKG_BUILD_DIR1:=$(PKG_BUILD_DIR)-initial
-PKG_BUILD_DIR2:=$(PKG_BUILD_DIR)-final
+HOST_BUILD_DIR1:=$(HOST_BUILD_DIR)-initial
+HOST_BUILD_DIR2:=$(HOST_BUILD_DIR)-final
GLIBC_ADD_ONS+=nptl,
ifneq ($(CONFIG_GLIBC_PORTS),)
GLIBC_ADD_ONS+=ports,
- define Build/Prepare/ports
- ln -snf ../glibc-ports $(PKG_BUILD_DIR)/ports
+ define Host/Prepare/ports
+ ln -snf ../glibc-ports $(HOST_BUILD_DIR)/ports
endef
endif
@@ -57,7 +57,7 @@ GLIBC_CONFIGURE:= \
libc_cv_forced_unwind=yes \
libc_cv_c_cleanup=yes \
libc_cv_386_tls=yes \
- $(PKG_BUILD_DIR)/configure \
+ $(HOST_BUILD_DIR)/configure \
--prefix=/usr \
--build=$(GNU_HOST_NAME) \
--host=$(REAL_GNU_TARGET_NAME) \
@@ -88,7 +88,7 @@ GLIBC_MAKE:= \
$(MAKE) \
-define Build/SetToolchainInfo
+define Host/SetToolchainInfo
$(SED) 's,^\(LIBC_TYPE\)=.*,\1=$(PKG_NAME),' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_URL\)=.*,\1=http://www.gnu.org/software/libc/,' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk
@@ -96,8 +96,8 @@ define Build/SetToolchainInfo
endef
define Stage1/Configure
- mkdir -p $(PKG_BUILD_DIR1)
- ( cd $(PKG_BUILD_DIR1); rm -f config.cache; \
+ mkdir -p $(HOST_BUILD_DIR1)
+ ( cd $(HOST_BUILD_DIR1); rm -f config.cache; \
$(GLIBC_CONFIGURE_STAGE1) \
);
endef
@@ -106,31 +106,31 @@ define Stage1/Compile
endef
define Stage1/Install
- $(GLIBC_MAKE) -C $(PKG_BUILD_DIR1) \
+ $(GLIBC_MAKE) -C $(HOST_BUILD_DIR1) \
CFLAGS="-DBOOTSTRAP_GCC" \
cross-compiling=yes \
install_root="$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev" \
install-headers
[ -f $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/usr/include/bits/stdio_lim.h ] || \
- $(CP) $(PKG_BUILD_DIR1)/bits/stdio_lim.h \
+ $(CP) $(HOST_BUILD_DIR1)/bits/stdio_lim.h \
$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/usr/include/bits/stdio_lim.h
[ -f $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/usr/include/gnu/stubs.h ] || \
touch $(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/usr/include/gnu/stubs.h
endef
define Stage2/Configure
- mkdir -p $(PKG_BUILD_DIR2)
- ( cd $(PKG_BUILD_DIR2); rm -f config.cache; \
+ mkdir -p $(HOST_BUILD_DIR2)
+ ( cd $(HOST_BUILD_DIR2); rm -f config.cache; \
$(GLIBC_CONFIGURE_STAGE2) \
);
endef
define Stage2/Compile
- $(GLIBC_MAKE) -C $(PKG_BUILD_DIR2) all
+ $(GLIBC_MAKE) -C $(HOST_BUILD_DIR2) all
endef
define Stage2/Install
- $(GLIBC_MAKE) -C $(PKG_BUILD_DIR2) \
+ $(GLIBC_MAKE) -C $(HOST_BUILD_DIR2) \
install_root="$(TOOLCHAIN_DIR)" \
install
( cd $(TOOLCHAIN_DIR) ; \
@@ -144,33 +144,33 @@ define Stage2/Install
)
endef
-define Build/Prepare
- $(call Build/SetToolchainInfo)
- $(call Build/Prepare/Default)
+define Host/Prepare
+ $(call Host/SetToolchainInfo)
+ $(call Host/Prepare/Default)
ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
- $(call Build/Prepare/ports)
+ $(call Host/Prepare/ports)
$(call Stage1/Configure)
$(call Stage1/Compile)
$(call Stage1/Install)
endef
-define Build/Configure
+define Host/Configure
endef
-define Build/Compile
+define Host/Compile
$(call Stage2/Configure)
$(call Stage2/Compile)
$(call Stage2/Install)
endef
-define Build/Install
+define Host/Install
endef
-define Build/Clean
+define Host/Clean
rm -rf \
- $(PKG_BUILD_DIR) \
- $(PKG_BUILD_DIR1) \
- $(PKG_BUILD_DIR2) \
+ $(HOST_BUILD_DIR) \
+ $(HOST_BUILD_DIR1) \
+ $(HOST_BUILD_DIR2) \
$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev \
$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
endef
diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile
index cf5a384295..38e65189b3 100644
--- a/toolchain/kernel-headers/Makefile
+++ b/toolchain/kernel-headers/Makefile
@@ -21,9 +21,9 @@ PKG_NAME:=linux
PKG_VERSION:=$(LINUX_VERSION)
PKG_SOURCE:=$(LINUX_SOURCE)
PKG_SOURCE_URL:=$(LINUX_SITE)
-PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
+HOST_BUILD_DIR:=$(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
PKG_MD5SUM:=$(LINUX_KERNEL_MD5SUM)
-LINUX_DIR := $(PKG_BUILD_DIR)
+LINUX_DIR := $(HOST_BUILD_DIR)
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/kernel-defaults.mk
@@ -36,26 +36,26 @@ ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.18)),1)
LINUX_HAS_HEADERS_INSTALL:=y
endif
-KMAKE := $(MAKE) -C $(PKG_BUILD_DIR) \
+KMAKE := $(MAKE) -C $(HOST_BUILD_DIR) \
ARCH=$(LINUX_KARCH) \
KBUILD_HAVE_NLS=no \
CONFIG_SHELL=$(BASH)
-define Build/Prepare/pre/cris
- ln -sf $(PKG_BUILD_DIR)/include/asm-cris/arch-v10 $(PKG_BUILD_DIR)/include/asm-cris/arch
- ln -sf $(PKG_BUILD_DIR)/include/asm-cris/arch-v10 $(PKG_BUILD_DIR)/arch/cris/arch
+define Host/Prepare/pre/cris
+ ln -sf $(HOST_BUILD_DIR)/include/asm-cris/arch-v10 $(HOST_BUILD_DIR)/include/asm-cris/arch
+ ln -sf $(HOST_BUILD_DIR)/include/asm-cris/arch-v10 $(HOST_BUILD_DIR)/arch/cris/arch
endef
-define Build/Prepare/pre/powerpc
- if [ -d $(PKG_BUILD_DIR)/include/asm-ppc ]; then \
- $(CP) $(PKG_BUILD_DIR)/include/asm-ppc/* $(PKG_BUILD_DIR)/include/asm-powerpc/; \
- rm -rf $(PKG_BUILD_DIR)/include/asm-ppc; \
- ln -s $(PKG_BUILD_DIR)/include/asm-powerpc $(PKG_BUILD_DIR)/include/asm-ppc; \
+define Host/Prepare/pre/powerpc
+ if [ -d $(HOST_BUILD_DIR)/include/asm-ppc ]; then \
+ $(CP) $(HOST_BUILD_DIR)/include/asm-ppc/* $(HOST_BUILD_DIR)/include/asm-powerpc/; \
+ rm -rf $(HOST_BUILD_DIR)/include/asm-ppc; \
+ ln -s $(HOST_BUILD_DIR)/include/asm-powerpc $(HOST_BUILD_DIR)/include/asm-ppc; \
fi
endef
ifneq ($(LINUX_HAS_HEADERS_INSTALL),)
- define Build/Prepare/all
+ define Host/Prepare/all
mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr
$(KMAKE) \
CROSS_COMPILE=$(TARGET_CROSS) \
@@ -63,85 +63,85 @@ ifneq ($(LINUX_HAS_HEADERS_INSTALL),)
headers_install
endef
else
- define Build/Prepare/all
+ define Host/Prepare/all
mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include
cp -pLR \
- $(PKG_BUILD_DIR)/include/asm \
- $(PKG_BUILD_DIR)/include/asm-generic \
- $(PKG_BUILD_DIR)/include/asm-$(LINUX_KARCH) \
- $(PKG_BUILD_DIR)/include/linux \
+ $(HOST_BUILD_DIR)/include/asm \
+ $(HOST_BUILD_DIR)/include/asm-generic \
+ $(HOST_BUILD_DIR)/include/asm-$(LINUX_KARCH) \
+ $(HOST_BUILD_DIR)/include/linux \
$(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/
endef
endif
# XXX: the following is needed to build lzma-loader
-define Build/Prepare/lzma
+define Host/Prepare/lzma
$(CP) \
- $(PKG_BUILD_DIR)/include/asm-mips/asm.h \
- $(PKG_BUILD_DIR)/include/asm-mips/regdef.h \
+ $(HOST_BUILD_DIR)/include/asm-mips/asm.h \
+ $(HOST_BUILD_DIR)/include/asm-mips/regdef.h \
$(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm/
endef
# XXX: the following are needed to build a cris toolchain
-define Build/Prepare/post/cris
+define Host/Prepare/post/cris
$(CP) \
- $(PKG_BUILD_DIR)/include/linux/user.h \
+ $(HOST_BUILD_DIR)/include/linux/user.h \
$(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/linux/
$(CP) \
- $(PKG_BUILD_DIR)/include/asm-cris/elf.h \
- $(PKG_BUILD_DIR)/include/asm-cris/page.h \
- $(PKG_BUILD_DIR)/include/asm-cris/user.h \
+ $(HOST_BUILD_DIR)/include/asm-cris/elf.h \
+ $(HOST_BUILD_DIR)/include/asm-cris/page.h \
+ $(HOST_BUILD_DIR)/include/asm-cris/user.h \
$(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm/
mkdir -p $(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm/arch
$(CP) \
- $(PKG_BUILD_DIR)/include/asm-cris/arch/elf.h \
- $(PKG_BUILD_DIR)/include/asm-cris/arch/page.h \
- $(PKG_BUILD_DIR)/include/asm-cris/arch/ptrace.h \
- $(PKG_BUILD_DIR)/include/asm-cris/arch/user.h \
+ $(HOST_BUILD_DIR)/include/asm-cris/arch/elf.h \
+ $(HOST_BUILD_DIR)/include/asm-cris/arch/page.h \
+ $(HOST_BUILD_DIR)/include/asm-cris/arch/ptrace.h \
+ $(HOST_BUILD_DIR)/include/asm-cris/arch/user.h \
$(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm/arch/
$(CP) \
- $(PKG_BUILD_DIR)/include/asm-generic/memory_model.h \
- $(PKG_BUILD_DIR)/include/asm-generic/page.h \
+ $(HOST_BUILD_DIR)/include/asm-generic/memory_model.h \
+ $(HOST_BUILD_DIR)/include/asm-generic/page.h \
$(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include/asm-generic/
endef
-define Build/Prepare/post/mips
- $(call Build/Prepare/lzma)
+define Host/Prepare/post/mips
+ $(call Host/Prepare/lzma)
endef
-define Build/Prepare/post/mipsel
- $(call Build/Prepare/lzma)
+define Host/Prepare/post/mipsel
+ $(call Host/Prepare/lzma)
endef
-define Build/Prepare
+define Host/Prepare
$(call Kernel/Prepare/Default)
ln -sf linux-$(LINUX_VERSION) $(BUILD_DIR_TOOLCHAIN)/linux
- $(SED) 's/@expr length/@-expr length/' $(PKG_BUILD_DIR)/Makefile
+ $(SED) 's/@expr length/@-expr length/' $(HOST_BUILD_DIR)/Makefile
yes '' | $(KMAKE) oldconfig
$(KMAKE) include/linux/version.h include/asm
- if [ -d $(PKG_BUILD_DIR)/arch/$(LINUX_KARCH)/include/asm ]; then \
+ if [ -d $(HOST_BUILD_DIR)/arch/$(LINUX_KARCH)/include/asm ]; then \
$(CP) \
- $(PKG_BUILD_DIR)/arch/$(LINUX_KARCH)/include/asm/. \
- $(PKG_BUILD_DIR)/include/asm-$(LINUX_KARCH)/; \
+ $(HOST_BUILD_DIR)/arch/$(LINUX_KARCH)/include/asm/. \
+ $(HOST_BUILD_DIR)/include/asm-$(LINUX_KARCH)/; \
fi
- $(call Build/Prepare/pre/$(ARCH))
- $(call Build/Prepare/all)
- $(call Build/Prepare/post/$(ARCH))
+ $(call Host/Prepare/pre/$(ARCH))
+ $(call Host/Prepare/all)
+ $(call Host/Prepare/post/$(ARCH))
endef
-define Build/Configure
+define Host/Configure
endef
-define Build/Compile
+define Host/Compile
endef
-define Build/Install
+define Host/Install
$(CP) $(BUILD_DIR_TOOLCHAIN)/linux-dev/* $(TOOLCHAIN_DIR)/
endef
-define Build/Clean
+define Host/Clean
rm -rf \
- $(PKG_BUILD_DIR) \
+ $(HOST_BUILD_DIR) \
$(BUILD_DIR_TOOLCHAIN)/linux \
$(BUILD_DIR_TOOLCHAIN)/linux-dev
endef
diff --git a/toolchain/uClibc/Makefile b/toolchain/uClibc/Makefile
index 45dbcef0c5..ce9acad447 100644
--- a/toolchain/uClibc/Makefile
+++ b/toolchain/uClibc/Makefile
@@ -54,9 +54,9 @@ endif
STAGING_DIR_HOST:=$(TOOLCHAIN_DIR)
BUILD_DIR_HOST:=$(BUILD_DIR_TOOLCHAIN)
ifeq ($(PKG_VERSION_SNAPSHOT),y)
- PKG_BUILD_DIR:=$(BUILD_DIR_HOST)/uClibc-$(PKG_EXTRAVERSION)
+ HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/uClibc-$(PKG_EXTRAVERSION)
else
- PKG_BUILD_DIR:=$(BUILD_DIR_HOST)/uClibc-$(PKG_VERSION)$(PKG_EXTRAVERSION)
+ HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/uClibc-$(PKG_VERSION)$(PKG_EXTRAVERSION)
endif
override CONFIG_AUTOREBUILD=
@@ -82,44 +82,44 @@ UCLIBC_TARGET_ARCH:=$(shell echo $(ARCH) | sed -e s'/-.*//' \
)
-define Build/SetToolchainInfo
+define Host/SetToolchainInfo
$(SED) 's,^\(LIBC_TYPE\)=.*,\1=$(PKG_NAME),' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_URL\)=.*,\1=http://www.uclibc.org/,' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_VERSION\)=.*,\1=$(PKG_VERSION),' $(TOOLCHAIN_DIR)/info.mk
$(SED) 's,^\(LIBC_PATCHVER\)=.*,\1=$(PKG_EXTRAVERSION),' $(TOOLCHAIN_DIR)/info.mk
endef
-define Build/Prepare/Snapshot
+define Host/Prepare/Snapshot
$(PKG_UNPACK)
- rm -Rf $(PKG_BUILD_DIR)
- ln -snf $(BUILD_DIR_TOOLCHAIN)/uClibc $(PKG_BUILD_DIR)
- $(Build/Patch)
- $(if $(QUILT),touch $(PKG_BUILD_DIR)/.quilt_used)
+ rm -Rf $(HOST_BUILD_DIR)
+ ln -snf $(BUILD_DIR_TOOLCHAIN)/uClibc $(HOST_BUILD_DIR)
+ $(Host/Patch)
+ $(if $(QUILT),touch $(HOST_BUILD_DIR)/.quilt_used)
endef
-define Build/Prepare/V_0_9_28
+define Host/Prepare/V_0_9_28
$(SED) 's,^KERNEL_SOURCE=.*,KERNEL_SOURCE=\"$(BUILD_DIR_TOOLCHAIN)/linux\",g' \
- $(PKG_BUILD_DIR)/.config
+ $(HOST_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
+ $(SED) 's,.*HAS_FPU.*,HAS_FPU=n\nUCLIBC_HAS_FLOATS=y\nUCLIBC_HAS_SOFT_FLOAT=y,g' $(HOST_BUILD_DIR)/.config
endif
ifeq ($(CONFIG_C99_MATH),y)
- $(SED) 's,.*DO_C99_MATH.*,DO_C99_MATH=y,g' $(PKG_BUILD_DIR)/.config
+ $(SED) 's,.*DO_C99_MATH.*,DO_C99_MATH=y,g' $(HOST_BUILD_DIR)/.config
endif
endef
-define Build/Prepare
- $(call Build/SetToolchainInfo)
+define Host/Prepare
+ $(call Host/SetToolchainInfo)
@echo prepare uClibc version $(PKG_VERSION)$(PKG_EXTRAVERSION)
ifeq ($(PKG_VERSION_SNAPSHOT),y)
- $(call Build/Prepare/Snapshot)
+ $(call Host/Prepare/Snapshot)
else
- $(call Build/Prepare/Default)
+ $(call Host/Prepare/Default)
ln -snf $(PKG_NAME)-$(PKG_VERSION) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
endif
- $(CP) ./$(CONFIG_DIR)/$(ARCH)$(if $(wildcard $(CONFIG_DIR)/$(ARCH).$(BOARD)),.$(BOARD)) $(PKG_BUILD_DIR)/.config
+ $(CP) ./$(CONFIG_DIR)/$(ARCH)$(if $(wildcard $(CONFIG_DIR)/$(ARCH).$(BOARD)),.$(BOARD)) $(HOST_BUILD_DIR)/.config
ifeq ($(PKG_VERSION),0.9.28)
- $(call Build/Prepare/V_0_9_28)
+ $(call Host/Prepare/V_0_9_28)
endif
$(SED) 's,^KERNEL_HEADERS=.*,KERNEL_HEADERS=\"$(BUILD_DIR_TOOLCHAIN)/linux-dev/usr/include\",g' \
-e 's,^.*UCLIBC_HAS_FPU.*,UCLIBC_HAS_FPU=$(if $(CONFIG_SOFT_FLOAT),n,y),g' \
@@ -128,9 +128,9 @@ define Build/Prepare
-e 's,^.*CONFIG_ARM_EABI.*,CONFIG_ARM_EABI=$(if $(CONFIG_EABI_SUPPORT),y,n),g' \
-e 's,^.*CONFIG_ARM_OABI.*,CONFIG_ARM_OABI=$(if $(CONFIG_EABI_SUPPORT),n,y),g' \
-e 's,^.*UCLIBC_HAS_SHADOW.*,UCLIBC_HAS_SHADOW=$(if $(CONFIG_SHADOW_PASSWORDS),y,n),g' \
- $(PKG_BUILD_DIR)/.config
- $(MAKE) -C $(PKG_BUILD_DIR)/extra/config conf KBUILD_HAVE_NLS= HOSTCFLAGS="-DKBUILD_NO_NLS"
- PATH=$(TARGET_PATH) $(MAKE) -C $(PKG_BUILD_DIR) \
+ $(HOST_BUILD_DIR)/.config
+ $(MAKE) -C $(HOST_BUILD_DIR)/extra/config conf KBUILD_HAVE_NLS= HOSTCFLAGS="-DKBUILD_NO_NLS"
+ PATH=$(TARGET_PATH) $(MAKE) -C $(HOST_BUILD_DIR) \
PREFIX="$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/" \
DEVEL_PREFIX=/usr/ \
RUNTIME_PREFIX="$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev/" \
@@ -141,10 +141,10 @@ define Build/Prepare
$(if $(CONFIG_UCLIBC_VERSION_0_9_28),install_dev,install_headers)
endef
-define Build/Configure
+define Host/Configure
endef
-UCLIBC_MAKE := PATH=$(TARGET_PATH) $(MAKE) -C $(PKG_BUILD_DIR) \
+UCLIBC_MAKE := PATH=$(TARGET_PATH) $(MAKE) -C $(HOST_BUILD_DIR) \
$(TARGET_CONFIGURE_OPTS) \
DEVEL_PREFIX=/usr/ \
RUNTIME_PREFIX=/ \
@@ -152,8 +152,8 @@ UCLIBC_MAKE := PATH=$(TARGET_PATH) $(MAKE) -C $(PKG_BUILD_DIR) \
CPU_CFLAGS="$(TARGET_CFLAGS)" \
DOSTRIP=""
-define Build/Compile
- $(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(PKG_BUILD_DIR)/Rules.mak
+define Host/Compile
+ $(SED) 's,^CROSS=.*,CROSS=$(TARGET_CROSS),g' $(HOST_BUILD_DIR)/Rules.mak
$(UCLIBC_MAKE) PREFIX= all
$(UCLIBC_MAKE) PREFIX="$(TOOLCHAIN_DIR)/" install_runtime install_dev
ln -sf ../../lib/libc.so.0 $(TOOLCHAIN_DIR)/usr/lib/libc.so
@@ -168,21 +168,21 @@ define Build/Compile
# )
endef
-define Build/Install
+define Host/Install
$(UCLIBC_MAKE) PREFIX= utils
$(INSTALL_DIR) $(TOOLCHAIN_DIR)/usr/bin
$(INSTALL_BIN) \
- $(PKG_BUILD_DIR)/utils/ldd \
+ $(HOST_BUILD_DIR)/utils/ldd \
$(TOOLCHAIN_DIR)/usr/bin/
$(INSTALL_DIR) $(TOOLCHAIN_DIR)/sbin
$(INSTALL_BIN) \
- $(PKG_BUILD_DIR)/utils/ldconfig \
+ $(HOST_BUILD_DIR)/utils/ldconfig \
$(TOOLCHAIN_DIR)/sbin/
endef
-define Build/Clean
+define Host/Clean
rm -rf \
- $(PKG_BUILD_DIR) \
+ $(HOST_BUILD_DIR) \
$(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME) \
$(BUILD_DIR_TOOLCHAIN)/$(LIBC)-dev
endef