diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-05-13 02:22:17 -0400 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2019-05-17 22:49:57 -0400 |
commit | cdd750bfb1f76fe9be8cfb53cbe77b2e811081ab (patch) | |
tree | aef9cb28da3409096df0239e3e315c4787fd5787 /scripts/Kbuild.include | |
parent | 9cc342f6c4a06ea613ddef1bcaa25409260aec63 (diff) |
kbuild: remove 'addtree' and 'flags' magic for header search paths
The 'addtree' and 'flags' in scripts/Kbuild.include are so compilecated
and ugly.
As I mentioned in [1], Kbuild should stop automatic prefixing of header
search path options.
I fixed up (almost) all Makefiles in the kernel. Now 'addtree' and
'flags' have been removed.
Kbuild still caters to add $(srctree)/$(src) and $(objtree)/$(obj)
to the header search path for O= building, but never touches extra
compiler options from ccflags-y etc.
[1]: https://patchwork.kernel.org/patch/9632347/
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/Kbuild.include')
-rw-r--r-- | scripts/Kbuild.include | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 7484b9d8272f..a675ce11a573 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
@@ -192,14 +192,6 @@ clean := -f $(srctree)/scripts/Makefile.clean obj | |||
192 | # $(Q)$(MAKE) $(hdr-inst)=dir | 192 | # $(Q)$(MAKE) $(hdr-inst)=dir |
193 | hdr-inst := -f $(srctree)/scripts/Makefile.headersinst obj | 193 | hdr-inst := -f $(srctree)/scripts/Makefile.headersinst obj |
194 | 194 | ||
195 | # Prefix -I with $(srctree) if it is not an absolute path. | ||
196 | # skip if -I has no parameter | ||
197 | addtree = $(if $(patsubst -I%,%,$(1)), \ | ||
198 | $(if $(filter-out -I/% -I./% -I../%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1)),$(1)),$(1)) | ||
199 | |||
200 | # Find all -I options and call addtree | ||
201 | flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o))) | ||
202 | |||
203 | # echo command. | 195 | # echo command. |
204 | # Short version is used, if $(quiet) equals `quiet_', otherwise full one. | 196 | # Short version is used, if $(quiet) equals `quiet_', otherwise full one. |
205 | echo-cmd = $(if $($(quiet)cmd_$(1)),\ | 197 | echo-cmd = $(if $($(quiet)cmd_$(1)),\ |