From f06aece697aeab98f44c6ad0017e87e36c8ae764 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 2 Dec 2015 08:51:13 +0100 Subject: simplify toolchain building Buildroot uses the two-stage mechanism since a while. This reduces the build time a lot. Instead of three stages, we just use the two-stage build. The benefit is that the C library do not need to be rebuild and one gcc compile is obsolete. Tested with embedded-test.sh. There is one unresolved problem, tile toolchain building is broken. --- toolchain/glibc/Makefile | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) (limited to 'toolchain/glibc/Makefile') diff --git a/toolchain/glibc/Makefile b/toolchain/glibc/Makefile index cecb784c9..c952a9c12 100644 --- a/toolchain/glibc/Makefile +++ b/toolchain/glibc/Makefile @@ -20,30 +20,8 @@ ifeq (${ADK_MAKE_PARALLEL},y) GLIBC_MAKEOPTS+= PARALLELMFLAGS="-j$(ADK_MAKE_JOBS)" endif - -GLIBC_BUILD_DIR_INITIAL:= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)-headers GLIBC_BUILD_DIR_FINAL:= ${WRKDIR}/$(PKG_NAME)-$(PKG_VERSION)-final -$(WRKBUILD)/.headers_configure: - mkdir -p $(GLIBC_BUILD_DIR_INITIAL) - (cd $(GLIBC_BUILD_DIR_INITIAL); \ - ${GLIBC_ENV} \ - $(WRKBUILD)/configure \ - --prefix=$(STAGING_TARGET_DIR)/usr \ - --with-sysroot=$(STAGING_TARGET_DIR) \ - ${GLIBC_CONFOPTS} \ - ); - touch $@ - -$(WRKBUILD)/.headers: $(WRKBUILD)/.headers_configure - (cd $(GLIBC_BUILD_DIR_INITIAL); \ - ${GLIBC_ENV} \ - $(MAKE) ${GLIBC_MAKEOPTS} install-headers \ - ); - touch $(STAGING_TARGET_DIR)/usr/include/gnu/stubs.h - touch $(STAGING_TARGET_DIR)/usr/include/gnu/stubs-{32,x32,64,soft,hard}.h - touch $@ - $(WRKBUILD)/.configured: mkdir -p $(GLIBC_BUILD_DIR_FINAL) (cd $(GLIBC_BUILD_DIR_FINAL); \ @@ -62,20 +40,14 @@ $(WRKBUILD)/.compiled: $(WRKBUILD)/.installed: ${GLIBC_ENV} $(MAKE) -C $(GLIBC_BUILD_DIR_FINAL) install_root=$(STAGING_TARGET_DIR) install + touch $(STAGING_TARGET_DIR)/usr/include/gnu/stubs.h + touch $(STAGING_TARGET_DIR)/usr/include/gnu/stubs-{32,x32,64,soft,hard}.h mkdir -p ${STAGING_TARGET_DIR}/etc ${INSTALL_DATA} ${WRKBUILD}/posix/gai.conf ${STAGING_TARGET_DIR}/etc ${INSTALL_DATA} ${WRKBUILD}/nss/nsswitch.conf ${STAGING_TARGET_DIR}/etc touch $@ -$(WRKBUILD)/.fixup: - -find $(STAGING_TARGET_DIR) $(STAGING_HOST_DIR) -name \*.la -exec rm {} \; - rm -rf $(STAGING_TARGET_DIR)/usr/share/locale $(STAGING_TARGET_DIR)/usr/share/i18n -ifeq ($(ADK_TARGET_TOOLCHAIN),y) - # strip target libs and host tools for toolchain builds - PATH="$(TARGET_PATH)" debug='0' prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh \ - $(STAGING_TARGET_DIR) $(TOOLCHAIN_DIR)/usr/lib/gcc/$(GNU_TARGET_NAME) - debug='0' prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(TOOLCHAIN_DIR)/usr/bin -endif +$(WRKBUILD)/.final: touch $@ include ${ADK_TOPDIR}/mk/toolchain.mk -- cgit v1.2.3