lkml.org 
[lkml]   [2016]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] kbuild: do not add srctree to sysroot relative includes
From
Date
On 2016-08-16 13:40, Lars Persson wrote:
> 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 <larper@axis.com>
> ---
> 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)))

Hi Lars,

Two questions: 1) Where is the -I=/... syntax documented? I could not
find it gcc docs. 2) Why do these Makefiles use --sysroot at all? The
kernel does not use any system libraries and the host programs are
compiled for the host architecture.

Michal

\
 
 \ /
  Last update: 2016-09-17 09:57    [W:0.031 / U:1.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site