From: Sam Ravnborg Date: Sat, 15 Sep 2007 06:55:39 +0000 (+0200) Subject: kbuild: fix directory traversal bug X-Git-Tag: v2.6.24-rc1~826^2~25 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5fb976520a53f45f8bbf2e851f16b3b5558d485;p=platform%2Fkernel%2Flinux-3.10.git 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: Sam Ravnborg --- diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index fc498fe..03905aa 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -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 := $(multi-objs-y) $(multi-objs-m) -# $(subdir-obj-y) is the list of objects in $(obj-y) which do not live -# in the local directory -subdir-obj-y := $(foreach o,$(obj-y),$(if $(filter-out $(o),$(notdir $(o))),$(o))) +# $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to +# tell kbuild to descend +subdir-obj-y := $(filter %/built-in.o, $(obj-y)) # $(obj-dirs) is a list of directories that contain object files obj-dirs := $(dir $(multi-objs) $(subdir-obj-y))