[OpenWrt-Devel] [PATCH v2/RFC] [tools] toolchain: ensure tools are built and staged before preparing toolchain

John Szakmeister john at szakmeister.net
Sat Oct 4 09:49:32 EDT 2014

This fixes an issue where the toolchain/prepare step could run, but some
of the necessary host tools might be missing.

Signed-off-by: John Szakmeister <john at szakmeister.net>

This is an updated version of a patch I sent earlier.  I believe
this fix to be more "proper", but I'd appreciate any feedback.

FWIW, it does solve the parallel build issues I've been running
into (with the host version of sed not being ready for the
prepare step for the linux headers).


 Makefile           | 2 +-
 toolchain/Makefile | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 91b6946..edb75fd 100644
--- a/Makefile
+++ b/Makefile
@@ -38,7 +38,7 @@ else
   include tools/Makefile
   include toolchain/Makefile
-$(toolchain/stamp-install): $(tools/stamp-install)
+$(toolchain/stamp-prepare): $(tools/stamp-install)
 $(target/stamp-compile): $(toolchain/stamp-install) $(tools/stamp-install) $(BUILD_DIR)/.prepared
 $(package/stamp-compile): $(target/stamp-compile) $(package/stamp-cleanup)
 $(package/stamp-install): $(package/stamp-compile)
diff --git a/toolchain/Makefile b/toolchain/Makefile
index 36c6ed3..b260a36 100644
--- a/toolchain/Makefile
+++ b/toolchain/Makefile
@@ -82,6 +82,10 @@ ifndef DUMP_TARGET_DB
+$(eval $(call stampfile,$(curdir),toolchain,prepare))
 $(eval $(call stampfile,$(curdir),toolchain,install,$(TOOLCHAIN_DIR)/stamp/.gcc-initial_installed,,$(TOOLCHAIN_DIR)))
+$($(curdir)/stamp-install): $($(curdir)/stamp-prepare)
 $(eval $(call subdir,$(curdir)))
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list