Commit f5fb9765 authored by Sam Ravnborg's avatar Sam Ravnborg Committed by Sam Ravnborg

kbuild: fix directory traversal bug

Previously kbuild choked over the following:
obj-y += ../../../arch/i386/kernel/bootflag.o

This has resulted in some rather ugly workarounds in
current x86_64 tree.
This patch fixes kbuild to allow the above and enable
potential cleanups in x86_64 and maybe in other places.
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent c01b171d
...@@ -44,9 +44,9 @@ multi-objs-y := $(foreach m, $(multi-used-y), $($(m:.o=-objs)) $($(m:.o=-y))) ...@@ -44,9 +44,9 @@ multi-objs-y := $(foreach m, $(multi-used-y), $($(m:.o=-objs)) $($(m:.o=-y)))
multi-objs-m := $(foreach m, $(multi-used-m), $($(m:.o=-objs)) $($(m:.o=-y))) multi-objs-m := $(foreach m, $(multi-used-m), $($(m:.o=-objs)) $($(m:.o=-y)))
multi-objs := $(multi-objs-y) $(multi-objs-m) multi-objs := $(multi-objs-y) $(multi-objs-m)
# $(subdir-obj-y) is the list of objects in $(obj-y) which do not live # $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to
# in the local directory # tell kbuild to descend
subdir-obj-y := $(foreach o,$(obj-y),$(if $(filter-out $(o),$(notdir $(o))),$(o))) subdir-obj-y := $(filter %/built-in.o, $(obj-y))
# $(obj-dirs) is a list of directories that contain object files # $(obj-dirs) is a list of directories that contain object files
obj-dirs := $(dir $(multi-objs) $(subdir-obj-y)) obj-dirs := $(dir $(multi-objs) $(subdir-obj-y))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment