Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1463732

Re: [PATCH] kbuild: do not add srctree to sysroot relative includes

Path csiph.com!news.freedyn.net!aioe.org!bofh.it!news.nic.it!robomod
From Michal Marek <mmarek@suse.com>
Newsgroups linux.kernel
Subject Re: [PATCH] kbuild: do not add srctree to sysroot relative includes
Date Tue, 16 Aug 2016 14:00:01 +0200
Message-ID <s6Lcd-2BC-3@gated-at.bofh.it> (permalink)
References <s6L2x-2ye-13@gated-at.bofh.it>
X-Original-To Lars Persson <lars.persson@axis.com>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2
MIME-Version 1.0
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 7bit
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 28
Organization linux.* mail to news gateway
X-Original-Cc linux-kernel@vger.kernel.org, arnd@arndb.de, Lars Persson <larper@axis.com>
X-Original-Date Tue, 16 Aug 2016 13:59:48 +0200
X-Original-Message-ID <90494889-24e4-64be-422e-d7cc344f03da@suse.com>
X-Original-References <1471347658-9219-1-git-send-email-larper@axis.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1463732

Show key headers only | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] kbuild: do not add srctree to sysroot relative includes Lars Persson <lars.persson@axis.com> - 2016-08-16 13:50 +0200
  Re: [PATCH] kbuild: do not add srctree to sysroot relative includes Michal Marek <mmarek@suse.com> - 2016-08-16 14:00 +0200
    Re: [PATCH] kbuild: do not add srctree to sysroot relative includes Lars Persson <lars.persson@axis.com> - 2016-08-16 14:30 +0200

csiph-web