lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <bb0a668c-ed4c-143f-4796-72d3caa05996@axis.com>
Date:	Tue, 16 Aug 2016 14:22:35 +0200
From:	Lars Persson <lars.persson@...s.com>
To:	Michal Marek <mmarek@...e.com>, Lars Persson <larper@...s.com>
CC:	<linux-kernel@...r.kernel.org>, <arnd@...db.de>
Subject: Re: [PATCH] kbuild: do not add srctree to sysroot relative includes



On 08/16/2016 01:59 PM, Michal Marek wrote:
> 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@...s.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.

You should find this in your gcc manual:
If dir begins with "=", then the "=" will be replaced by the sysroot 
prefix; see --sysroot and -isysroot.


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.

One use-case is with the yocto build system. Suppose we have two kernel 
modules A and B. A installs header files into the sysroot that B will 
include.


- Lars

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