mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] kbuild: do not drop -I without parameter
@ 2019-06-11 10:16 Masahiro Yamada
  2019-06-13  6:25 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2019-06-11 10:16 UTC (permalink / raw)
  To: barebox

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>
---

Please insert this before the kconfig resync.

 scripts/Kbuild.include | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 5e7255db3..a2dbbd8a0 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)))
-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-06-13  6:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-11 10:16 [PATCH] kbuild: do not drop -I without parameter Masahiro Yamada
2019-06-13  6:25 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox