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

Felix Fietkau nbd at openwrt.org
Sat Dec 13 06:08:32 EST 2014

On 2014-12-13 11:22, John Szakmeister wrote:
> On Sat, Dec 13, 2014 at 5:11 AM, Felix Fietkau <nbd at openwrt.org> wrote:
>> On 2014-12-13 10:43, John Szakmeister wrote:
>>> On Sat, Dec 13, 2014 at 4:28 AM, John Szakmeister <john at szakmeister.net> wrote:
>>> [snip]
>>>>> This doesn't look right to me, I don't think we should add the
>>>>> toolchain/prepare step as an intermediate target for the regular build
>>>>> process.
>>>>> How about just adding this line to Makefile and leaving out the rest:
>>>>> toolchain/prepare: $(tools/stamp-install)
>>>> Who will depend on the toolchain/prepare to make sure that it
>>>> happens before toolchain/install?  I couldn't find this
>>>> happening automatically in the Makefiles, that's why I went
>>>> through the work of setting up the intermediate target.
>>>> Trying your version locally fails.
>>> Turns out this second version doesn't work either.  One of my
>>> branches had the first version of the fix in it.  FWIW, the
>>> first thing I tried was the following, but it didn't seem like
>>> the right approach--though it does work correctly:
>> How do you reproduce the failure on your system? I've been building with
>> -j8 and higher for a long time now without seeing anything from
>> toolchain/ being built before tools/
> That's exactly what I do (except I use 4 jobs), but I see it descend
> into toolchain first (well, after doing some other setup), and it
> breaks when trying to setup the kernel headers.  I did find it
> slightly easier to reproduce with `make -j4 toolchain/install` after a
> `make dirclean`:
How about this patch?

diff --git a/toolchain/Makefile b/toolchain/Makefile
index 36c6ed3..7f8d62f 100644
--- a/toolchain/Makefile
+++ b/toolchain/Makefile
@@ -74,7 +74,7 @@ endif
 # prerequisites for the individual targets
 $(curdir)/ := .config prereq
-$(curdir)//prepare = $(STAGING_DIR)/.prepared $(TOOLCHAIN_DIR)/info.mk
+$(curdir)//prepare = $(STAGING_DIR)/.prepared $(TOOLCHAIN_DIR)/info.mk $(tools/stamp-install)
 $(curdir)//compile = $(1)/prepare
 $(curdir)//install = $(1)/compile
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list