[U-Boot] MAKEALL

Albert ARIBAUD
2011-10-19T11:36:15Z

Le 19/10/2011 00:21, Mike Frysinger a ?crit :
> On Tuesday 18 October 2011 17:30:30 Simon Glass wrote:
>> arm-none-linux-gnueabi-ld: stubs.o: compiled for a big endian system
>> and target is little endian
>> arm-none-linux-gnueabi-ld: failed to merge target specific data of file
>> stubs.o
>>
>> I guess this is the endian error is the one you talk about here which
>> I suppose can be fixed with a -m flag. How should this be added in?
>> Should the ARM arch have a -mlittle-endian default?
>
> i fear that would break some boards where the maintainer has always used a big
> endian toolchain. i don't think there are any CONFIG_xxx knobs for boards to
> say "i am big endian" or "i am little endian".
> -mike

Actually the issue is not with the compiler -- it does build big-endian
(example taken with scpu):

arm-linux-gcc -g -Os -fno-common -ffixed-r8 -msoft-float
-mbig-endian -ffunction-sections -D__KERNEL__
-DCONFIG_SYS_TEXT_BASE=0x50000000 -I/home/uboot/src/u-boot-arm/include
-fno-builtin -ffreestanding -nostdinc -isystem
/home/uboot/eldk42/usr/bin/../lib/gcc/arm-linux-gnueabi/4.2.2/include
-pipe -DCONFIG_ARM -D__ARM__ -marm -mabi=aapcs-linux
-mno-thumb-interwork -mbig-endian -march=armv5te -mtune=strongarm1100
-Wall -Wstrict-prototypes -fno-stack-protector -Wno-format-nonliteral
-Wno-format-security -fno-toplevel-reorder -o stubs.o stubs.c -c
arm-linux-ld -r -o libstubs.o stubs.o

Notice the -mbig-endian compiler switch.

The issue is with the linker:

arm-linux-ld -r -o libstubs.o stubs.o

This fails because the linker does not specify -EB and thus links in
little, not big, endian.

Note that further issues may prevent a big-endian build such as the
absence of big-endian run-time libs.

Amicalement,
--
Albert.