diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-06-11 19:16:35 +0900 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-06-13 08:24:29 +0200 |
commit | 71948298b2bd8860f99fb0b4f7efbae463ea7d9f (patch) | |
tree | 2245c5b9d5676d87fda2d3cc514fa397876b5b0d /scripts | |
parent | afa8665f9f1a5666c63db762fcad53e7425126ef (diff) | |
download | barebox-71948298b2bd8860f99fb0b4f7efbae463ea7d9f.tar.gz barebox-71948298b2bd8860f99fb0b4f7efbae463ea7d9f.tar.xz |
kbuild: do not drop -I without parameter
Linux commit 48f6e3cf5bc6dd0ee00405342ff310c3b1fedb35
[ Adjusted for barebox for some missing commits ]
The comment line for addtree says "skip if -I has no parameter".
What it actually does is "drop if -I has no parameter". For example,
if you have the compiler flag '-I foo' (a space between), it will be
converted to 'foo'. This completely changes the meaning.
What we want is, "do nothing" for -I without parameter so that
'-I foo' is kept as-is.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Kbuild.include | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 5e7255db3a..a2dbbd8a00 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include @@ -161,7 +161,7 @@ clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean 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/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1))) $(1)) +$(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1))) $(1),$(1)) # Find all -I options and call addtree flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o))) |