From patchwork Sat Dec 13 11:08:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Fietkau X-Patchwork-Id: 420754 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 9AC3B1400D5 for ; Sat, 13 Dec 2014 22:08:49 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 75D1528C240; Sat, 13 Dec 2014 12:06:52 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=AXB_HELO_HOME_UN, BAYES_00, HELO_LH_HOME autolearn=no version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id CA8FB2815C2; Sat, 13 Dec 2014 12:06:46 +0100 (CET) Received: from nf.lan (p5DDC6438.dip0.t-ipconnect.de [93.220.100.56]) by arrakis.dune.hu (Postfix) with ESMTPSA; Sat, 13 Dec 2014 12:06:46 +0100 (CET) Message-ID: <548C1E30.1000701@openwrt.org> Date: Sat, 13 Dec 2014 12:08:32 +0100 From: Felix Fietkau User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: John Szakmeister References: <1418122055-5917-1-git-send-email-john@szakmeister.net> <548B1FD8.6050106@openwrt.org> <548C10E2.60801@openwrt.org> In-Reply-To: Cc: openwrt-devel@lists.openwrt.org Subject: Re: [OpenWrt-Devel] [PATCH][RESEND] [tools] toolchain: ensure tools are built and staged before preparing toolchain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" On 2014-12-13 11:22, John Szakmeister wrote: > On Sat, Dec 13, 2014 at 5:11 AM, Felix Fietkau wrote: >> On 2014-12-13 10:43, John Szakmeister wrote: >>> On Sat, Dec 13, 2014 at 4:28 AM, John Szakmeister 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