0001-mips-Remove-default-endiannes.patch 3.0 KB

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