From patchwork Wed Jun 15 15:45:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9178821 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EBD2760831 for ; Wed, 15 Jun 2016 15:45:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DCE0D27EED for ; Wed, 15 Jun 2016 15:45:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D1D0B27F07; Wed, 15 Jun 2016 15:45:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A24C27F46 for ; Wed, 15 Jun 2016 15:45:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8C5106E984; Wed, 15 Jun 2016 15:45:04 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) by gabe.freedesktop.org (Postfix) with ESMTPS id 75A2C6E984 for ; Wed, 15 Jun 2016 15:44:39 +0000 (UTC) Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue102) with ESMTPA (Nemesis) id 0MPXsH-1bHJaW0Xpp-004hHp; Wed, 15 Jun 2016 17:44:29 +0200 From: Arnd Bergmann To: Michal Marek Subject: [PATCH v2 03/11] Kbuild: always prefix objtree in LINUXINCLUDE Date: Wed, 15 Jun 2016 17:45:45 +0200 Message-Id: <20160615154553.3177021-4-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20160615154553.3177021-1-arnd@arndb.de> References: <20160615154553.3177021-1-arnd@arndb.de> X-Provags-ID: V03:K0:7usIlEr7pJiacm2ekoR+rOnx89poteDnj280FlANYCkH1EZRPgE 08TYtImb7uu/IavecO6mo6Tgn2EhtLtB9oZH2Iq6nZ5wpdVFKmnysdet4+P0BO4hgi6uwnC zja9WpCphN+mxC4OoE7VN68PmBYJX5p55wBzVuVEPDe679EgQ22cFtR5Rcb2ALznmWln00A fRaDTMHNbfhQILfcgBa+A== X-UI-Out-Filterresults: notjunk:1; V01:K0:PaGMwOI9U7w=:vto+ogNe9H2nYkwatHrU7m yIH0lrtJUr8vFEgPAnped801fBxXYuec/19lD0h73tf5y71HiswKKn0QVu8Sq0yyII6aaFMxT hH0tGiCm60rxQOS8PoECBYInCz9HIYwgdG+ZojDsQNt0T2d/j42TMriFE4SJIPlVzV+CEGgDQ lDP+cvMS7r8to0QfJa+GUpOJRFeJ1p3oscYERsTZZgtvnzDoWQHzfJlMiA4bLKdHEA10N/XKR dRc2CJ+jZZmdzgOJa21s4Vngo95FYW3+JdozZz46p2f/sw9u2Sdg+vXXE1+ey5nfO3xynmUPj Z3yTt8Uxp7aFxNtT2BsaPaYx047JDeJf6hW48Ls1Yqekeo7ZvtMxYZxvA5geAxcgB0R3A7QlW Wry+od4WxzF60E/9GCK/qh8iTPe8wjq7xMyPv7RlByO5WC2Fhi9Nv8cxA5urCrsmrPzUDtP8W BFnuehM7lE04EGYdzURi82osD6tXCQUAwy5I3OB30EhIJPuz0OM7oCWAQKW9if6FB61XXUwMJ 6WXgPhdAx0qbmLWX1JVXaz5gGdMhjK6zld+8KLaNJBCT+DEaVPwYGwhPLl8SmU45nNEydlBO8 ZZ1FnjjNLXi9FisIHgyMiAMp8Le8G2Tn47UuPrm7v8r9ElyERumFKeXmmawdssbeS8ZWVdRN3 wXRtNOq4dzWEqvfQk9dvr1QNDZeZwOjEINJReqYlAFJYwhzyxh/dvwqY+pWhWYjp7VY0= Cc: Arnd Bergmann , linux-kbuild@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP When $(LINUXINCLUDE) is added to the cflags of a target that normall doesn't have it (e.g. HOSTCFLAGS), each entry in the list is expanded so that we search both $(objtree) and $(srctree), which is a bit silly, as we already know which of the two we want for each entry in LINUXINCLUDE. Also, a follow-up patch changes the behavior so we only look in $(srctree) for manually added include path, and that breaks finding the generated headers. This adds an explicit $(objtree) for each tree that we want to look for generated files. Signed-off-by: Arnd Bergmann --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 45159861e645..969924783543 100644 --- a/Makefile +++ b/Makefile @@ -377,19 +377,19 @@ CFLAGS_KCOV := $(call cc-option,-fsanitize-coverage=trace-pc,) # Use USERINCLUDE when you must reference the UAPI directories only. USERINCLUDE := \ -I$(srctree)/arch/$(hdr-arch)/include/uapi \ - -Iarch/$(hdr-arch)/include/generated/uapi \ + -I$(objtree)/arch/$(hdr-arch)/include/generated/uapi \ -I$(srctree)/include/uapi \ - -Iinclude/generated/uapi \ + -I$(objtree)/include/generated/uapi \ -include $(srctree)/include/linux/kconfig.h # Use LINUXINCLUDE when you must reference the include/ directory. # Needed to be compatible with the O= option LINUXINCLUDE := \ -I$(srctree)/arch/$(hdr-arch)/include \ - -Iarch/$(hdr-arch)/include/generated/uapi \ - -Iarch/$(hdr-arch)/include/generated \ + -I$(objtree)/arch/$(hdr-arch)/include/generated/uapi \ + -I$(objtree)/arch/$(hdr-arch)/include/generated \ $(if $(KBUILD_SRC), -I$(srctree)/include) \ - -Iinclude + -I$(objtree)/include LINUXINCLUDE += $(filter-out $(LINUXINCLUDE),$(USERINCLUDE))