[U-Boot-Users] [PATCH] ColdFire: Get information from the correct GCC

Wolfgang Denk wd at denx.de
Sat May 3 00:57:25 CEST 2008


In message <4791E710007FEB4BBF83775D787F462F070D41F0 at az33exm22.fsl.freescale.net> you wrote:
>
> > And ``$(CC)'' and ``$(CROSS_COMPILE)gcc'' should be really the same
> here.
> Sorry for the confusion, and yes both $(CC) and $(CROSS_COMPILE)gcc are
> the same. It is unsolvable behavior in ifeq (...) where $(shell $(CC)
> --version) does not match 4.2 and caused linking error.
> 
> Original:
> ifeq ($(findstring 4.2,$(shell $(CC) --version)),4.2)
> PLATFORM_CPPFLAGS += -mcpu=54455 -fPIC
> else
> PLATFORM_CPPFLAGS += -m5407 -fPIC
> endif

I'm sorry, but I don't understand. If we agree, that "yes both  $(CC)
and  $(CROSS_COMPILE)gcc  are  the same", then why would changing one
for the other in above lines make any difference?

> As you can see below captured, -mcpu=54455 was selected in compiling
> when gcc version is 4.2. When it comes to linking, the $(shell $(CC)

Yes, I can see the -mcpu=54455 flag.

> --version) becomes other value and select the -m5407 option with
> different libgcc.

But no, I cannot see the "-m5407" string anywhere in your output.

...
> /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/bin/m68k-
> uclinux-ld -Bstatic -T
> /proj/u-boot/uboot133/u-boot-test/board/freescale/m54455evb/u-boot.lds
> -n -Ttext 0x04000000 $UNDEF_SYM cpu/mcf5445x/start.o \
>                         --start-group lib_generic/libgeneric.a
> board/freescale/common/libfreescale.a
> board/freescale/m54455evb/libm54455evb.a cpu/mcf5445x/libmcf5445x.a
> lib_m68k/libm68k.a fs/cramfs/libcramfs.a fs/fat/libfat.a
> fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a
> fs/ext2/libext2fs.a net/libnet.a disk/libdisk.a
> drivers/bios_emulator/libatibiosemu.a drivers/block/libblock.a
> drivers/dma/libdma.a drivers/hwmon/libhwmon.a drivers/i2c/libi2c.a
> drivers/input/libinput.a drivers/misc/libmisc.a drivers/mtd/libmtd.a
> drivers/mtd/nand/libnand.a drivers/mtd/nand_legacy/libnand_legacy.a
> drivers/mtd/onenand/libonenand.a drivers/net/libnet.a
> drivers/net/sk98lin/libsk98lin.a drivers/pci/libpci.a
> drivers/pcmcia/libpcmcia.a drivers/spi/libspi.a drivers/rtc/librtc.a
> drivers/serial/libserial.a drivers/usb/libusb.a drivers/video/libvideo.a
> common/libcommon.a libfdt/libfdt.a api/libapi.a post/libpost.a
> --end-group -L
> /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/lib/gcc/m
> 68k-uclinux/4.2.1/m5407/msep-data -lgcc \
------------------^^^^^^^^
>                         -Map u-boot.map -o u-boot

I can see the "m5407" string here; this comes from the PLATFORM_LIBS
variable, which gets set in the Makefile as follows:

# Add GCC lib
PLATFORM_LIBS += -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc


But here you don't replace the $(CC), so this cannot be the culprit.

Sorry, I do not understand what you are trying to tell me. 

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Honest error is to be pitied, not ridiculed.
                                       -- Philip Earl of Chesterfield




More information about the U-Boot mailing list