summaryrefslogtreecommitdiff
path: root/toolchain/musl
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/musl
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/musl')
-rw-r--r--toolchain/musl/Makefile32
1 files changed, 2 insertions, 30 deletions
diff --git a/toolchain/musl/Makefile b/toolchain/musl/Makefile
index a5cfaa4a2..8390b13a7 100644
--- a/toolchain/musl/Makefile
+++ b/toolchain/musl/Makefile
@@ -13,26 +13,16 @@ endif
TARGET_CFLAGS:= $(filter-out -fstack-protector-all,$(TARGET_CFLAGS))
TARGET_LDFLAGS:= $(filter-out -fstack-protector-all,$(TARGET_LDFLAGS))
-$(WRKBUILD)/.headers:
+$(WRKBUILD)/.configured:
(cd $(WRKBUILD); CC='$(TARGET_CC)' CROSS_COMPILE='$(TARGET_CROSS)' \
CFLAGS='$(TARGET_CFLAGS)' \
./configure --prefix=/usr \
--target=$(GNU_TARGET_NAME) \
--disable-gcc-wrapper \
)
- $(MAKE) -C $(WRKBUILD) DESTDIR=$(STAGING_TARGET_DIR) install-headers
- touch $(WRKBUILD)/.configured
touch $@
$(WRKBUILD)/.compiled:
- # reconfigure musl, otherwise linking with libgcc or libgcc_eh is disabled
- $(MAKE) -C $(WRKBUILD) clean
- (cd $(WRKBUILD); CC='$(TARGET_CC)' CROSS_COMPILE='$(TARGET_CROSS)' \
- CFLAGS='$(TARGET_CFLAGS)' \
- ./configure --prefix=/usr \
- --target=$(GNU_TARGET_NAME) \
- --disable-gcc-wrapper \
- )
$(MAKE) -C $(WRKBUILD) CFLAGS='$(TARGET_CFLAGS)' all
touch $@
@@ -40,25 +30,7 @@ $(WRKBUILD)/.installed: $(WRKBUILD)/.compiled
$(MAKE) -C $(WRKBUILD) CFLAGS='$(TARGET_CFLAGS)' DESTDIR=$(STAGING_TARGET_DIR) install
touch $@
-$(WRKBUILD)/.fixup:
- # reconfigure musl, otherwise linking with libgcc or libgcc_eh is disabled
- $(MAKE) -C $(WRKBUILD) clean
- (cd $(WRKBUILD); CC='$(TARGET_CC)' CROSS_COMPILE='$(TARGET_CROSS)' \
- CFLAGS='$(TARGET_CFLAGS)' \
- ./configure --prefix=/usr \
- --target=$(GNU_TARGET_NAME) \
- --disable-gcc-wrapper \
- )
- $(MAKE) -C $(WRKBUILD) CFLAGS='$(TARGET_CFLAGS)' all
- $(MAKE) -C $(WRKBUILD) CFLAGS='$(TARGET_CFLAGS)' DESTDIR=$(STAGING_TARGET_DIR) install
- # cleanup toolchain
- -find $(STAGING_TARGET_DIR) $(STAGING_HOST_DIR) -name \*.la -exec rm {} \;
-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