[U-Boot-Users] PATCH - Coldfire gcc3.4 compiling fix

Jate Sujjavanich jsujjavanich at syntech-fuelmaster.com
Tue Dec 6 18:08:21 CET 2005


I have been searching the archives for the solution to this problem when
compiling u-boot for the M5282EVB with GCC 3.4.0:

/home/jate/tim-firmware/u-boot/cpu/mcf52x2/start.S:345: Fatal error:
Tried to convert PC relative conditional branch to absolute jump

Turning on the -S option fixes this. This led to this error:

flash.c: In function `flash_print_info':
flash.c:69: error: label at end of compound statement

This is also fixed below. I do not have an M5282EVB board, so I cannot
test the binaries generated. Can anyone help test?

- Jate S.

Index: config.mk
===================================================================
RCS file: /cvsroot/u-boot/u-boot/config.mk,v
retrieving revision 1.14
diff -u -r1.14 config.mk
--- config.mk	4 Oct 2005 21:11:34 -0000	1.14
+++ config.mk	6 Dec 2005 16:57:10 -0000
@@ -139,7 +139,14 @@
 endif
 endif
 
+# turn jbsr into jsr for m68k
+ifeq ($(ARCH),m68k)
+ifeq ($(findstring 3.4,$(shell $(CC) --version)),3.4)
+AFLAGS_DEBUG := -Wa,-gstabs,-S
+endif
+else
 AFLAGS_DEBUG := -Wa,-gstabs
+endif
 AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS)
 
 LDFLAGS += -Bstatic -T $(LDSCRIPT) -Ttext $(TEXT_BASE)
$(PLATFORM_LDFLAGS)

Index: flash.c
===================================================================
RCS file: /cvsroot/u-boot/u-boot/board/m5282evb/flash.c,v
retrieving revision 1.1
diff -u -r1.1 flash.c
--- flash.c 8 Dec 2003 01:34:37 -0000 1.1
+++ flash.c 6 Dec 2005 16:30:08 -0000
@@ -65,6 +65,7 @@
  printf ("\n");
 
       Done:
+       ; /* for gcc3.4.0 compiling */
 }




More information about the U-Boot mailing list