Re: using cc-option in arch/ppc64/boot/Makefile

From: Sam Ravnborg
Date: Mon Oct 18 2004 - 14:07:53 EST


On Mon, Oct 18, 2004 at 01:47:55PM +0000, Hollis Blanchard wrote:
> On Sunday 17 October 2004 09:57, Sam Ravnborg wrote:
> > Something like this should do the trick?
> > You could also include everything in your Makefile but I prefer
> > Makefile.lib to make it a bit more general.
>
> That's what I had tried. I'm having strange problems though. This patch:
>
> --- 1.25/arch/ppc64/boot/Makefile Sun Oct 3 12:23:50 2004
> +++ edited/arch/ppc64/boot/Makefile Mon Oct 18 14:03:40 2004
> @@ -20,6 +20,8 @@
> # CROSS32_COMPILE is setup as a prefix just like CROSS_COMPILE
> # in the toplevel makefile.
>
> +include scripts/Makefile.lib
> +
This is wrong. kbuild will include Makefile.lib for you.

> CROSS32_COMPILE ?=
> #CROSS32_COMPILE = /usr/local/ppc/bin/powerpc-linux-
>
> @@ -72,7 +74,12 @@
> quiet_cmd_stripvm = STRIP $@
> cmd_stripvm = $(STRIP) -s $< -o $@
>
> +HAS_BIARCH := $(call cc-option-yn, -lalala)
so HAS_BIARCH will evaluate to 'n'

> +
> vmlinux.strip: vmlinux FORCE
> + echo $(cc-option-yn)
$(cc-option-yn) should not evaluate to 'y' - so you did something else wrong.
> + echo $(HAS_BIARCH)
This should have been 'n' - but the 'y' is explained by the above bug.

> + $(call cc-option-yn, -m64)
Here you try to execute 'y', this will fail.

> $(call if_changed,stripvm)
> $(obj)/vmlinux.initrd: vmlinux.strip $(obj)/addRamDisk
> $(obj)/ramdisk.image.gz FORCE
> $(call if_changed,ramdisk)
>
> ... yields the following output:
>
> make -f scripts/Makefile.build obj=arch/ppc64/boot arch/ppc64/boot/zImage
> echo y
> y
> echo y
> y
> y
> make[1]: y: Command not found

Skip the include of Mafilefile.lib and try again. If you still has troubles
try posting a complete diff.

Sam
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/