1From b3a1e97498e7987073775d49a703932c20f2df1d Mon Sep 17 00:00:00 2001 2From: Ezequiel Garcia <ezequiel@collabora.com> 3Date: Mon, 12 Nov 2018 14:04:46 -0300 4Subject: [PATCH] mips: Remove default endiannes 5 6Currently, trying to build ci20_mmc fails on little-endian 7toolchains. The problem seems to be that some targets don't 8have CONFIG_SYS_LITTLE_ENDIAN properly set, and therefore 9the default -EB switch is selected. 10 11Let's get rid of the default switch entirely, and fix this problem. 12While this may be a hack, it is a quick solution until 13U-Boot gets CI20 proper support. 14 15make ARCH=mips CROSS_COMPILE=mips-linux-gnu- ci20_mmc 16Configuring for ci20_mmc - Board: ci20, Options: SPL_MMC_SUPPORT,ENV_IS_IN_MMC 17make 18make[1]: Entering directory '/home/zeta/repos/u-boot-ci20' 19Generating include/autoconf.mk 20Generating include/autoconf.mk.dep 21mips-linux-gnu-gcc: error: may not use both -EB and -EL 22mips-linux-gnu-gcc: error: may not use both -EB and -EL 23Generating include/spl-autoconf.mk 24mips-linux-gnu-gcc: error: may not use both -EB and -EL 25Generating include/tpl-autoconf.mk 26mips-linux-gnu-gcc: error: may not use both -EB and -EL 27mips-linux-gnu-gcc -DDO_DEPS_ONLY \ 28 -g -Os -ffunction-sections -fdata-sections -D__KERNEL__ -I/home/zeta/repos/u-boot-ci20/include -fno-builtin -ffreestanding -nostdinc -isystem /home/zeta/repos/buildroot/mips/output/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/5.3.0/include -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -EB -msoft-float -fpic -mabicalls -march=mips32 -mabi=32 -DCONFIG_32BIT -mno-branch-likely -Wall -Wstrict-prototypes \ 29 -o lib/asm-offsets.s lib/asm-offsets.c -c -S 30if [ -f arch/mips/cpu/xburst/jz4780/asm-offsets.c ];then \ 31 mips-linux-gnu-gcc -DDO_DEPS_ONLY \ 32 -g -Os -ffunction-sections -fdata-sections -D__KERNEL__ -I/home/zeta/repos/u-boot-ci20/include -fno-builtin -ffreestanding -nostdinc -isystem /home/zeta/repos/buildroot/mips/output/host/opt/ext-toolchain/bin/../lib/gcc/mips-linux-gnu/5.3.0/include -pipe -DCONFIG_MIPS -D__MIPS__ -G 0 -EB -msoft-float -fpic -mabicalls -march=mips32 -mabi=32 -DCONFIG_32BIT -mno-branch-likely -Wall -Wstrict-prototypes \ 33 -o arch/mips/cpu/xburst/jz4780/asm-offsets.s arch/mips/cpu/xburst/jz4780/asm-offsets.c -c -S; \ 34else \ 35 touch arch/mips/cpu/xburst/jz4780/asm-offsets.s; \ 36fi 37mips-linux-gnu-gcc: error: may not use both -EB and -EL 38make[1]: *** [Makefile:747: lib/asm-offsets.s] Error 1 39make[1]: *** Waiting for unfinished jobs.... 40make[1]: Leaving directory '/home/zeta/repos/u-boot-ci20' 41make: *** [.boards.depend:463: ci20_mmc] Error 2 42 43Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> 44--- 45https://github.com/MIPS/CI20_u-boot/pull/19 46 47 arch/mips/config.mk | 3 --- 48 1 file changed, 3 deletions(-) 49 50diff --git a/arch/mips/config.mk b/arch/mips/config.mk 51index c89279025507..43560abbc0e1 100644 52--- a/arch/mips/config.mk 53+++ b/arch/mips/config.mk 54@@ -20,9 +20,6 @@ ifdef CONFIG_SYS_BIG_ENDIAN 55 ENDIANNESS := -EB 56 endif 57 58-# Default to EB if no endianess is configured 59-ENDIANNESS ?= -EB 60- 61 PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__ 62 63 # 64-- 652.19.1 66 67