From patchwork Wed Jan 16 02:56:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 155685 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp140614jaa; Tue, 15 Jan 2019 18:57:27 -0800 (PST) X-Google-Smtp-Source: ALg8bN6M/0ouSFh2rNsVPhiM3J+ii1Ts+eKsx7yC4bdF4/fSkC76lxcI+dQqtw5SQ14KDiN4XgGR X-Received: by 2002:a62:e044:: with SMTP id f65mr7294795pfh.208.1547607447790; Tue, 15 Jan 2019 18:57:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547607447; cv=none; d=google.com; s=arc-20160816; b=c2KS6A4wPeSzSGRyYzSe3wpjWcvZFJVYJS7AWT6rxrDMCz7rdc1wV/56Q2m79J9RnU rU2WUhijJDW6GBwDZyQz5oeYYLHNJZz2lVBZh6JuMVhntNO4/vBTiobPqMBkb830Hw2z mCetKqX6s25F5ezVrQ+LoJWVnzLyF/XN/oaPVsiqsx74DLArzO2EYwDZsSFLBGot51QM rglg4ime1EML/pLeNtLhcSVdsM8SYdVq7hfO5K1K8AxeaycJAQfh+s3fGToAqqvrphvh 51ZQGXqFUsb9WOGr+O+3AEKgkfkra+YsfdXxodpnbuQdL9JFAVmFZptX9Jmn64ORBP6L SW6w== 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=IlGcv8kn+7pcad/nWtO0JJAMgDS4Ul+f1F9xFRcEK7s=; b=alCvpcc0P9Au7tS1Xg5icsGGx6oB5u73CBGA1JJBw+rw9QJ8c41WE7eVhRLEivn5EL q3uZi7KZ2mKO186vkds6f7/EfUOJYn+VYITec97ghXBpNkE/s5z9U2kGKgcYnHCFWvcH SrQC78gvRpO2ZWY44D0JjstesKxC/q+4inZKwbusTH6aFbkgOxKlq6jyIAbJmXkkY2Eq Z2TZ5r5j3Lfrx4SgeHBz7oJkJcBfSU/ck5RlrA9TkUepRqct7LlNsEDll5BaMbs1zPC7 3AoXGsN0/vopgYx2KLuGt6QaN9+IZ2pokV73gS4HjUb8ZwN3rvS1j6xB0ZPNdMPsqgdV 9Ing== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=tfopv3kf; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-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 k33si5063853pld.374.2019.01.15.18.57.27; Tue, 15 Jan 2019 18:57:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-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=tfopv3kf; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729927AbfAPC51 (ORCPT + 7 others); Tue, 15 Jan 2019 21:57:27 -0500 Received: from conuserg-10.nifty.com ([210.131.2.77]:49547 "EHLO conuserg-10.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727883AbfAPC50 (ORCPT ); Tue, 15 Jan 2019 21:57:26 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-10.nifty.com with ESMTP id x0G2uksS010468; Wed, 16 Jan 2019 11:56:47 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-10.nifty.com x0G2uksS010468 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1547607407; bh=IlGcv8kn+7pcad/nWtO0JJAMgDS4Ul+f1F9xFRcEK7s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tfopv3kfUnZrL/Td8x/+9NMIWA6dvCq/XCM1R3dEnFOzKcjtrESUhP2rVGSaTE5wO rcoAkzhTHsi7kqhLMwueZ3k6YsPgmX7G99bnBWuu1GLmYSa6YyND7/Lf3Y7zzFhkzo 2d9ZgLYv/lbbKYMlKrAKxv13U7uj8KMkjctySP4TWvhspj4lmq8R61cZUGBXnNcYvG wAwyEGqPpe76nKTycAuUQ0bOfv8UgQkY6UpfSP+kW6PIaxTTrDEq8Z0iGkkvnGpR+l xrlI5qZEfWkK6zJ02Vm4695FcDKXIO1v7gv9JX4ipEngrZpGbfDGxN3IaPZcajO4y1 +FQ9gAzOUoBRw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: devicetree@vger.kernel.org, Masahiro Yamada , linux-kernel@vger.kernel.org, Michal Marek , Mauro Rossi , Rob Herring , Frank Rowand Subject: [PATCH 2/2] kbuild: add -I$(srctree)/$(src) automatically for hostprogs with O= Date: Wed, 16 Jan 2019 11:56:41 +0900 Message-Id: <1547607401-20118-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1547607401-20118-1-git-send-email-yamada.masahiro@socionext.com> References: <1547607401-20118-1-git-send-email-yamada.masahiro@socionext.com> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org When building kernel objects with the O= option, scripts/Makefile.lib automatically adds both -I$(srctree)/$(src) and -I$(obj) so each Makefile does not need to add them explicitly. In contrast, scripts/Makefile.host adds only -I$(obj) when building host programs with the O= option. As a result, each Makefile must add the extra option to include checkin headers from generated C files. Let's cater to this in the build system for consistency, and drop extra options from the kconfig, dtc, genksyms Makefiles. Signed-off-by: Masahiro Yamada --- scripts/Makefile.host | 4 ++-- scripts/dtc/Makefile | 4 ---- scripts/genksyms/Makefile | 4 ---- scripts/kconfig/Makefile | 2 -- 4 files changed, 2 insertions(+), 12 deletions(-) -- 2.7.4 diff --git a/scripts/Makefile.host b/scripts/Makefile.host index a115259..c41d5a1d 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host @@ -72,8 +72,8 @@ __hostcxx_flags = $(_hostcxx_flags) ifeq ($(KBUILD_EXTMOD),) ifneq ($(KBUILD_SRC),) -__hostc_flags = -I$(obj) $(call flags,_hostc_flags) -__hostcxx_flags = -I$(obj) $(call flags,_hostcxx_flags) +__hostc_flags = -I $(srctree)/$(src) -I $(obj) $(call flags,_hostc_flags) +__hostcxx_flags = -I $(srctree)/$(src) -I $(obj) $(call flags,_hostcxx_flags) endif endif diff --git a/scripts/dtc/Makefile b/scripts/dtc/Makefile index 5f227d8..72d3fa4 100644 --- a/scripts/dtc/Makefile +++ b/scripts/dtc/Makefile @@ -22,9 +22,5 @@ dtc-objs += yamltree.o HOSTLDLIBS_dtc := -lyaml endif -# Generated files need one more search path to include headers in source tree -HOSTCFLAGS_dtc-lexer.lex.o := -I$(src) -HOSTCFLAGS_dtc-parser.tab.o := -I$(src) - # dependencies on generated files need to be listed explicitly $(obj)/dtc-lexer.lex.o: $(obj)/dtc-parser.tab.h diff --git a/scripts/genksyms/Makefile b/scripts/genksyms/Makefile index 03b7ce9..ae5953d 100644 --- a/scripts/genksyms/Makefile +++ b/scripts/genksyms/Makefile @@ -30,9 +30,5 @@ $(obj)/parse.tab.h: $(src)/parse.y FORCE endif -# -I needed for generated C source (shipped source) -HOSTCFLAGS_parse.tab.o := -I$(src) -HOSTCFLAGS_lex.lex.o := -I$(src) - # dependencies on generated files need to be listed explicitly $(obj)/lex.lex.o: $(obj)/parse.tab.h diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 1819735..12cb5eb 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -146,8 +146,6 @@ help: common-objs := confdata.o expr.o symbol.o preprocess.o zconf.lex.o zconf.tab.o $(obj)/zconf.lex.o: $(obj)/zconf.tab.h -HOSTCFLAGS_zconf.lex.o := -I$(src) -HOSTCFLAGS_zconf.tab.o := -I$(src) # conf: Used for defconfig, oldconfig and related targets hostprogs-y += conf