From patchwork Tue Jul 9 04:24:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 168704 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp8019353ilk; Mon, 8 Jul 2019 21:26:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKM9VgvEshp++H3jVsArqLXRSbmhn0Mb2OZhi8bF6zYRqk0NRPo59mz79Bj8ITN1/FuSjv X-Received: by 2002:a65:408d:: with SMTP id t13mr27984545pgp.373.1562646372278; Mon, 08 Jul 2019 21:26:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562646372; cv=none; d=google.com; s=arc-20160816; b=a4ceHL5YqS7+XrBaS05KMDXo7RSMNdwKLwEndz9lER/a2mUqunpCxWuIydPWhVQ1ud QgVQbLW/eaM/iCyWzFyAifLINZpLY0rH4c6Vgl9VPzJhk8VecilAPzbdjJgj29PBal6e 8ielL0hABHx6ZK8QqNJPtTiwhdmiETTB7xxvmBxJHoY/L3rrXOu4+0Qhc+1nZA8JlE/0 n0+W6CblPYWyqEmvTKyoa2Lu0baTpAtkFUm0toQDrOLnRzJ6k2prZ2cQeEZmfDVSoW4q Nf287uR9xW/i6pKbfLbTYMCqWWF27J960n6C43uo6kNxzBCNz+M8dTN5Aqod1ClvHBVA yFLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=iBlTAZJuJJ6+50j0WGjD4LyvREzE6vt9HBWQ8mbamWM=; b=tq8VAAJardVWCyng2MmT/XhgZ6ZVtdl/ln7pCYNtr6lhF93ZbFYTMyC/bR+eT0oXRb oQeJ3SsYuS6VAMZYUajiLPIsMoC2Q2oe+5bcIltYO8Fcb0TbDb74RlEWbkUUE9s0H4l/ LRmkj72eu8mQUY+sGJZtPSk5fV0vURDGG0eaaQsWyMrQRQP91kvb0XYOKe2wirozJUaY 3vgLoM1BQ9n0CiSuiQDgcpRXaZJ//mQSjoW6WrPXfCmqfiX7f83VUHt7HxhXaYsd4RXk MAWmz0kP834Q3aXzbPG+/ppvYz66FxdlTxg+aCTaWczAZU9SKfhVP4NPdgAarPa7ng07 hpZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=HekhdKDx; 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 s24si21223555pgm.327.2019.07.08.21.26.11; Mon, 08 Jul 2019 21:26:12 -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=HekhdKDx; 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 S1727565AbfGIE0J (ORCPT + 30 others); Tue, 9 Jul 2019 00:26:09 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:42175 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727127AbfGIEZm (ORCPT ); Tue, 9 Jul 2019 00:25:42 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id x694OqVk009969; Tue, 9 Jul 2019 13:24:54 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com x694OqVk009969 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1562646294; bh=iBlTAZJuJJ6+50j0WGjD4LyvREzE6vt9HBWQ8mbamWM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HekhdKDxoDJEqpBGRw/bM/WReVW8JEMj5vTDoxmIOmauxgkb9SRw3YCaUUh528FGx PmzO8bd2BmeBP/DqTG45W/lG6AyLq2y7601d2ogLbhZuR29UQ8w3CFB4RlwFudfDYa okg6ukaV7SeSvkuGLlxM5Rh2yGSzUR9xlsM76E6qUK0ixai2aSWpDSdoS5be9TUi3W BdbQxVkm0w9x5ttJyvgipizBQBNpqvQMsU5pDPs0yfKU5y/VMML9l9BkAqxFphKKWK zJ2nVCvhi24btSI8bfRMTQIVEzYmWqoHorMqegak9tb/exc9Xje2uEaDHLUS5uADJ7 OnjQMbpWcUPZw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Nicolas Pitre , Sam Ravnborg , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 01/11] kbuild: do not create empty modules.order in the prepare stage Date: Tue, 9 Jul 2019 13:24:05 +0900 Message-Id: <20190709042416.27554-2-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190709042416.27554-1-yamada.masahiro@socionext.com> References: <20190709042416.27554-1-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, $(objtree)/modules.order is touched in two places. In the 'prepare0' rule, scripts/Makefile.build creates an empty modules.order while processing 'obj=.' In the 'modules' rule, the top-level Makefile overwrites it with the correct list of modules. It might be a good side-effect that modules.order is made empty every time (probably this is not intended functionality), but I personally do not like this behavior. Kbuild descends into some directories in the preparation stage, where created modules.order files may be broken. Export 'preparing' while running the 'prepare' target, and when it is defined, do not touch modules.order at all. Signed-off-by: Masahiro Yamada --- Makefile | 1 + scripts/Makefile.build | 2 ++ 2 files changed, 3 insertions(+) -- 2.17.1 diff --git a/Makefile b/Makefile index 5c75ea7177f6..a31b672d512b 100644 --- a/Makefile +++ b/Makefile @@ -1000,6 +1000,7 @@ ifdef CONFIG_STACK_VALIDATION endif PHONY += prepare0 +prepare: export preparing=1 ifeq ($(KBUILD_EXTMOD),) core-y += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/ diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 776842b7e6a3..93c20664bcbb 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -64,8 +64,10 @@ builtin-target := $(obj)/built-in.a endif ifdef CONFIG_MODULES +ifndef preparing modorder-target := $(obj)/modules.order endif +endif # We keep a list of all modules in $(MODVERDIR)