From patchwork Mon Feb 4 08:55: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: 157383 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3660794jaa; Mon, 4 Feb 2019 00:56:34 -0800 (PST) X-Google-Smtp-Source: AHgI3IZmMLWDWpW3T5kLmwSil7+VlBKGRFrQhS/KLAY6A7geD7o7q1vFLF3uIT14GToZKJWA+xN8 X-Received: by 2002:a63:4a4d:: with SMTP id j13mr12333085pgl.127.1549270594205; Mon, 04 Feb 2019 00:56:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549270594; cv=none; d=google.com; s=arc-20160816; b=fU6Typ85mBKQCfRruMP9NO8SmnKnP3X4zP980z7Hv+a9MFGdYuXstYAsIDPVlHqwYs yOxc9NQG4AVeth3D/W8kkO/wthoiD7Tb+VHnz/+HEvkKI/B/HU53ND2HUjoOABE0YQi/ JcwZPinan5QdsocKlhcprboJbB8NJXHxaca19cdW7/O0ZKv5hczUYWBKnQ2oh5zlJRSH WArNgCe1/WlJbTaJOiDL1Q0OD0WCgmD76L+CM8fJNFHbmiSwWD4xYXcjh0fcb8gFWyl7 V1T7Dq2ghLP6/o8oe+AU3wPSz7DySVjFyFDYnpI33isGyUlKg1mKX6QKiden70Aob4eI EqSQ== 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=dBMQG3SSG2E1tFJaJSpKo+VkzYBIHjMFKLjCPYxftJk=; b=qUj1OItKeJCr7waseKQRWuDoYNvnwFnx3EBWc5GcphSU8ZFYloesjrZ71k6ls9RZK7 qE3AT0fI2BbOGy656MqYPeN9Az7279SJTcFJugAYmKnRElx9gQ6DO6wzo86j8p8M8hW0 +gokJjBeIqzzwWTMRDd3sSt+Na+LOIAPDDAqUBZhTBPy9LJ+x4DTZY/1m4XRJpU5Mrkk 4NaU0fp0lApXvwwJDkMrN/NqzAqYdfuG+P0tnYvR740f9AxB1ikQdGihvwc1pxb6fQZA OCk2zQznlQOEDuv/6ZOfmtISjkgo8Rzj8hXcserGcWmkHFRygkciNtCLyrlxF2cJX38i f0HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=FqsTiXVK; 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 189si5815672pfd.142.2019.02.04.00.56.33; Mon, 04 Feb 2019 00:56:34 -0800 (PST) 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=FqsTiXVK; 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 S1728642AbfBDI4c (ORCPT + 31 others); Mon, 4 Feb 2019 03:56:32 -0500 Received: from conuserg-07.nifty.com ([210.131.2.74]:39829 "EHLO conuserg-07.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726502AbfBDI4b (ORCPT ); Mon, 4 Feb 2019 03:56:31 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id x148thNu020312; Mon, 4 Feb 2019 17:55:43 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com x148thNu020312 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1549270544; bh=dBMQG3SSG2E1tFJaJSpKo+VkzYBIHjMFKLjCPYxftJk=; h=From:To:Cc:Subject:Date:From; b=FqsTiXVKrrFWA+c5bX+qxCRdWtBZi+j8MreLls7UxUqaWiexNGt6p4qI6Mj2p819w URJ19+NgbzERtqDumSr/Ar9Zt0OD/NiS+EBGkUPIHfbvbWzZMDE6jIY79v7MLSw5S1 GyBS59dhtTVwY93NMsayfOvYwRduTumUoWWRHye+zBk6K+tYX6YJEfjPwGLrNjMmhK 2RZUEODPqUGDmGOOK2xrS/6SDKu4ZX8/Lv8n9K1QwXl6l2qOLOJTeHCH/zDCFIakhR DXcG3OZcDaFBoiMClI/e5liKqE8lCpBl5xMuVevy/R9hu8Nx5nQIc9wPIVm8EzV+tU cNCW9qZt8l2ew== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-sh@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , Masahiro Yamada , Yoshinori Sato , linux-kernel@vger.kernel.org, Rich Felker , Mark Rutland Subject: [PATCH] sh: fix build error for empty CONFIG_BUILTIN_DTB_SOURCE again Date: Mon, 4 Feb 2019 17:55:26 +0900 Message-Id: <1549270526-17230-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 fixed this build error in commit 1b1e4ee86e00 ("sh: fix build error for empty CONFIG_BUILTIN_DTB_SOURCE"), but it came back again. Since commit 37c8a5fafa3b ("kbuild: consolidate Devicetree dtb build rules"), the combination of CONFIG_OF_EARLY_FLATTREE=y and CONFIG_USE_BUILTIN_DTB=n results in the following build error: make[1]: *** No rule to make target 'arch/sh/boot/dts/.dtb.o', needed by 'arch/sh/boot/dts/built-in.a'. Stop. make: *** [Makefile;1727: arch/sh/boot/dts/] Error 2 Prior to that commit, there was only one path to descend into arch/sh/boot/dts/, and arch/sh/Makefile correctly guards it with CONFIG_USE_BUILTIN_DTB: core-$(CONFIG_USE_BUILTIN_DTB) += arch/sh/boot/dts/ Now, there is another path to descend there from the top Makefile when CONFIG_OF_EARLY_FLATTREE=y. Add obj-$(CONFIG_USE_BUILTIN_DTB) guard in case CONFIG_BUILTIN_DTB_SOURCE is hidden due to the unmet 'depends on'. Fixes: 37c8a5fafa3b ("kbuild: consolidate Devicetree dtb build rules") Reported-by: kbuild test robot Signed-off-by: Masahiro Yamada --- Observant reviewers may point out another problem. There is a race condition when CONFIG_OF_EARLY_FLATTREE=y. Some architectures (sh, xtensa, etc.) embed a DTB in vmlinux, so there are two paths to descend into arch/*/boot/dts/. For parallel build with -j option, two threads may build under arch/*/boot/dts/ simultaneously. Yes, this is a problem, and it is in my TODO list. For some reasons, I will postpone it by the next development cycle. For now, I want to fix this sh build error first because kbuild test robot is still complaining about it. arch/sh/boot/dts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/arch/sh/boot/dts/Makefile b/arch/sh/boot/dts/Makefile index 01d0f7f..2563d1e 100644 --- a/arch/sh/boot/dts/Makefile +++ b/arch/sh/boot/dts/Makefile @@ -1,3 +1,3 @@ ifneq ($(CONFIG_BUILTIN_DTB_SOURCE),"") -obj-y += $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_SOURCE)).dtb.o +obj-$(CONFIG_USE_BUILTIN_DTB) += $(patsubst "%",%,$(CONFIG_BUILTIN_DTB_SOURCE)).dtb.o endif