From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Wed, 19 Oct 2011 13:36:15 +0200 Subject: [U-Boot] MAKEALL In-Reply-To: <201110181821.18776.vapier@gentoo.org> References: <20111018062310.61320140797D@gemini.denx.de> <201110181655.29507.vapier@gentoo.org> <201110181821.18776.vapier@gentoo.org> Message-ID: <4E9EB62F.90109@aribaud.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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.