[U-Boot-Users] Re: Wrong compiler called for as flags

Vincent Ng vincent.ng at okulus.com
Thu Jul 8 20:57:03 CEST 2004


Robert Schwebel <robert <at> schwebel.de> writes:

> 
> Hi, 
> 
> while trying to make u-boot gcc-3.4 compilable I just found a strange
> effect. The attached patch tries to fix the issues that came up on the
> list during the last days. 
> 
> As gcc-2.95.3 is not able to generate code with -march=armv5
> -mtune=xscale, I tried to make the decision on compile time by finding
> out which compiler we have. This basically works, but for the
> compilation of cpu/pxa/start.S it looks like the host compiler is taken
> instead of the cross-gcc to determine the compiler flags. You can easily
> reproduce this by applying my patch and compiling with a 2.95.3 cross
> gcc, then grepping the output for 'armv5'. The incorrect results come
> from the fact that, in this case, CROSS_COMPILE is not set, so instead
> of arm-linux-gcc the host gcc is called to determine the test. 
> 
> My assumption is that the effect comes from the order the different
> Makefiles and config.mk files are included when being called from
> cpu/pxa. Unfortunately this is not easy to debug - maybe there is
> somebody with better Makefile debugging skills than me on the list ;) 
> 
> Robert


Greetings,

Has anyone encountered similar compile problem? 
I get the same 'wrong compiler' situation when compiling for 5282EVB with m68k-
elf-gcc 3.4.0, with the error:

<snip>
make[1]: Leaving directory `/home/vng/u-boot/post/cpu'
m68k-elf-gcc -Wa,-gstabs -D__ASSEMBLY__ -g  -Os   -ffixed-d7
-msep-data -D__KERNEL__ -DTEXT_BASE=0x20000 -I/home/vng/u-boot/include -fno-
builtin -ffreestanding -nostdinc -isystem /usr/lib/gcc-lib/i386-redhat-
linux/3.3.3/include -pipe  -DCONFIG_M68K -D__M68K__ -m5307 -c -o 
cpu/mcf52x2/start.o /home/vng/u-boot/cpu/mcf52x2/start.S
/home/vng/u-boot/cpu/mcf52x2/start.S: Assembler messages:
/home/vng/u-boot/cpu/mcf52x2/start.S:316: Fatal error: Tried to convert PC 
relative conditional branch to absolute jump
make: *** [cpu/mcf52x2/start.o] Error 1

with limited cross-compiling experience, I'm really stuck. Hopefully someone 
will be kind enough to give some pointers.

best regards,

Vince






More information about the U-Boot mailing list