From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751522AbcHPLlJ (ORCPT ); Tue, 16 Aug 2016 07:41:09 -0400 Received: from bastet.se.axis.com ([195.60.68.11]:35341 "EHLO bastet.se.axis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752214AbcHPLlI (ORCPT ); Tue, 16 Aug 2016 07:41:08 -0400 From: Lars Persson To: mmarek@suse.com Cc: linux-kernel@vger.kernel.org, arnd@arndb.de, Lars Persson Subject: [PATCH] kbuild: do not add srctree to sysroot relative includes Date: Tue, 16 Aug 2016 13:40:58 +0200 Message-Id: <1471347658-9219-1-git-send-email-larper@axis.com> X-Mailer: git-send-email 2.1.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We need to filter out also -I=/path to allow sysroot relative include paths in the makefiles of external modules. Signed-off-by: Lars Persson --- scripts/Kbuild.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 1792198..ffe5c6c 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -206,7 +206,7 @@ hdr-inst := -f $(srctree)/scripts/Makefile.headersinst obj # Prefix -I with $(srctree) if it is not an absolute path. # skip if -I has no parameter addtree = $(if $(patsubst -I%,%,$(1)), \ -$(if $(filter-out -I/% -I./% -I../%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1)),$(1))) +$(if $(filter-out -I/% -I./% -I../% -I=%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1)),$(1))) # Find all -I options and call addtree flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o))) -- 2.1.4