From patchwork Sat Dec 13 09:43:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Szakmeister X-Patchwork-Id: 420752 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 31D3A14009B for ; Sat, 13 Dec 2014 20:43:26 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 1558D28C215; Sat, 13 Dec 2014 10:41:32 +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=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 8B03928C215 for ; Sat, 13 Dec 2014 10:41:26 +0100 (CET) X-policyd-weight: using cached result; rate: -8.5 Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com [209.85.217.179]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sat, 13 Dec 2014 10:41:24 +0100 (CET) Received: by mail-lb0-f179.google.com with SMTP id z11so6985239lbi.38 for ; Sat, 13 Dec 2014 01:43:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=PhPesLo72IMLMHtOxvMZaObVC0+KMSzgJijBih2Ucfw=; b=sztZm1ZKfOju6a4aDIZgIrHp7MPbEVUZTPpziSw3xOqdqrEnweuRDPWLWY9hGi2SQ0 eAiiDdffh05Wn2w4WRRjHbC+j7AjglcEb7x/0Swziv53rpGBulb3xvC4cvkjdWXUI9kF PLdBhrr8qDF6EjW88O8if0Yy57tLu1mNp9LHqBd5tWQEiMu/eq0k5boE9DhLqvfgh/vY VSMrFLvwdTcpPNCDdp7ccBNVCdfqTJ+fMRZdA5O/qk8vEVKTnuihNrb0+qBhwD9AvSEn KKW3AAD92ndF0VGO7HYZ0PteNH4lBBpQpz7/tcBdjsomWlYoXUI3Yz9z8bYJaTsdBjOl j5oQ== MIME-Version: 1.0 X-Received: by 10.152.115.230 with SMTP id jr6mr20018620lab.2.1418463790940; Sat, 13 Dec 2014 01:43:10 -0800 (PST) Received: by 10.25.166.75 with HTTP; Sat, 13 Dec 2014 01:43:10 -0800 (PST) In-Reply-To: References: <1418122055-5917-1-git-send-email-john@szakmeister.net> <548B1FD8.6050106@openwrt.org> Date: Sat, 13 Dec 2014 04:43:10 -0500 X-Google-Sender-Auth: 4uSy6aOFiW16WtkVgjke4rkuWt0 Message-ID: From: John Szakmeister To: Felix Fietkau 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 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: commit 161c49cdbc0b81d3e6072dc788cb5432760e7777 Author: John Szakmeister Date: Wed Sep 17 06:47:58 2014 -0400 toolchain: ensure tools are built and staged before preparing toolchain 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 diff --git a/toolchain/Makefile b/toolchain/Makefile index 36c6ed3..f534cbc 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/install $(curdir)//compile = $(1)/prepare $(curdir)//install = $(1)/compile