diff options
author | Daniel Schwierzeck <daniel.schwierzeck@gmail.com> | 2012-08-21 23:27:37 +0200 |
---|---|---|
committer | Daniel Schwierzeck <daniel.schwierzeck@gmail.com> | 2012-08-24 00:34:43 +0200 |
commit | 2c0e3de384f6a3323a1ffbf5db390b3081c3e102 (patch) | |
tree | 00ab584b5fd0d49c3f22bccdaa184e5119237efe /arch/mips/config.mk | |
parent | d2aa5dca74fcf8cbe7fa1f27606a5663bb52d3e6 (diff) | |
download | u-boot-imx-2c0e3de384f6a3323a1ffbf5db390b3081c3e102.zip u-boot-imx-2c0e3de384f6a3323a1ffbf5db390b3081c3e102.tar.gz u-boot-imx-2c0e3de384f6a3323a1ffbf5db390b3081c3e102.tar.bz2 |
MIPS: factor out endianess flag handling to arch config.mk
This is CPU independent and should be configured architecture-wide.
Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Diffstat (limited to 'arch/mips/config.mk')
-rw-r--r-- | arch/mips/config.mk | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/arch/mips/config.mk b/arch/mips/config.mk index 6ab8acd..b680256 100644 --- a/arch/mips/config.mk +++ b/arch/mips/config.mk @@ -23,6 +23,22 @@ CROSS_COMPILE ?= mips_4KC- +# Handle special prefix in ELDK 4.0 toolchain +ifneq (,$(findstring 4KCle,$(CROSS_COMPILE))) +ENDIANNESS := -EL +endif + +ifdef CONFIG_SYS_LITTLE_ENDIAN +ENDIANNESS := -EL +endif + +ifdef CONFIG_SYS_BIG_ENDIAN +ENDIANNESS := -EB +endif + +# Default to EB if no endianess is configured +ENDIANNESS ?= -EB + CONFIG_STANDALONE_LOAD_ADDR ?= 0x80200000 -T mips.lds PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__ @@ -47,8 +63,8 @@ PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__ # On the other hand, we want PIC in the U-Boot code to relocate it from ROM # to RAM. $28 is always used as gp. # -PLATFORM_CPPFLAGS += -G 0 -mabicalls -fpic +PLATFORM_CPPFLAGS += -G 0 -mabicalls -fpic $(ENDIANNESS) PLATFORM_CPPFLAGS += -msoft-float -PLATFORM_LDFLAGS += -G 0 -static -n -nostdlib +PLATFORM_LDFLAGS += -G 0 -static -n -nostdlib $(ENDIANNESS) PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections LDFLAGS_FINAL += --gc-sections |