From patchwork Tue Oct 16 09:10:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 148925 Delivered-To: patch@linaro.org Received: by 2002:a2e:8595:0:0:0:0:0 with SMTP id b21-v6csp4828598lji; Tue, 16 Oct 2018 02:12:29 -0700 (PDT) X-Google-Smtp-Source: ACcGV61tbVXlDWF6hO9AUAgmwM6dCr2g5Ldc9GglAqLazb2SpKCwAtuOZPvSyBb6hWq8bgdgtwRR X-Received: by 2002:a62:7501:: with SMTP id q1-v6mr21046791pfc.225.1539681149214; Tue, 16 Oct 2018 02:12:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539681149; cv=none; d=google.com; s=arc-20160816; b=EqZZE4k+7HGPr240imS7KLCjmRJQRQNt3LHuCZvta2sD32hEt4YHTvjC+swnkjKupX 5iEw01H52ap23ZsOVKoZhsOjfZPDJs1+pouxVNVIMlzV6EuzBWn3IPBryb8PpD1Sc2h8 DN1szTjJwVf4QsRSnxExq1LjbZ3ES5IhdhbgtS6Fn8hYe+j+ABloydGBKD6S1BQFA22p 02CB9Pnj2LK62VoX2PIC3Yvle+9cmSJY7qrIzr/R/qzG4iCF+HfFyXufdn/jk2WvwbsS IPhGJXkAvu+oNYBBsp+PCpQ554wXR3Y5AlSgsucbSgqqA1X8xht4fdViANhZGtpIMCQ0 hgBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=TZr7U70F1em4iQZV5aISNk6Uw8fHBV39AhiwopUnR88=; b=ZnhRZjXnASCeeCbGNDqBA20Llhow0Dzx0TYbc33jkQAV5op3lwW5C0nDyqWCXAQCCj KWC8wfhSEeBdi8+YPAF7LDvWsNGlyPwLSkkBb0Um292zUhYY8xvc3LFtashnXpYH/wuR aBEjDT/i4lYZEO5J4BqwKtxJ3tuyRHB3VB9o8Z1VaBVc6W+3lXzE3rjOZzznpOj4ZSEA 9mlQf6SiGOt7W3ZDta7whrt7Cbnuu+SPhxPgKRnZQqPgai4cLcXD7ib6NcU7kM0CkMGI EIEcplS6nD0WSnPu3yU6i3/wM6eOFUaGxaFChGZ7X8PRGqXL4j/DYAJlrpdFYcNC2dsm z5oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=NN2XCwW7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r59-v6si12043184plb.6.2018.10.16.02.12.28; Tue, 16 Oct 2018 02:12:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=NN2XCwW7; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727186AbeJPRBh (ORCPT + 32 others); Tue, 16 Oct 2018 13:01:37 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:57575 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726541AbeJPRBh (ORCPT ); Tue, 16 Oct 2018 13:01:37 -0400 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id w9G9BLLu029692; Tue, 16 Oct 2018 18:11:22 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com w9G9BLLu029692 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1539681082; bh=TZr7U70F1em4iQZV5aISNk6Uw8fHBV39AhiwopUnR88=; h=From:To:Cc:Subject:Date:From; b=NN2XCwW7vuSmdkLzu1XRSaNslDdwUW5Nk/xbZUgxLWpiC++aadayTGkuzF34YS2d1 6Xqa/nY7mXP1JiHVmqIMd9eWuvQ3S7H5z+Jw/HREN3lMi3+k+WelRo+S9gTs4ra+TT i1ozw1h0wfB84yrsCxbjJi3MH/N+/r6DjcOKpVHgfD9YDlSvo6lS8xgeH4l0vIr80j E//9QNlzoU3Uo/yS5I2KRtd8EePZwG8pxHEj76liZYSV/FGxrX/o5v2tqxaYffYlVc 57wET0/LokZ6Lu81pdqC4Ow31ddAkur+copaPf72pTGIVUse8j5emOi0HN2XW4xi4U qNU2N0scSR/hA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Ingo Molnar , Josh Poimboeuf , Bernd Edlinger , Borislav Petkov , Sam Ravnborg , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 0/3] kbuild: add scripts/Makefile.toolcheck to check necessary host tools Date: Tue, 16 Oct 2018 18:10:50 +0900 Message-Id: <1539681053-24388-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I wrote this patch set to cater to some reports: - Bernd Edlinger reports false positive check of libelf once CONFIG_UNWINDER_ORC is enabled. https://lore.kernel.org/patchwork/patch/960411/ - Borislav Petkov reports the build fails very late if CONFIG_KERNEL_LZ4 is enabled but lz4 is missing. https://patchwork.kernel.org/patch/10635381/ >From the discussion https://patchwork.kernel.org/patch/10516049/ people like to see a build error when some host tools are missing. So, we need to check host tools in makefiles. (Or, do not check at all. The build will fail anyway, but the error message might not be clear enough in some cases.) A problem is people check host tools in random places in the top Makefile. This does not work because the top Makefile is parsed twice when the include/config/auto.config is updated. Once with a stale auto.config, and once again with a new auto.conf. This will cause false positive build error. One solution is to provide a systematic way to do host-tool checks. I added small macros in scripts/Makefile.toolcheck to describe tool checks in a Kbuild-ish taste. Masahiro Yamada (3): kbuild: provide a new place to check necessary host tools objtool: move libelf check out of top Makefile kbuild: check the presence of lzo and lz4 tools when necessary Makefile | 22 ++++----------------- scripts/Makefile.build | 2 -- scripts/Makefile.toolcheck | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 20 deletions(-) create mode 100644 scripts/Makefile.toolcheck -- 2.7.4