
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