mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* kbuild can't build foo/xxx.o
@ 2012-12-03  9:51 张忠山
  2012-12-03 10:00 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: 张忠山 @ 2012-12-03  9:51 UTC (permalink / raw)
  To: barebox

kbuild in barebox can't built when

obj-y += foo/xxx.o

But in kernel, It's OK

Maybe it should:

----------------------------------------------------------
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index cb46db2..14e471d 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -55,10 +55,10 @@ 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,$(pbl-y),$(if $(filter-out $(o),$(notdir $(o))),$(o)))
-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-pbl.o, $(pbl-y))
+subdir-obj-y := $(filter %/built-in.o, $(obj-y))
 subdir-obj-y += $(__subdir-obj-y)

 # $(obj-dirs) is a list of directories that contain object files
----------------------------------------------------------


-- 
Best Regards,
zzs



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

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

* Re: kbuild can't build foo/xxx.o
  2012-12-03  9:51 kbuild can't build foo/xxx.o 张忠山
@ 2012-12-03 10:00 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2012-12-03 10:00 UTC (permalink / raw)
  To: barebox

On Mon, Dec 03, 2012 at 05:51:50PM +0800, 张忠山 wrote:
> kbuild in barebox can't built when
> 
> obj-y += foo/xxx.o
> 
> But in kernel, It's OK
> 
> Maybe it should:
> 
> ----------------------------------------------------------
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index cb46db2..14e471d 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -55,10 +55,10 @@ 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,$(pbl-y),$(if $(filter-out $(o),$(notdir $(o))),$(o)))
> -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-pbl.o, $(pbl-y))
> +subdir-obj-y := $(filter %/built-in.o, $(obj-y))
>  subdir-obj-y += $(__subdir-obj-y)
> 
>  # $(obj-dirs) is a list of directories that contain object files

Seems you have that from the Kernel. Looks fine. Can you send a formal
patch with you Signed-off and also an explanation on which original
Kernel commit this is based on?

Sascha


-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
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:[~2012-12-03 10:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-03  9:51 kbuild can't build foo/xxx.o 张忠山
2012-12-03 10:00 ` Sascha Hauer

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