Skip to contentSkip to conversation

ColdFire: Get information from the correct GCC

PATCH New Tsi-Chung Liew 4 participants 21 messages Apr 30, 2008 – May 6, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ColdFire: Get information from the correct GCC

From: TsiChung Liew <[email protected]>

---
 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(-)
cpu/mcf5227x/config.mk +1 -1
index 8d60fd6..2e50696 100644
@@ -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
cpu/mcf523x/config.mk +1 -1
index 93645a3..73fb08d 100644
@@ -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
cpu/mcf52x2/config.mk +1 -1
index 650e340..be360f8 100644
@@ -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
cpu/mcf532x/config.mk +1 -1
index 16a0bc3..e4a3cf9 100644
@@ -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
cpu/mcf5445x/config.mk +1 -1
index 88433f2..a85d0f9 100644
@@ -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
cpu/mcf547x_8x/config.mk +1 -1
index e5f4385..eb6b50b 100644
@@ -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
Signature · 1 line
1.5.4.1
#1 lore raw

PATCH 1/1 ColdFire: Get information from the correct GCC

Quoted 4 lines · In message <[email protected]> you…

From: TsiChung Liew <[email protected]>

Quoted 8 lines
---
 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

Signature · 5 lines
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
Wenn das dann in die Hose geht, nehme ich es auf meine Kappe.
                                         -- Rudi V?ller, 15. Nov 2003
#2 lore raw

PATCH 1/1 ColdFire: Get information from the correct GCC

In reply to Tsi-Chung Liew
Quoted 12 lines · Tsi-Chung Liew
 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(-)
cpu/mcf5227x/config.mk +0 -0
index 8d60fd6..2e50696 100644

cpu/mcf5227x/config.mk line 30

Quoted 8 lines
cpu/mcf5227x/config.mk +1 -1
@@ -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

#3 lore raw

PATCH 1/1 ColdFire: Get information from the correct GCC

Shinya

Quoted 7 lines

Review

Quoted 5 lines

PLATFORM_RELFLAGS += -ffixed-d7 -msep-data -ifeq ($(findstring
4.2,$(shell $(CC) --version)),4.2)

(quoted diff) +1 -1
+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,

Quoted 2 lines

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.

Quoted 2 lines

There are several $(CC)/$(AR)/$(AS)/$(CPP) users in cpu/*/Makefile &

cpu/*/config.mk.

Quoted 1 line

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

#4 lore raw

PATCH 1/1 ColdFire: Get information from the correct GCC

Quoted 6 lines · In message <4791E710007FEB4BBF83775D787F462F070D3E90@az33exm22.fsl.freescale.ne…
Quoted 4 lines

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.

Quoted 4 lines

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)

Quoted 11 lines

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.

Quoted 1 line

There are several $(CC)/$(AR)/$(AS)/$(CPP) users in cpu/*/Makefile &

cpu/*/config.mk.

Quoted 1 line

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

Signature · 5 lines
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
Unsichtbar macht sich die Dummheit, indem sie immer  gr??ere  Ausma?e
annimmt.                             -- Bertold Brecht: Der Tui-Roman
#5 lore raw

PATCH 1/1 ColdFire: Get information from the correct GCC

Wolfgang,

Quoted 8 lines

Stop! We are not talking about "$(CC)gcc"!

The change was this:

(quoted diff) +1 -1
-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

Quoted 1 line

$(CC) is the CROSS compiler, so the version of gcc on the host system

should

Quoted 1 line

not play any role. The host compiler would be $(HOSTCC)

It does not involve any $(HOSTCC)

Quoted 1 line

Why should that be different?

It solves the linking error.

Regards,
TsiChung

#6 lore raw

PATCH 1/1 ColdFire: Get information from the correct GCC

Quoted 7 lines · In message <4791E710007FEB4BBF83775D787F462F070D41F0@az33exm22.fsl.freescale.ne…
Quoted 2 lines

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.

Quoted 6 lines

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?

Quoted 2 lines

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.

Quoted 2 lines

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

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

...

Quoted 14 lines

/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

Quoted 8 lines

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 \

------------------^^^^^^^^

Quoted 1 line

-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

Signature · 5 lines
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
#7 lore raw

PATCH 1/1 ColdFire: Get information from the correct GCC

In reply to Liew Tsi Chung
Quoted 3 lines · Liew Tsi Chung

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 at 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

#8 lore raw

PATCH 1/1 ColdFire: Get information from the correct GCC

Shinya,

Which linux distro are you using?

Regards,
TsiChung

________________________________

