Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp7412840ybi; Mon, 8 Jul 2019 21:27:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqwx9YVwMs2nm4SS3dQcupYuO1ZdjDsVtKPhBR1HTT6dAetxsi9t5GW85CjIxCInLrmfCiKq X-Received: by 2002:a17:902:6a2:: with SMTP id 31mr28048376plh.296.1562646427470; Mon, 08 Jul 2019 21:27:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562646427; cv=none; d=google.com; s=arc-20160816; b=cKP4ImwXPlaOSafjrAHpbrmhJGYhRzNUQe29i4ueo7zAkJLj3TUdc6izaaQt72JP7N 2jGUOsWF3C6zf+ml7UFN/wN7iTpXK29imnfT0RhBoUe9ArliraDLpNlo7xk/KS8CgNSe 7JRGJ4qPg5Nq4yPHy8toz0JPY/1PSuu9bVggV84qVMD8AYYaOczlKMB9asLzK5YAP8Fy kAwy5bGNwwFJL1715Nef9RYfTv9N7LfVfmjI2jFPCgzzPVOoN8qCbj8G9ztXOAwA2N4v OYKx1Stp31+/J0FXeGx3cFIaxH3brYuudZIznS9qkMkf5DbGw3ddVLJfhpfnMKda6Uex s6nA== 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 h4si23013702pgf.171.2019.07.08.21.26.52; Mon, 08 Jul 2019 21:27:07 -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 S1727555AbfGIE0I (ORCPT + 99 others); Tue, 9 Jul 2019 00:26:08 -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(+) 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) -- 2.17.1