From patchwork Thu Sep 12 08:06:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 173679 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp1800899ilq; Thu, 12 Sep 2019 01:06:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqw01D6o6fvArpxOiPOGZOgkoWdb3JK0TLDzagyGmUXbOUIAChPlw2mE+Mzmy4gwtN31QEsx X-Received: by 2002:a17:906:a895:: with SMTP id ha21mr33297172ejb.291.1568275611329; Thu, 12 Sep 2019 01:06:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568275611; cv=none; d=google.com; s=arc-20160816; b=zwktay2eovZ3ZoadXl/rgfmIS/OL+BPSx1vrq0OKJADgbRlV/7bjogi5p3QFDlMfXn CPh6Yi3jUWXMpg3MpXe067jNXUraNvb9uh3GcEi+I0NdhDDRgYxe/2aWAxvgDTZvbOv1 2+gtqcaN0gQbXVnXrdhQtETGBFH/qR8pkAuffMXqxc3/Tu4V8lCdp/4L3gP7+p4qnQGW ZM4FoXcxu9n4w93f4iIX9t4YIfuPM8EVmbIAI7GwMV3+VR7aK/kicrqPww79R7PPYQgb fAqaeqRPf0frnPdB3maAGOiaAscXkIi5+9QmhXMFJH9qvUeZH0ErBl5fyxZbga61+sSK a6nQ== 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=L0lVJKpqf3gyQ723Mt44hD215srvPhfht58F28Ehvpk=; b=Q7pu7ryZvjiSyOnFWYDDK4nsMPAaeGw5qWwUU7JgVXySgBCy4TiDTPGranWj6I5wkQ 65VbLNHR5PXT0R4biEHBxgweFzI82KpTYY6B3ztH8ebTCbDGECp0ROtCDcqkKD3aXUH1 TgT1BFEvLShk5ruQUfEUcYX8T+LUKk5kSmKspYmIVn/h2ZVXCp+ErNwUyzsQFllWgwi+ ym8aYSK0sAznJ7QZgRZHbXRecBEZ57MVmZtLsHnlG1QNpwTu+95uC8WCubHr9NP7WY+p TU5Dws2b//bAINQ7Dv7wz869M+adASQYBC+RYXzzbnLWOCurrg/OKWwgImi5uPRggGdQ B1Pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=E3+CoHLx; 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 f4si15216673edf.6.2019.09.12.01.06.51; Thu, 12 Sep 2019 01:06:51 -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=E3+CoHLx; 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 S1729965AbfILIGu (ORCPT + 27 others); Thu, 12 Sep 2019 04:06:50 -0400 Received: from conuserg-07.nifty.com ([210.131.2.74]:29172 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725765AbfILIGt (ORCPT ); Thu, 12 Sep 2019 04:06:49 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id x8C86d4X005667; Thu, 12 Sep 2019 17:06:39 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com x8C86d4X005667 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1568275599; bh=L0lVJKpqf3gyQ723Mt44hD215srvPhfht58F28Ehvpk=; h=From:To:Cc:Subject:Date:From; b=E3+CoHLx+6xqd8oCOY15MDdMteGBS6hr8jd1bMjA/CPNnluIdM5J5UNJvpYKsqgQG a7hQrkkg88NTdsuJQaTkZ9FpWegCJZHllfZckSbUz3RLNDVdScrN2MYgGJ6RbzZX93 AJpRBQM5Vdfi+NcdZgiAYhvumrDzZ19dtMQB5Pi7Qa9x+nv/qxfhcAahaXkvPxhhLz pc/Pa/sFeheZ9czWUkOKKWSaCIBXRSg33EbcV6OiIYIOuu6FdTyZ/LKCMK+j+Yn32M Yen5xPa6nQq/VBfz4cPS3oE8A39qhAkXHK1AQRRLofw+uM7KJ97W/Co+E0pjcFdlgw RXIYTgyEplUfA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH v2] kbuild: change need-modorder implementation slightly Date: Thu, 12 Sep 2019 17:06:26 +0900 Message-Id: <20190912080626.13773-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 Align with the need-builtin implementation. I also added need-modorder=1 to scripts/link-vmlinux.sh for future-proof; Currently, we have no module in the init/ directory, but if we had a one, scripts/Makefile.build would show the false positive warning. Signed-off-by: Masahiro Yamada --- Changes in v2: - Add need-modorder=1 to link-vmlinux.sh scripts/Makefile.build | 2 +- scripts/Makefile.lib | 2 ++ scripts/link-vmlinux.sh | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/scripts/Makefile.build b/scripts/Makefile.build index d30b04707fec..91617b9d7a34 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -528,7 +528,7 @@ $(subdir-ym): $(Q)$(MAKE) $(build)=$@ \ $(if $(filter $@/, $(KBUILD_SINGLE_TARGETS)),single-build=) \ need-builtin=$(if $(filter $@/built-in.a, $(subdir-obj-y)),1) \ - need-modorder=$(if $(need-modorder),$(if $(filter $@/modules.order, $(modorder)),1)) + need-modorder=$(if $(filter $@/modules.order, $(modorder)),1) # Add FORCE to the prequisites of a target to force it to be always rebuilt. # --------------------------------------------------------------------------- diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 07095d3789a1..034e92ea72c6 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -23,7 +23,9 @@ lib-y := $(filter-out $(obj-y), $(sort $(lib-y) $(lib-m))) # Determine modorder. # Unfortunately, we don't have information about ordering between -y # and -m subdirs. Just put -y's first. +ifdef need-modorder modorder := $(patsubst %/,%/modules.order, $(filter %/, $(obj-y)) $(obj-m:.o=.ko)) +endif # Handle objects in subdirs # --------------------------------------------------------------------------- diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh index 8961d999b86b..d9edfba54d84 100755 --- a/scripts/link-vmlinux.sh +++ b/scripts/link-vmlinux.sh @@ -216,7 +216,7 @@ else fi; # final build of init/ -${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init need-builtin=1 +${MAKE} -f "${srctree}/scripts/Makefile.build" obj=init need-builtin=1 need-modorder=1 #link vmlinux.o info LD vmlinux.o