* Re: [PATCH] ppc: fix build with O=$(output_dir)
[not found] <200410211910.i9LJAKjf029014@hera.kernel.org>
@ 2004-10-21 20:29 ` Tom Rini
2004-10-21 20:31 ` Tom Rini
1 sibling, 0 replies; 5+ messages in thread
From: Tom Rini @ 2004-10-21 20:29 UTC (permalink / raw)
To: Kernel Mailing List, Linus Torvalds, Andrew Morton; +Cc: bk-commits-head
On Thu, Oct 21, 2004 at 05:56:14PM +0000, roland@topspin.com wrote:
> ChangeSet 1.2040, 2004/10/21 10:56:14-07:00, roland@topspin.com
>
> [PATCH] ppc: fix build with O=$(output_dir)
>
> Recent changes to arch/ppc/boot/lib/Makefile cause
>
> CC arch/ppc/boot/lib/../../../../lib/zlib_inflate/infblock.o
> Assembler messages:
> FATAL: can't create arch/ppc/boot/lib/../../../../lib/zlib_inflate/infblock.o: No such file or directory
>
> when building a ppc kernel using O=$(output_dir) with CONFIG_ZLIB_INFLATE=n,
> because the $(output_dir)/lib/zlib_inflate directory doesn't get created.
>
> This patch, which makes arch/ppc/boot/lib/Makefile create the
> directory if needed, is one fix for the problem.
>
> Signed-off-by: Roland Dreier <roland@topspin.com>
> Signed-off-by: Andrew Morton <akpm@osdl.org>
> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Can we back this out please? As I noted on lkml once I saw this, it
still doesn't fix the problem of overwriting files in lib/zlib_inflate/
if ZLIB_INFLATE!=n, and adding explicit rules for lib/zlib_inflate/foo.c
-> ./foo.o looks quite bad (it's 2 calls if we want checker to get
invoked, one if we skip doing that). At the end of the thread, both
Roland and I were hoping Sam knew of a clever solution to this.
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] ppc: fix build with O=$(output_dir)
[not found] <200410211910.i9LJAKjf029014@hera.kernel.org>
2004-10-21 20:29 ` [PATCH] ppc: fix build with O=$(output_dir) Tom Rini
@ 2004-10-21 20:31 ` Tom Rini
2004-10-22 4:20 ` Roland Dreier
1 sibling, 1 reply; 5+ messages in thread
From: Tom Rini @ 2004-10-21 20:31 UTC (permalink / raw)
To: roland, Kernel Mailing List, Andrew Morton
On Thu, Oct 21, 2004 at 05:56:14PM +0000, roland@topspin.com wrote:
> ChangeSet 1.2040, 2004/10/21 10:56:14-07:00, roland@topspin.com
>
> [PATCH] ppc: fix build with O=$(output_dir)
>
> Recent changes to arch/ppc/boot/lib/Makefile cause
>
> CC arch/ppc/boot/lib/../../../../lib/zlib_inflate/infblock.o
> Assembler messages:
> FATAL: can't create arch/ppc/boot/lib/../../../../lib/zlib_inflate/infblock.o: No such file or directory
>
> when building a ppc kernel using O=$(output_dir) with CONFIG_ZLIB_INFLATE=n,
> because the $(output_dir)/lib/zlib_inflate directory doesn't get created.
>
> This patch, which makes arch/ppc/boot/lib/Makefile create the
> directory if needed, is one fix for the problem.
>
> Signed-off-by: Roland Dreier <roland@topspin.com>
> Signed-off-by: Andrew Morton <akpm@osdl.org>
> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Can we back this out please? As I noted on lkml once I saw this, it
still doesn't fix the problem of overwriting files in lib/zlib_inflate/
if ZLIB_INFLATE!=n, and adding explicit rules for lib/zlib_inflate/foo.c
-> ./foo.o looks quite bad (it's 2 calls if we want checker to get
invoked, one if we skip doing that). At the end of the thread, both
Roland and I were hoping Sam knew of a clever solution to this.
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] ppc: fix build with O=$(output_dir)
2004-10-21 20:31 ` Tom Rini
@ 2004-10-22 4:20 ` Roland Dreier
0 siblings, 0 replies; 5+ messages in thread
From: Roland Dreier @ 2004-10-22 4:20 UTC (permalink / raw)
To: Tom Rini; +Cc: Kernel Mailing List, Andrew Morton
Tom> Can we back this out please? As I noted on lkml once I saw
Tom> this, it still doesn't fix the problem of overwriting files
Tom> in lib/zlib_inflate/ if ZLIB_INFLATE!=n, and adding explicit
Tom> rules for lib/zlib_inflate/foo.c
-> ./foo.o looks quite bad (it's 2 calls if we want checker to get
Tom> invoked, one if we skip doing that). At the end of the
Tom> thread, both Roland and I were hoping Sam knew of a clever
Tom> solution to this.
I can't really object to backing this out, but I'll just point out
that without this patch, in the situations where mainline builds at
all, it still overwrites files in lib/zlib_inflate/. (And builds with
O=xxx don't work at all)
It might make more sense to leave this patch in for now and beg Sam
for a better fix in the future.
Thanks,
Roland
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] ppc: fix build with O=$(output_dir)
@ 2004-10-19 6:48 Roland Dreier
2004-10-19 16:44 ` Tom Rini
0 siblings, 1 reply; 5+ messages in thread
From: Roland Dreier @ 2004-10-19 6:48 UTC (permalink / raw)
To: sam, akpm; +Cc: linux-kernel
Recent changes to arch/ppc/boot/lib/Makefile cause
CC arch/ppc/boot/lib/../../../../lib/zlib_inflate/infblock.o
Assembler messages:
FATAL: can't create arch/ppc/boot/lib/../../../../lib/zlib_inflate/infblock.o: No such file or directory
when building a ppc kernel using O=$(output_dir) with CONFIG_ZLIB_INFLATE=n,
because the $(output_dir)/lib/zlib_inflate directory doesn't get created.
This patch, which makes arch/ppc/boot/lib/Makefile create the
directory if needed, is one fix for the problem.
Signed-off-by: Roland Dreier <roland@topspin.com>
Index: linux-2.6.9/arch/ppc/boot/lib/Makefile
===================================================================
--- linux-2.6.9.orig/arch/ppc/boot/lib/Makefile 2004-10-18 14:54:55.000000000 -0700
+++ linux-2.6.9/arch/ppc/boot/lib/Makefile 2004-10-18 23:41:28.000000000 -0700
@@ -4,7 +4,13 @@
CFLAGS_kbd.o += -Idrivers/char
-lib-y := $(addprefix ../../../../lib/zlib_inflate/, \
+ZLIB_DIR := ../../../../lib/zlib_inflate/
+
+lib-y := $(addprefix $(ZLIB_DIR), \
infblock.o infcodes.o inffast.o inflate.o inftrees.o infutil.o)
lib-y += div64.o
lib-$(CONFIG_VGA_CONSOLE) += vreset.o kbd.o
+
+ifneq ($(KBUILD_SRC),)
+_make_zlib_dir := $(shell [ -d $(obj)/$(ZLIB_DIR) ] || mkdir -p $(obj)/$(ZLIB_DIR) )
+endif
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] ppc: fix build with O=$(output_dir)
2004-10-19 6:48 Roland Dreier
@ 2004-10-19 16:44 ` Tom Rini
0 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2004-10-19 16:44 UTC (permalink / raw)
To: Roland Dreier; +Cc: sam, akpm, linux-kernel
On Mon, Oct 18, 2004 at 11:48:22PM -0700, Roland Dreier wrote:
> Recent changes to arch/ppc/boot/lib/Makefile cause
>
> CC arch/ppc/boot/lib/../../../../lib/zlib_inflate/infblock.o
> Assembler messages:
> FATAL: can't create arch/ppc/boot/lib/../../../../lib/zlib_inflate/infblock.o: No such file or directory
>
> when building a ppc kernel using O=$(output_dir) with CONFIG_ZLIB_INFLATE=n,
> because the $(output_dir)/lib/zlib_inflate directory doesn't get created.
>
> This patch, which makes arch/ppc/boot/lib/Makefile create the
> directory if needed, is one fix for the problem.
IMHO, this is the uglier of the two fixes for the problem, as this means
you'll still be clobbering lib/zlib_inflate/*.o when ZLIB_INFLATE!=n.
The other is to go back to putting the object in $(O)/arch/ppc/boot/lib/
and copying the guts of the .c.o rule to arch/ppc/boot/lib/Makefile
Sam, any chance you've had time to think up a good fix to this? Thanks.
--
Tom Rini
http://gate.crashing.org/~trini/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-10-22 4:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200410211910.i9LJAKjf029014@hera.kernel.org>
2004-10-21 20:29 ` [PATCH] ppc: fix build with O=$(output_dir) Tom Rini
2004-10-21 20:31 ` Tom Rini
2004-10-22 4:20 ` Roland Dreier
2004-10-19 6:48 Roland Dreier
2004-10-19 16:44 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox