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

From: TsiChung Liew Tsi-Chung.Liew@freescale.com
Signed-off-by: Kurt Mahan kmahan@freescale.com Signed-off-by: TsiChung Liew Tsi-Chung.Liew@freescale.com --- cpu/mcf5227x/config.mk | 2 +- cpu/mcf523x/config.mk | 2 +- cpu/mcf52x2/config.mk | 2 +- cpu/mcf532x/config.mk | 2 +- cpu/mcf5445x/config.mk | 2 +- cpu/mcf547x_8x/config.mk | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/cpu/mcf5227x/config.mk b/cpu/mcf5227x/config.mk index 8d60fd6..2e50696 100644 --- a/cpu/mcf5227x/config.mk +++ b/cpu/mcf5227x/config.mk @@ -24,7 +24,7 @@ #
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data -ifeq ($(findstring 4.2,$(shell $(CC) --version)),4.2) +ifeq ($(findstring 4.2,$(shell $(CROSS_COMPILE)gcc --version)),4.2) PLATFORM_CPPFLAGS += -mcpu=5208 -fPIC else PLATFORM_CPPFLAGS += -m5307 -fPIC diff --git a/cpu/mcf523x/config.mk b/cpu/mcf523x/config.mk index 93645a3..73fb08d 100644 --- a/cpu/mcf523x/config.mk +++ b/cpu/mcf523x/config.mk @@ -24,7 +24,7 @@ #
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data -ifeq ($(findstring 4.2,$(shell $(CC) --version)),4.2) +ifeq ($(findstring 4.2,$(shell $(CROSS_COMPILE)gcc --version)),4.2) PLATFORM_CPPFLAGS += -mcpu=5235 -fPIC else PLATFORM_CPPFLAGS += -m5307 -fPIC diff --git a/cpu/mcf52x2/config.mk b/cpu/mcf52x2/config.mk index 650e340..be360f8 100644 --- a/cpu/mcf52x2/config.mk +++ b/cpu/mcf52x2/config.mk @@ -34,7 +34,7 @@ is5275:=$(shell grep CONFIG_M5275 $(TOPDIR)/include/$(cfg)) is5282:=$(shell grep CONFIG_M5282 $(TOPDIR)/include/$(cfg))
-ifeq ($(findstring 4.2,$(shell $(CC) --version)),4.2) +ifeq ($(findstring 4.2,$(shell $(CROSS_COMPILE)gcc --version)),4.2)
ifneq (,$(findstring CONFIG_M5249,$(is5249))) PLATFORM_CPPFLAGS += -mcpu=5249 diff --git a/cpu/mcf532x/config.mk b/cpu/mcf532x/config.mk index 16a0bc3..e4a3cf9 100644 --- a/cpu/mcf532x/config.mk +++ b/cpu/mcf532x/config.mk @@ -24,7 +24,7 @@ #
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data -ifeq ($(findstring 4.2,$(shell $(CC) --version)),4.2) +ifeq ($(findstring 4.2,$(shell $(CROSS_COMPILE)gcc --version)),4.2) PLATFORM_CPPFLAGS += -mcpu=5329 -fPIC else PLATFORM_CPPFLAGS += -m5307 -fPIC diff --git a/cpu/mcf5445x/config.mk b/cpu/mcf5445x/config.mk index 88433f2..a85d0f9 100644 --- a/cpu/mcf5445x/config.mk +++ b/cpu/mcf5445x/config.mk @@ -24,7 +24,7 @@ #
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data -ifeq ($(findstring 4.2,$(shell $(CC) --version)),4.2) +ifeq ($(findstring 4.2,$(shell $(CROSS_COMPILE)gcc --version)),4.2) PLATFORM_CPPFLAGS += -mcpu=54455 -fPIC else PLATFORM_CPPFLAGS += -m5407 -fPIC diff --git a/cpu/mcf547x_8x/config.mk b/cpu/mcf547x_8x/config.mk index e5f4385..eb6b50b 100644 --- a/cpu/mcf547x_8x/config.mk +++ b/cpu/mcf547x_8x/config.mk @@ -24,7 +24,7 @@ #
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data -ifeq ($(findstring 4.2,$(shell $(CC) --version)),4.2) +ifeq ($(findstring 4.2,$(shell $(CROSS_COMPILE)gcc --version)),4.2) PLATFORM_CPPFLAGS += -mcpu=5485 -fPIC else PLATFORM_CPPFLAGS += -m5407 -fPIC

In message 1209575423-1244-1-git-send-email-Tsi-Chung.Liew@freescale.com you wrote:
From: TsiChung Liew Tsi-Chung.Liew@freescale.com
Signed-off-by: Kurt Mahan kmahan@freescale.com Signed-off-by: TsiChung Liew Tsi-Chung.Liew@freescale.com
cpu/mcf5227x/config.mk | 2 +- cpu/mcf523x/config.mk | 2 +- cpu/mcf52x2/config.mk | 2 +- cpu/mcf532x/config.mk | 2 +- cpu/mcf5445x/config.mk | 2 +- cpu/mcf547x_8x/config.mk | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
Applied, thanks!
Best regards,
Wolfgang Denk

Tsi-Chung Liew wrote:
cpu/mcf523x/config.mk | 2 +- cpu/mcf52x2/config.mk | 2 +- cpu/mcf532x/config.mk | 2 +- cpu/mcf5445x/config.mk | 2 +- cpu/mcf547x_8x/config.mk | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/cpu/mcf5227x/config.mk b/cpu/mcf5227x/config.mk index 8d60fd6..2e50696 100644 --- a/cpu/mcf5227x/config.mk +++ b/cpu/mcf5227x/config.mk @@ -24,7 +24,7 @@ #
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data -ifeq ($(findstring 4.2,$(shell $(CC) --version)),4.2) +ifeq ($(findstring 4.2,$(shell $(CROSS_COMPILE)gcc --version)),4.2) PLATFORM_CPPFLAGS += -mcpu=5208 -fPIC else PLATFORM_CPPFLAGS += -m5307 -fPIC
Let me make sure the intention of this change. With or without this change, we can always evaluate $(CROSS_COMPILE)gcc --version, right? Or am I missing something?
There are several $(CC)/$(AR)/$(AS)/$(CPP) users in cpu/*/Makefile & cpu/*/config.mk. I'm wondering whether we need to fix all these usages or not.
Thanks in advance,
Shinya

Shinya
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data -ifeq ($(findstring 4.2,$(shell $(CC) --version)),4.2) +ifeq ($(findstring 4.2,$(shell $(CROSS_COMPILE)gcc --version)),4.2) PLATFORM_CPPFLAGS += -mcpu=5208 -fPIC else PLATFORM_CPPFLAGS += -m5307 -fPIC
Let me make sure the intention of this change. With or without this
change,
we can always evaluate $(CROSS_COMPILE)gcc --version, right? Or am I missing something?
Yes, we can always evaluate $(CROSS_COMPILE)gcc --version, but not $(CC)gcc --version. The changed was from $(CC) to $(CROSS_COMPILE). This issue does not affect if compiler version is 4.1-xx and using Fedora 3 and above, and compiler version is 4.2-xx and using only Fedora 3. But, it will show compiling error if compiler version is 4.2-xx and using Fedora 4 and above.
The information will retrieve correctly from GCC when compiling the source code to object code. Until, when it starts linking the all the libs and objs, it retrieves the incorrect information from GCC and select the other PLATFORM_CPPFLAGS and causing linking errors.
There are several $(CC)/$(AR)/$(AS)/$(CPP) users in cpu/*/Makefile &
cpu/*/config.mk.
I'm wondering whether we need to fix all these usages or not.
No. Only in cpu/*/config.mk with ifeq (condition) PLATFORM_CPPFLAGS += ... else PLATFORM_CPPFLAGS += ...
Regards, TsiChung

In message 4791E710007FEB4BBF83775D787F462F070D3E90@az33exm22.fsl.freescale.net you wrote:
Let me make sure the intention of this change. With or without this change, we can always evaluate $(CROSS_COMPILE)gcc --version, right? Or am I missing something?
Yes, we can always evaluate $(CROSS_COMPILE)gcc --version, but not $(CC)gcc --version. The changed was from $(CC) to $(CROSS_COMPILE). This
Stop! We are not talking about "$(CC)gcc"!
The change was this:
-ifeq ($(findstring 4.2,$(shell $(CC) --version)),4.2) +ifeq ($(findstring 4.2,$(shell $(CROSS_COMPILE)gcc --version)),4.2)
And ``$(CC)'' and ``$(CROSS_COMPILE)gcc'' should be really the same here.
issue does not affect if compiler version is 4.1-xx and using Fedora 3 and above, and compiler version is 4.2-xx and using only Fedora 3. But, it will show compiling error if compiler version is 4.2-xx and using Fedora 4 and above.
$(CC) is the CROSS compiler, so the version of gcc on the host system should not play any role. The host compiler would be $(HOSTCC)
The information will retrieve correctly from GCC when compiling the source code to object code. Until, when it starts linking the all the libs and objs, it retrieves the incorrect information from GCC and select the other PLATFORM_CPPFLAGS and causing linking errors.
There are several $(CC)/$(AR)/$(AS)/$(CPP) users in cpu/*/Makefile &
cpu/*/config.mk.
I'm wondering whether we need to fix all these usages or not.
No. Only in cpu/*/config.mk with ifeq (condition) PLATFORM_CPPFLAGS += ... else PLATFORM_CPPFLAGS += ...
Why should that be different?
Best regards,
Wolfgang Denk

Wolfgang,
Stop! We are not talking about "$(CC)gcc"!
The change was this:
-ifeq ($(findstring 4.2,$(shell $(CC) --version)),4.2) +ifeq ($(findstring 4.2,$(shell $(CROSS_COMPILE)gcc --version)),4.2)
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
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) --version) becomes other value and select the -m5407 option with different libgcc.
/snip ... /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/bin/m68k- uclinux-gcc -g -Os -ffixed-d7 -msep-data -D__KERNEL__ -DTEXT_BASE=0x04000000 -I/proj/u-boot/uboot133/u-boot-test/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/lib/gcc/m 68k-uclinux/4.2.1/include -pipe -DCONFIG_M68K -D__M68K__ -Wa, -mcpu=54455 -fPIC -DTEXT_BASE=0x04000000 -Wall -Wstrict-prototypes -c -o cmd_mac.o cmd_mac.c /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/bin/m68k- uclinux-ar crv libcommon.a main.o ACEX1K.o altera.o bedbug.o circbuf.o cmd_autoscript.o cmd_bdinfo.o image.o gunzip.o cmd_boot.o cmd_bootm.o cmd_cache.o cmd_console.o cmd_date.o cmd_eeprom.o cmd_elf.o cmd_ext2.o cmd_fat.o cmd_fdc.o cmd_flash.o cmd_i2c.o cmd_ide.o cmd_itest.o cmd_jffs2.o cmd_load.o cmd_mem.o cmd_mii.o cmd_misc.o cmd_nand.o cmd_net.o cmd_nvedit.o cmd_onenand.o cmd_pcmcia.o cmd_reginfo.o cmd_ximg.o cmd_vfd.o command.o console.o cyclon2.o stratixII.o devices.o dlmalloc.o docecc.o environment.o env_common.o env_nand.o env_dataflash.o env_flash.o env_eeprom.o env_onenand.o env_nvram.o env_nowhere.o exports.o flash.o fpga.o ft_build.o hush.o kgdb.o lcd.o lists.o lynxkdi.o memsize.o miiphybb.o miiphyutil.o s_record.o serial.o soft_i2c.o soft_spi.o spartan2.o spartan3.o usb.o usb_kbd.o usb_storage.o virtex2.o xilinx.o crc16.o xyzModem.o cmd_mac.o a - main.o a - ACEX1K.o ... a - cmd_mac.o make[1]: Leaving directory `/proj/u-boot/uboot133/u-boot-test/common' make -C libfdt/ make[1]: Entering directory `/proj/u-boot/uboot133/u-boot-test/libfdt' /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/bin/m68k- uclinux-ar crv libfdt.a make[1]: Leaving directory `/proj/u-boot/uboot133/u-boot-test/libfdt' make -C api/ make[1]: Entering directory `/proj/u-boot/uboot133/u-boot-test/api' /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/bin/m68k- uclinux-ar crv libapi.a make[1]: Leaving directory `/proj/u-boot/uboot133/u-boot-test/api' make -C post/ make[1]: Entering directory `/proj/u-boot/uboot133/u-boot-test/post' (echo create libpost.a; for lib in ; \ do echo addlib $lib; done; echo save) \ | /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/bin/m68k- uclinux-ar -M make[1]: Leaving directory `/proj/u-boot/uboot133/u-boot-test/post' make -C /proj/u-boot/uboot133/u-boot-test/board/freescale/m54455evb/ u-boot.lds make[1]: Entering directory `/proj/u-boot/uboot133/u-boot-test/board/freescale/m54455evb' make[1]: Nothing to be done for `u-boot.lds'. make[1]: Leaving directory `/proj/u-boot/uboot133/u-boot-test/board/freescale/m54455evb' UNDEF_SYM=`/opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinu x/bin/m68k-uclinux-objdump -x 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 |sed -n -e 's/.*(__u_boot_cmd_.*)/-u\1/p'|sort|uniq`;\ cd /proj/u-boot/uboot133/u-boot-test && /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 /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/bin/m68k- uclinux-ld.real: m68k:isa-b:nousp:mac architecture of input file `/opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/lib/gcc/ m68k-uclinux/4.2.1/m5407/msep-data/libgcc.a(_float.o)' is incompatible with m68k:isa-c:emac output /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/bin/m68k- uclinux-ld.real: m68k:isa-b:nousp:mac architecture of input file `/opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/lib/gcc/ m68k-uclinux/4.2.1/m5407/msep-data/libgcc.a(_floatex.o)' is incompatible with m68k:isa-c:emac output /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/bin/m68k- uclinux-ld.real: m68k:isa-b:nousp:mac architecture of input file `/opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/lib/gcc/ m68k-uclinux/4.2.1/m5407/msep-data/libgcc.a(fpgnulib.o)' is incompatible with m68k:isa-c:emac output make: *** [u-boot] Error 1 /Snip
$(CC) is the CROSS compiler, so the version of gcc on the host system
should
not play any role. The host compiler would be $(HOSTCC)
It does not involve any $(HOSTCC)
Why should that be different?
It solves the linking error.
Regards, TsiChung

In message 4791E710007FEB4BBF83775D787F462F070D41F0@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

Liew Tsi Chung wrote:
when gcc version is 4.2. When it comes to linking, the $(shell $(CC) --version) becomes other value and select the -m5407 option with different libgcc.
I reverted this $(CC)-$(CROSS_COMPILE)gcc-conversion patch and built with M54455EVB_config and CodeSourcery's freescale-coldfire-4.2-125- m68k-uclinux-i686-pc-linux-gnu.tar.bz2. But couldn't reproduce.
--- [snip] : make[1]: Entering directory `/home/skuribay/devel/u-boot.git/board/freescale/m54455evb' m68k-uclinux-gcc -g -Os -ffixed-d7 -msep-data -D__KERNEL__ -DTEXT_BASE=0x04000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nos tdinc -isystem /opt/codesourcery/freescale-coldfire-4.2/bin/../lib/gcc/m68k-uclinux/4.2.3/include -pipe -DCONFIG_M68K -D__M68K__ -mcpu=54455 -fPIC -DTEXT_BASE =0x04000000 -Wall -Wstrict-prototypes -c -o m54455evb.o m54455evb.c m68k-uclinux-gcc -g -Os -ffixed-d7 -msep-data -D__KERNEL__ -DTEXT_BASE=0x04000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nos tdinc -isystem /opt/codesourcery/freescale-coldfire-4.2/bin/../lib/gcc/m68k-uclinux/4.2.3/include -pipe -DCONFIG_M68K -D__M68K__ -mcpu=54455 -fPIC -DTEXT_BASE =0x04000000 -Wall -Wstrict-prototypes -c -o flash.o flash.c m68k-uclinux-gcc -g -Os -ffixed-d7 -msep-data -D__KERNEL__ -DTEXT_BASE=0x04000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nos tdinc -isystem /opt/codesourcery/freescale-coldfire-4.2/bin/../lib/gcc/m68k-uclinux/4.2.3/include -pipe -DCONFIG_M68K -D__M68K__ -mcpu=54455 -fPIC -DTEXT_BASE =0x04000000 -Wall -Wstrict-prototypes -c -o mii.o mii.c m68k-uclinux-ar crv libm54455evb.a m54455evb.o flash.o mii.o a - m54455evb.o a - flash.o a - mii.o make[1]: Leaving directory `/home/skuribay/devel/u-boot.git/board/freescale/m54455evb' make -C /home/skuribay/devel/u-boot.git/board/freescale/m54455evb/ u-boot.lds make[1]: Entering directory `/home/skuribay/devel/u-boot.git/board/freescale/m54455evb' make[1]: Nothing to be done for `u-boot.lds'. make[1]: Leaving directory `/home/skuribay/devel/u-boot.git/board/freescale/m54455evb' UNDEF_SYM=`m68k-uclinux-objdump -x board/freescale/m54455evb/libm54455evb.a lib_generic/libgeneric.a board/freescale/common/libfreescale.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 | \ sed -n -e 's/.*(__u_boot_cmd_.*)/-u\1/p'|sort|uniq`;\ cd /home/skuribay/devel/u-boot.git && m68k-uclinux-ld -Bstatic -T /home/skuribay/devel/u-boot.git/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 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 board/freescale/m54455evb/libm54455evb.a --end-group -L /opt/codesourcery/freescale-coldfire-4.2/bin/../lib/gcc/m 68k-uclinux/4.2.3/msep-data -lgcc \ -Map u-boot.map -o u-boot m68k-uclinux-objcopy --gap-fill=0xff -O srec u-boot u-boot.srec m68k-uclinux-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin skuribay@debian:~/devel/u-boot.git$
---
As already Wolfgang pointed out, `gcc -print-libgcc-file-name' of your toolchain seems weird. This might be buildroot problem?
(1) Please show us the '-print-libgcc-file-name' part with your patch applied:
$(CC) $(CFLAGS) -print-libgcc-file-name ---------------------------------------
(without patch) /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/ m68k-uclinux/lib/gcc/m68k-uclinux/4.2.1/m5407/msep-data
(with patch) /* we'd like to confirm this one */
(2) Could you try other toolchains, such as this one[1], in order to sort this out?
Shinya
[1] http://www.codesourcery.com/gnu_toolchains/coldfire/download.html

Shinya,
Which linux distro are you using?
Regards, TsiChung
________________________________
From: Shinya Kuribayashi [mailto:skuribay@ruby.dti.ne.jp] Sent: Fri 5/2/2008 8:25 PM To: Liew Tsi Chung Cc: wd@denx.de; U-Boot-Users; Rigby John; Mahan Kurt Subject: Re: [U-Boot-Users] [PATCH] ColdFire: Get information from the correct GCC
Liew Tsi Chung wrote:
when gcc version is 4.2. When it comes to linking, the $(shell $(CC) --version) becomes other value and select the -m5407 option with different libgcc.
I reverted this $(CC)-$(CROSS_COMPILE)gcc-conversion patch and built with M54455EVB_config and CodeSourcery's freescale-coldfire-4.2-125- m68k-uclinux-i686-pc-linux-gnu.tar.bz2. But couldn't reproduce.
--- [snip] : make[1]: Entering directory `/home/skuribay/devel/u-boot.git/board/freescale/m54455evb' m68k-uclinux-gcc -g -Os -ffixed-d7 -msep-data -D__KERNEL__ -DTEXT_BASE=0x04000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nos tdinc -isystem /opt/codesourcery/freescale-coldfire-4.2/bin/../lib/gcc/m68k-uclinux/4.2.3/include -pipe -DCONFIG_M68K -D__M68K__ -mcpu=54455 -fPIC -DTEXT_BASE =0x04000000 -Wall -Wstrict-prototypes -c -o m54455evb.o m54455evb.c m68k-uclinux-gcc -g -Os -ffixed-d7 -msep-data -D__KERNEL__ -DTEXT_BASE=0x04000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nos tdinc -isystem /opt/codesourcery/freescale-coldfire-4.2/bin/../lib/gcc/m68k-uclinux/4.2.3/include -pipe -DCONFIG_M68K -D__M68K__ -mcpu=54455 -fPIC -DTEXT_BASE =0x04000000 -Wall -Wstrict-prototypes -c -o flash.o flash.c m68k-uclinux-gcc -g -Os -ffixed-d7 -msep-data -D__KERNEL__ -DTEXT_BASE=0x04000000 -I/home/skuribay/devel/u-boot.git/include -fno-builtin -ffreestanding -nos tdinc -isystem /opt/codesourcery/freescale-coldfire-4.2/bin/../lib/gcc/m68k-uclinux/4.2.3/include -pipe -DCONFIG_M68K -D__M68K__ -mcpu=54455 -fPIC -DTEXT_BASE =0x04000000 -Wall -Wstrict-prototypes -c -o mii.o mii.c m68k-uclinux-ar crv libm54455evb.a m54455evb.o flash.o mii.o a - m54455evb.o a - flash.o a - mii.o make[1]: Leaving directory `/home/skuribay/devel/u-boot.git/board/freescale/m54455evb' make -C /home/skuribay/devel/u-boot.git/board/freescale/m54455evb/ u-boot.lds make[1]: Entering directory `/home/skuribay/devel/u-boot.git/board/freescale/m54455evb' make[1]: Nothing to be done for `u-boot.lds'. make[1]: Leaving directory `/home/skuribay/devel/u-boot.git/board/freescale/m54455evb' UNDEF_SYM=`m68k-uclinux-objdump -x board/freescale/m54455evb/libm54455evb.a lib_generic/libgeneric.a board/freescale/common/libfreescale.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 | \ sed -n -e 's/.*(__u_boot_cmd_.*)/-u\1/p'|sort|uniq`;\ cd /home/skuribay/devel/u-boot.git && m68k-uclinux-ld -Bstatic -T /home/skuribay/devel/u-boot.git/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 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 board/freescale/m54455evb/libm54455evb.a --end-group -L /opt/codesourcery/freescale-coldfire-4.2/bin/../lib/gcc/m 68k-uclinux/4.2.3/msep-data -lgcc \ -Map u-boot.map -o u-boot m68k-uclinux-objcopy --gap-fill=0xff -O srec u-boot u-boot.srec m68k-uclinux-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin skuribay@debian:~/devel/u-boot.git$
---
As already Wolfgang pointed out, `gcc -print-libgcc-file-name' of your toolchain seems weird. This might be buildroot problem?
(1) Please show us the '-print-libgcc-file-name' part with your patch applied:
$(CC) $(CFLAGS) -print-libgcc-file-name ---------------------------------------
(without patch) /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/ m68k-uclinux/lib/gcc/m68k-uclinux/4.2.1/m5407/msep-data
(with patch) /* we'd like to confirm this one */
(2) Could you try other toolchains, such as this one[1], in order to sort this out?
Shinya
[1] http://www.codesourcery.com/gnu_toolchains/coldfire/download.html

Liew Tsi Chung wrote:
Shinya,
Which linux distro are you using?
[snip]
-Map u-boot.map -o u-boot
m68k-uclinux-objcopy --gap-fill=0xff -O srec u-boot u-boot.srec m68k-uclinux-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin skuribay@debian:~/devel/u-boot.git$
It's Debian lenny/testing. If any info required, please let me know.
Shinya

Shinya,
I am using Fedora 8. Also, the problem can be generated if using Fedora 4 and 5 except 3. If you have a Fedora 4 and above, please try it. I bet you will run into the same problem as Kurt and I did.
Regards, TsiChung
________________________________
From: Shinya Kuribayashi [mailto:skuribay@ruby.dti.ne.jp] Sent: Sat 5/3/2008 10:49 PM To: Liew Tsi Chung Cc: wd@denx.de; U-Boot-Users; Rigby John; Mahan Kurt Subject: Re: [U-Boot-Users] [PATCH] ColdFire: Get information from the correct GCC
Liew Tsi Chung wrote:
Shinya,
Which linux distro are you using?
[snip]
-Map u-boot.map -o u-boot
m68k-uclinux-objcopy --gap-fill=0xff -O srec u-boot u-boot.srec m68k-uclinux-objcopy --gap-fill=0xff -O binary u-boot u-boot.bin skuribay@debian:~/devel/u-boot.git$
It's Debian lenny/testing. If any info required, please let me know.
Shinya

Liew Tsi Chung wrote:
I am using Fedora 8. Also, the problem can be generated if using Fedora 4 and 5 except 3. If you have a Fedora 4 and above, please try it. I bet you will run into the same problem as Kurt and I did.
I can't try Fedora[458] in the immediate future, sorry. But at last I'm convinced that it seems GNU make on those distros behaves in different ways; differed expansion of CFLAGS is suspicious, but I'm not going to dig into further.
Could you confirm it builds with Today's config.mk patch by Wolfgang? If it works (I think it will), I'm satisfied with that.
thanks for your comments,
Shinya

Shinya Kuribayashi wrote:
Liew Tsi Chung wrote:
I am using Fedora 8. Also, the problem can be generated if using Fedora 4 and 5 except 3. If you have a Fedora 4 and above, please try it. I bet you will run into the same problem as Kurt and I did.
I ran into the problem with OpenSuSE 10.2
I can't try Fedora[458] in the immediate future, sorry. But at last I'm convinced that it seems GNU make on those distros behaves in different ways; differed expansion of CFLAGS is suspicious, but I'm not going to dig into further.
The version of make that I'm running is:
~> make --version GNU Make 3.81
--Kurt
Could you confirm it builds with Today's config.mk patch by Wolfgang? If it works (I think it will), I'm satisfied with that.
thanks for your comments,
Shinya

In message 481DE5AE.8010801@freescale.com you wrote:
I am using Fedora 8. Also, the problem can be generated if using Fedora 4 and 5 except 3. If you have a Fedora 4 and above, please try it. I bet you will run into the same problem as Kurt and I did.
I ran into the problem with OpenSuSE 10.2
And...
Could you confirm it builds with Today's config.mk patch by Wolfgang? If it works (I think it will), I'm satisfied with that.
...did you try i the current code fixes the problem?
Best regards,
Wolfgang Denk

Hi Kurt,
Kurt Mahan wrote:
Shinya Kuribayashi wrote:
Liew Tsi Chung wrote:
I am using Fedora 8. Also, the problem can be generated if using Fedora 4 and 5 except 3. If you have a Fedora 4 and above, please try it. I bet you will run into the same problem as Kurt and I did.
I ran into the problem with OpenSuSE 10.2
I can't try Fedora[458] in the immediate future, sorry. But at last I'm convinced that it seems GNU make on those distros behaves in different ways; differed expansion of CFLAGS is suspicious, but I'm not going to dig into further.
The version of make that I'm running is:
~> make --version GNU Make 3.81
me, too. But Debian's seems to have some extra bug fixes. As for Debian specific bugfixes, see [1].
-------------------------------- Package: make State: installed Automatically installed: no Version: 3.81-4 Priority: optional Section: devel Maintainer: Manoj Srivastava srivasta@debian.org Uncompressed Size: 991k Depends: libc6 (>= 2.7-1) Suggests: make-doc Description: The GNU version of the "make" utility. GNU Make is a program that determines which pieces of a large program need to be recompiled and issues the commands to recompile them, when necessary. More information about GNU Make can be found in the `make' Info page. The upstream sources for this package are available at the location ftp://ftp.gnu.org/gnu/make/. The documentation for this package does not meet the Debian Free Software Guidelines, and has been removed from this package. --------------------------------
I reverted Debian specific patches and repackaged GNU make; this will be pure GNU make 3.81 release. Next, I reverted Wolfgang's config.mk patch and tried M54455EVB_config again. But this *still* works fine.
Therefore I believe Debian's patches have no effect on our issue.
At this moment, I'm interested in VPATH (or vpath) on those systems when finally generating PLATFORM_LIBS. Passing -print-data-base to make will help in that case.
Otherwise, Fedora or OpenSuSE applies its specific patches on make...
But anyway, it seems the problem is already verified. I'm not going to dig into further :-)
thanks,
Shinya
[1] http://packages.debian.org/changelogs/pool/main/m/make-dfsg/make-dfsg_3.81-4...

Wolfgang and Shinya,
Could you confirm it builds with Today's config.mk patch by Wolfgang? If it works (I think it will), I'm satisfied with that.
With original $(CC) in cpu/*/config.mk and Wolfgang's config.mk patch: Still generates the same error (see below)
Regards, TsiChung
[snip] /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/bin/m68k- uclinux-gcc -g -Os -ffixed-d7 -msep-data -D__KERNEL__ -DTEXT_BASE=0x04000000 -I/proj/u-boot/uboot133/u-boot-test/include -fno-builtin -ffreestanding -nostdinc -isystem /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/lib/gcc/m 68k-uclinux/4.2.1/include -pipe -DCONFIG_M68K -D__M68K__ -Wa, -mcpu=54455 -fPIC -DTEXT_BASE=0x04000000 -Wall -Wstrict-prototypes -c -o cmd_mac.o cmd_mac.c /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/bin/m68k- uclinux-ar crv libcommon.a main.o ACEX1K.o altera.o bedbug.o circbuf.o cmd_autoscript.o cmd_bdinfo.o image.o gunzip.o cmd_boot.o cmd_bootm.o cmd_cache.o cmd_console.o cmd_date.o cmd_eeprom.o cmd_elf.o cmd_ext2.o cmd_fat.o cmd_fdc.o cmd_flash.o cmd_i2c.o cmd_ide.o cmd_itest.o cmd_jffs2.o cmd_load.o cmd_mem.o cmd_mii.o cmd_misc.o cmd_nand.o cmd_net.o cmd_nvedit.o cmd_onenand.o cmd_pcmcia.o cmd_reginfo.o cmd_ximg.o cmd_vfd.o command.o console.o cyclon2.o stratixII.o devices.o dlmalloc.o docecc.o environment.o env_common.o env_nand.o env_dataflash.o env_flash.o env_eeprom.o env_onenand.o env_nvram.o env_nowhere.o exports.o flash.o fpga.o ft_build.o hush.o kgdb.o lcd.o lists.o lynxkdi.o memsize.o miiphybb.o miiphyutil.o s_record.o serial.o soft_i2c.o soft_spi.o spartan2.o spartan3.o usb.o usb_kbd.o usb_storage.o virtex2.o xilinx.o crc16.o xyzModem.o cmd_mac.o a - main.o ... a - cmd_mac.o make[1]: Leaving directory `/proj/u-boot/uboot133/u-boot-test/common' make -C libfdt/ make[1]: Entering directory `/proj/u-boot/uboot133/u-boot-test/libfdt' /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/bin/m68k- uclinux-ar crv libfdt.a make[1]: Leaving directory `/proj/u-boot/uboot133/u-boot-test/libfdt' make -C api/ make[1]: Entering directory `/proj/u-boot/uboot133/u-boot-test/api' /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/bin/m68k- uclinux-ar crv libapi.a make[1]: Leaving directory `/proj/u-boot/uboot133/u-boot-test/api' make -C post/ make[1]: Entering directory `/proj/u-boot/uboot133/u-boot-test/post' (echo create libpost.a; for lib in ; \ do echo addlib $lib; done; echo save) \ | /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/bin/m68k- uclinux-ar -M make[1]: Leaving directory `/proj/u-boot/uboot133/u-boot-test/post' make -C /proj/u-boot/uboot133/u-boot-test/board/freescale/m54455evb/ u-boot.lds make[1]: Entering directory `/proj/u-boot/uboot133/u-boot-test/board/freescale/m54455evb' make[1]: Nothing to be done for `u-boot.lds'. make[1]: Leaving directory `/proj/u-boot/uboot133/u-boot-test/board/freescale/m54455evb' UNDEF_SYM=`/opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinu x/bin/m68k-uclinux-objdump -x 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 |sed -n -e 's/.*(__u_boot_cmd_.*)/-u\1/p'|sort|uniq`;\ cd /proj/u-boot/uboot133/u-boot-test && /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 /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/bin/m68k- uclinux-ld.real: m68k:isa-b:nousp:mac architecture of input file `/opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/lib/gcc/ m68k-uclinux/4.2.1/m5407/msep-data/libgcc.a(_float.o)' is incompatible with m68k:isa-c:emac output /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/bin/m68k- uclinux-ld.real: m68k:isa-b:nousp:mac architecture of input file `/opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/lib/gcc/ m68k-uclinux/4.2.1/m5407/msep-data/libgcc.a(_floatex.o)' is incompatible with m68k:isa-c:emac output /opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/bin/m68k- uclinux-ld.real: m68k:isa-b:nousp:mac architecture of input file `/opt/freescale/usr/local/gcc-4.2.47-uclibc-0.9.47/m68k-uclinux/lib/gcc/ m68k-uclinux/4.2.1/m5407/msep-data/libgcc.a(fpgnulib.o)' is incompatible with m68k:isa-c:emac output make: *** [u-boot] Error 1

In message 4791E710007FEB4BBF83775D787F462F0712C9C3@az33exm22.fsl.freescale.net you wrote:
Could you confirm it builds with Today's config.mk patch by Wolfgang? If it works (I think it will), I'm satisfied with that.
With original $(CC) in cpu/*/config.mk and Wolfgang's config.mk patch: Still generates the same error (see below)
Can you please test with the original code from the repository, i. e. with version v1.3.3-rc3 without local changes?
Best regards,
Wolfgang Denk

Wolfgang,
I tested the current version v1.3.3-rc3 (without local changes - $(CC)) with codesourcery uclinux version 4.2-125 and 4.2-47. It works!
Thanks!
Regards, TsiChung
________________________________
From: Wolfgang Denk [mailto:wd@denx.de] Sent: Mon 5/5/2008 3:02 PM To: Liew Tsi Chung Cc: Shinya Kuribayashi; U-Boot-Users; Rigby John; Mahan Kurt Subject: Re: [U-Boot-Users] [PATCH] ColdFire: Get information from the correct GCC
In message 4791E710007FEB4BBF83775D787F462F0712C9C3@az33exm22.fsl.freescale.net you wrote:
Could you confirm it builds with Today's config.mk patch by Wolfgang? If it works (I think it will), I'm satisfied with that.
With original $(CC) in cpu/*/config.mk and Wolfgang's config.mk patch: Still generates the same error (see below)
Can you please test with the original code from the repository, i. e. with version v1.3.3-rc3 without local changes?
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@denx.de Brain off-line, please wait.

Wolfgang,
Please ignore the previous email stated the new patch did not work. Apparently, it must have been a mistake that I made after applied your patch. Now, your patch work, still waiting for Kurt to confirm it.
Does this patch make into u-boot 1.3.3-rc3?
Thanks.
Regards, TsiChung

In message 4791E710007FEB4BBF83775D787F462F02F64F@az33exm22.fsl.freescale.net you wrote:
I am using Fedora 8. Also, the problem can be generated if using Fedora = 4 and 5 except 3. If you have a Fedora 4 and above, please try it. I bet = you will run into the same problem as Kurt and I did.
Please try if v1.3.3-rc3 works for you. This has what I consider the proper patch included.
Best regards,
Wolfgang Denk

In message 48193C37.6030106@ruby.dti.ne.jp you wrote:
PLATFORM_RELFLAGS += -ffixed-d7 -msep-data -ifeq ($(findstring 4.2,$(shell $(CC) --version)),4.2) +ifeq ($(findstring 4.2,$(shell $(CROSS_COMPILE)gcc --version)),4.2) PLATFORM_CPPFLAGS += -mcpu=5208 -fPIC else PLATFORM_CPPFLAGS += -m5307 -fPIC
Let me make sure the intention of this change. With or without this change, we can always evaluate $(CROSS_COMPILE)gcc --version, right? Or am I missing something?
There are several $(CC)/$(AR)/$(AS)/$(CPP) users in cpu/*/Makefile & cpu/*/config.mk. I'm wondering whether we need to fix all these usages or not.
The thing is, that all the $(CC)/$(AR)/$(AS)/$(CPP) definitions are fine as when used during the build process; but we have a bug when using them in the initial steps while generating the "make" parameters and variable settings - the bug is in config.mk which includes cpu/*/config.mk *before* $(CC)/$(AR)/$(AS)/$(CPP) get set.
I will post a patch for this; it replaces this commit:
commit b7166e05a513c0806b63b9dfb6f1d77645cede2a Author: TsiChung Liew Tsi-Chung.Liew@freescale.com Date: Wed Apr 30 12:10:23 2008 -0500
ColdFire: Get information from the correct GCC
which I'm going to revert when the patch gets applied.
These changes have already been applied to the u-boot-testing repository, see http://git.denx.de/?p=u-boot/u-boot-testing.git;a=summary
Best regards,
Wolfgang Denk
participants (5)
-
Kurt Mahan
-
Liew Tsi Chung
-
Shinya Kuribayashi
-
Tsi-Chung Liew
-
Wolfgang Denk