summaryrefslogtreecommitdiff
path: root/toolchain/glibc
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-12-02 08:51:13 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2015-12-02 08:53:47 +0100
commitf06aece697aeab98f44c6ad0017e87e36c8ae764 (patch)
tree2dbfa60819b6fae3358eb997d41826940424f4c7 /toolchain/glibc
parentfcfd8fdbd759d500a5b585e58fade1bd74801c49 (diff)
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.
Diffstat (limited to 'toolchain/glibc')
-rw-r--r--toolchain/glibc/Makefile34
1 files changed, 3 insertions, 31 deletions
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