diff options
author | Felix Fietkau <nbd@nbd.name> | 2016-07-07 14:12:30 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2016-07-07 15:13:40 +0200 |
commit | 74c9b9cfeb0e7cd045b969474a9bcd9ab38bd7d2 (patch) | |
tree | b51b7445b93c69cee641e7cdf0643f6bc18f1853 /toolchain/Makefile | |
parent | 1692c71564ef4084feb0df30f04d292b52e8f976 (diff) | |
download | upstream-74c9b9cfeb0e7cd045b969474a9bcd9ab38bd7d2.tar.gz upstream-74c9b9cfeb0e7cd045b969474a9bcd9ab38bd7d2.tar.bz2 upstream-74c9b9cfeb0e7cd045b969474a9bcd9ab38bd7d2.zip |
toolchain: skip gcc/minimal for musl
No extra libc header build step is done, so no extra toolchain is needed
for preparing it.
This saves a significant amount of build time and disk space
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'toolchain/Makefile')
-rw-r--r-- | toolchain/Makefile | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/toolchain/Makefile b/toolchain/Makefile index cd5399e041..7d2fddda31 100644 --- a/toolchain/Makefile +++ b/toolchain/Makefile @@ -24,33 +24,42 @@ # 8) toolchain/libc/utils/install # build & install libc utilities # +# For musl, steps 2 and 4 are skipped, and step 3 is done after 5 curdir:=toolchain # subdirectories to descend into -$(curdir)/builddirs := $(if $(CONFIG_GDB),gdb) $(if $(CONFIG_INSIGHT),insight) $(if $(CONFIG_EXTERNAL_TOOLCHAIN),wrapper,kernel-headers binutils gcc/minimal gcc/initial gcc/final $(LIBC)/headers $(LIBC) fortify-headers) +$(curdir)/builddirs := $(if $(CONFIG_GDB),gdb) $(if $(CONFIG_INSIGHT),insight) $(if $(CONFIG_EXTERNAL_TOOLCHAIN),wrapper,kernel-headers binutils gcc/initial gcc/final $(LIBC) fortify-headers) ifdef CONFIG_USE_UCLIBC $(curdir)/builddirs += $(LIBC)/utils endif -$(curdir)/builddirs-compile:=$($(curdir)/builddirs-prepare) -$(curdir)/builddirs-install:=$($(curdir)/builddirs-compile) # builddir dependencies ifeq ($(CONFIG_EXTERNAL_TOOLCHAIN),) - $(curdir)/gcc/minimal/compile:=$(curdir)/binutils/install - $(curdir)/kernel-headers/install:=$(curdir)/gcc/minimal/install - $(curdir)/gcc/initial/prepare:=$(curdir)/gcc/minimal/prepare - $(curdir)/gcc/final/prepare:=$(curdir)/gcc/initial/prepare + ifdef CONFIG_USE_MUSL + $(curdir)/kernel-headers/compile:=$(curdir)/gcc/initial/install + $(curdir)/$(LIBC)/compile:=$(curdir)/kernel-headers/install + else + $(curdir)/builddirs += $(LIBC)/headers gcc/minimal + $(curdir)/gcc/minimal/compile:=$(curdir)/binutils/install + $(curdir)/kernel-headers/compile:=$(curdir)/gcc/minimal/install + $(curdir)/gcc/initial/prepare:=$(curdir)/gcc/minimal/prepare + $(curdir)/$(LIBC)/prepare:=$(curdir)/$(LIBC)/headers/prepare + $(curdir)/$(LIBC)/headers/compile:=$(curdir)/kernel-headers/install + $(curdir)/gcc/initial/compile:=$(curdir)/$(LIBC)/headers/install + endif - $(curdir)/$(LIBC)/headers/compile:=$(curdir)/kernel-headers/install - $(curdir)/gcc/initial/compile:=$(curdir)/$(LIBC)/headers/install + $(curdir)/gcc/initial/compile+=$(curdir)/binutils/install + $(curdir)/gcc/final/prepare:=$(curdir)/gcc/initial/prepare $(curdir)/$(LIBC)/compile:=$(curdir)/gcc/initial/install $(curdir)/gcc/final/compile:=$(curdir)/$(LIBC)/install $(curdir)/$(LIBC)/utils/compile:=$(curdir)/gcc/final/install - $(curdir)/$(LIBC)/prepare:=$(curdir)/$(LIBC)/headers/prepare $(curdir)/$(LIBC)/utils/prepare:=$(curdir)/$(LIBC)/headers/prepare endif +$(curdir)/builddirs-compile:=$($(curdir)/builddirs-prepare) +$(curdir)/builddirs-install:=$($(curdir)/builddirs-compile) + ifndef DUMP_TARGET_DB ifneq ($(ARCH),) $(TOOLCHAIN_DIR)/info.mk: .config |