From patchwork Tue Aug 6 10:03:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 170652 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp5474170ile; Tue, 6 Aug 2019 03:03:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJcRAYhXeAyc6qI5BqrflkpDzSJH/e7+ku1QE3rOdOz9h7FwJBHW65eL27H6PvsyUqDTtk X-Received: by 2002:a63:4522:: with SMTP id s34mr2292837pga.362.1565085828153; Tue, 06 Aug 2019 03:03:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565085828; cv=none; d=google.com; s=arc-20160816; b=PTTebHddOy6tMWzYLHc2tdzXeoImnavypksS4WR2wv6Njc4Z/KAnOXoWCX2rlaT+MZ g3gUekR0GX+Eij9TjqyRpaapkGb1aPE2gMxoUxKCXQk9Ab0sLRDzjtu6M7B6m286uA1Q e63vOO7iLEiHSUvBEvC6ol3pJ1F1WtJvNF6c+aQpaY/RcjdLgpOU/F4b9y8o4COsxXeq eDkG5xvCjN3KZN6Sz8otVfsucjn2xsC4bD/qzF7BHWfaA6yDRUbUYfxq4XvKjsetd9Gg 7lddNBkD2e8L+Ma75rm2nqPDHjRi8uaZUsaVZMFsIRQRMa+Px3ORvmusmLJ/N6L+XYAs iQSQ== 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=9NrW6qBmvdU9uW3rAgNep8F0eSYArnBcMnQhTyTwaww=; b=AVhOftUuBI5snAeov90x3WEGr6RN+Em+6yltRBaBtxv1ksb9aozXIkwZErXQoIhJu5 XGfdDq/Uz+zezgDkeXMq9lfQfdhclpG1/3p3Cqx4o/P5RReKH8Herl+D1Ko5kOhwTmNP 5ag800RuBVkC7GHBdGvAhgukCqoFGJ+Xz9XogkpxtmeQQxiemUMWHhX9P5motRivXo5x ciLg7QSbFedXr2HKBlc2CgQXWuktE0zLdj/Zkm86lMqm0HtQho4O3sQJEEcaCyMWD9UB Dv5BugtUb3e+J6WzJFTjPW8Ap7aOJC65e2rG9ZZbJ8aELo3e0xGWDfxsCbzYRIooRHO2 8dWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=MkzGE5LO; 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 i64si47502798pge.307.2019.08.06.03.03.47; Tue, 06 Aug 2019 03:03:48 -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=MkzGE5LO; 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 S1732616AbfHFKDr (ORCPT + 29 others); Tue, 6 Aug 2019 06:03:47 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:35239 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732543AbfHFKDq (ORCPT ); Tue, 6 Aug 2019 06:03:46 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id x76A3QP5032264; Tue, 6 Aug 2019 19:03:26 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com x76A3QP5032264 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1565085806; bh=9NrW6qBmvdU9uW3rAgNep8F0eSYArnBcMnQhTyTwaww=; h=From:To:Cc:Subject:Date:From; b=MkzGE5LOFyAkFM/mazFokb44Dff7O4BkvljryLLL7l3iGqerSvHAkC2yBhCbFbXhx iMOamayOTdszFXjVfyoF9WHSAHB1N9aTN/AB7BJRFAmcLveYUt7bv7Fh0erLeO8ajv QJ+7E62gIf4ye3TKPDEkOMLjpOxq9uvfsUrXPm6wNuenjGpYSkLLrMkOIZcXRRJfpW xTnPKmuUPOzwYSjCgMx3eGYjB3xGiFM4BPoWbLaN5gprcot7Q2EOF31j3VgXXWnAhA vbJuWHkFw3P3xf7fD5Yg2dyRsz3SJblEnBERuFEWqnBi7RIf1pf1yQIfJ00DY8AE2K dvzV4ebBlzk2Q== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Jan Kiszka , Tom Stonecypher , linux-kernel@vger.kernel.org, Masahiro Yamada , Michal Marek Subject: [PATCH 1/3] kbuild: fix false-positive need-builtin Date: Tue, 6 Aug 2019 19:03:21 +0900 Message-Id: <20190806100323.22919-1-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The current implementation of need-builtin is false-positive, for example, in the following Makefile: obj-m := foo/ obj-y := foo/bar/ ..., where foo/built-in.a is not required. Fixes: f7adc3124da0 ("kbuild: create built-in.o automatically if parent directory wants it") Signed-off-by: Masahiro Yamada --- scripts/Makefile.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 0d434d0afc0b..3fe0c73e002c 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -487,7 +487,8 @@ targets += $(call intermediate_targets, .asn1.o, .asn1.c .asn1.h) \ PHONY += $(subdir-ym) $(subdir-ym): - $(Q)$(MAKE) $(build)=$@ need-builtin=$(if $(findstring $@,$(subdir-obj-y)),1) + $(Q)$(MAKE) $(build)=$@ \ + need-builtin=$(if $(filter $@/built-in.a, $(subdir-obj-y)),1) # Add FORCE to the prequisites of a target to force it to be always rebuilt. # ---------------------------------------------------------------------------