problem with inflate cleanup patches on ARM

Nicolas Bellido ml at acolin.be
Tue Nov 29 02:38:04 CST 2005


On Wednesday 23 November 2005 18:39, Matt Mackall wrote:
> On Tue, Nov 22, 2005 at 05:21:28PM -0800, Tim Bird wrote:
> >   arm-sony-linux-gcc -Wp,-MD,arch/arm/boot/compressed/.inflate.o.d 
> > -nostdinc -isystem
> > /usr/local/arm-sony-linux.phase8/devel/bin/../lib/gcc/arm-sony-linux/3.4.
> >4/include -D__KERNEL__ -Iinclude -Iinclude2
> > -I/home/tbird/work/alp9-test-14/alp-linux/include -mlittle-endian
> > -I/home/tbird/work/alp9-test-14/alp-linux/arch/arm/boot/compressed
> > -Iarch/arm/boot/compressed -Wall -Wundef -Wstrict-prototypes
> > -Wno-trigraphs -fno-strict-aliasing -fno-common -ffreestanding -Os
> > -fno-omit-frame-pointer -fno-optimize-sibling-calls -g
> > -fno-omit-frame-pointer -mapcs -mno-sched-prolog -mapcs-32
> > -mno-thumb-interwork -D__LINUX_ARM_ARCH__=4 -march=armv4 -mtune=arm9tdmi
> > -malignment-traps -msoft-float -Uarm -funit-at-a-time
> > -Wdeclaration-after-statement -fpic -fno-instrument-functions
> > -DKBUILD_BASENAME=inflate -DKBUILD_MODNAME=inflate -c -o
> > arch/arm/boot/compressed/.tmp_inflate.o
> > /home/tbird/work/alp9-test-14/alp-linux/lib/inflate.c
>
> Hmm. This boils down to:
>
> gcc -o arch/arm/boot/compressed/.tmp_inflate.o lib/inflate.c
>
> Which is somehow implicit in:
>
> $(obj)/inflate.o: lib/inflate.c
>         $(call cmd,cc_o_c)
>
> This in turn calls bits from scripts/Makefile.build:
>
> ifndef CONFIG_MODVERSIONS
> cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<
>
> else
> ...
> cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $<
> cmd_modversions =
> 	if ...
> 		...
> 	        $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F)
>         else
>                 mv -f $(@D)/.tmp_$(@F) $@;
>         fi;
> endif
>
> So $(call cmd,cc_o_c) doesn't seem to do the right thing if modular
> builds are enabled. Huh. This explains a lot - I'd gotten a couple
> similar reports that I figured were somehow problems with old make
> versions.
>
> Try changing that bit in arch/arm/boot/compressed to:
>
>  $(call rule,cc_o_c)

Actually, wouldn't it be better to do:

	$(call if_changed_rule,cc_o_c)

On i386, that's what I have to do, otherwise $(obj)/inflate.o is not generated 
(nor the .tmp_inflate).

Nicolas


More information about the Linux-tiny mailing list