From: Shinya Kuribayashi [mailto:skuribay at ruby.dti.ne.jp]
Sent: Fri 5/2/2008 8:25 PM
To: Liew Tsi Chung
Cc: wd at denx.de; U-Boot-Users; Rigby John; Mahan Kurt
Subject: Re: [U-Boot-Users] [PATCH] ColdFire: Get information from the correct GCC

Quoted 3 lines · Liew Tsi Chung

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 at 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080503/86579e76/attachment.htm

#9 lore raw

PATCH 1/1 ColdFire: Get information from the correct GCC

Quoted 4 lines · Liew Tsi Chung

Shinya,

Which linux distro are you using?

[snip]

Quoted 4 lines

-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 at debian:~/devel/u-boot.git$

It's Debian lenny/testing. If any info required, please let me know.

Shinya

#10 lore raw

PATCH 1/1 ColdFire: Get information from the correct GCC

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 at ruby.dti.ne.jp]
Sent: Sat 5/3/2008 10:49 PM
To: Liew Tsi Chung
Cc: wd at denx.de; U-Boot-Users; Rigby John; Mahan Kurt
Subject: Re: [U-Boot-Users] [PATCH] ColdFire: Get information from the correct GCC

Quoted 4 lines · Liew Tsi Chung

Shinya,

Which linux distro are you using?

[snip]

Quoted 4 lines

-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 at debian:~/devel/u-boot.git$

It's Debian lenny/testing. If any info required, please let me know.

Shinya

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080504/be691cfd/attachment.htm

#11 lore raw

PATCH 1/1 ColdFire: Get information from the correct GCC

Quoted 3 lines · Liew Tsi Chung

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

#12 lore raw

PATCH 1/1 ColdFire: Get information from the correct GCC

Quoted 4 lines · Shinya Kuribayashi
Quoted 3 lines · Liew Tsi Chung

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

Quoted 4 lines

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

Quoted 8 lines

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

#13 lore raw

PATCH 1/1 ColdFire: Get information from the correct GCC

Quoted 5 lines · In message <[email protected]> you wrote:
Quoted 4 lines
Quoted 4 lines

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...

Quoted 2 lines
Quoted 2 lines

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

Signature · 5 lines
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
"A child is a person who can't understand why someone would give away
a perfectly good kitten."                               - Doug Larson
#14 lore raw

PATCH 1/1 ColdFire: Get information from the correct GCC

In reply to Kurt Mahan

Hi Kurt,

Quoted 7 lines · Kurt Mahan
Quoted 4 lines · Shinya Kuribayashi
Quoted 3 lines · Liew Tsi Chung

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

Quoted 8 lines
Quoted 4 lines

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 <[email protected]>
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/changelog

#15 lore raw

PATCH 1/1 ColdFire: Get information from the correct GCC

In reply to Shinya Kuribayashi

Wolfgang and Shinya,

Quoted 2 lines

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

#16 lore raw

PATCH 1/1 ColdFire: Get information from the correct GCC

Quoted 6 lines · In message <4791E710007FEB4BBF83775D787F462F0712C9C3@az33exm22.fsl.freescale.ne…
Quoted 3 lines

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

Signature · 4 lines
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
Brain off-line, please wait.
#17 lore raw

PATCH 1/1 ColdFire: Get information from the correct GCC

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 at 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

Quoted 6 lines · In message <4791E710007FEB4BBF83775D787F462F0712C9C3@az33exm22.fsl.freescale.ne…
Quoted 3 lines

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 at denx.de Brain off-line, please wait.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080505/80366be5/attachment.htm

#18 lore raw

PATCH 1/1 ColdFire: Get information from the correct GCC

In reply to Shinya Kuribayashi

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

#19 lore raw

PATCH 1/1 ColdFire: Get information from the correct GCC

In reply to Liew Tsi Chung
Quoted 4 lines · In message <4791E710007FEB4BBF83775D787F462F02F64F@az33exm22.fsl.freescale.net>…

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

Signature · 5 lines
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
...though his invention worked superbly -- his theory was a crock  of
sewage from beginning to end.         - Vernor Vinge, "The Peace War"
#20 lore raw

PATCH 1/1 ColdFire: Get information from the correct GCC

In reply to Shinya Kuribayashi
Quoted 12 lines · In message <[email protected]> you wrote:

cpu/mcf5227x/config.mk line 30

Quoted 7 lines

PLATFORM_RELFLAGS += -ffixed-d7 -msep-data

cpu/mcf5227x/config.mk +1 -1
-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?

Quoted 3 lines

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 <[email protected]>
	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

Signature · 5 lines
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
That was the thing about deserts. They had their  own  gravity.  They
sucked you into the centre.           - Terry Pratchett, _Small Gods_