]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/glsdk-u-boot.git/commitdiff
MIPS: factor out endianess flag handling to arch config.mk
authorDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Tue, 21 Aug 2012 21:27:37 +0000 (23:27 +0200)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Thu, 23 Aug 2012 22:34:43 +0000 (00:34 +0200)
This is CPU independent and should be configured architecture-wide.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
arch/mips/config.mk
arch/mips/cpu/mips32/config.mk
arch/mips/cpu/xburst/config.mk
include/configs/qi_lb60.h

index 6ab8acdb17b4cef1affce9760f6329b0c83b6cd5..b68025616425feca787ee71a8465966ae0aeb8c3 100644 (file)
 
 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
index a1cd590a00414c5f368af190103882440fbdd971..a0e4de500ebd4e53945f76457e45032f1c1395c0 100644 (file)
 #
 MIPSFLAGS := -march=mips32r2
 
-# 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
-
-PLATFORM_CPPFLAGS += $(MIPSFLAGS) $(ENDIANNESS)
-PLATFORM_LDFLAGS += $(ENDIANNESS)
+PLATFORM_CPPFLAGS += $(MIPSFLAGS)
index bce0c1bcb62816fd4f25448280e53c89ae8037a3..18d49ab9d2a9e4b774a960746cd3e83c8ffd86c1 100644 (file)
@@ -20,5 +20,4 @@
 # MA 02111-1307 USA
 #
 
-PLATFORM_CPPFLAGS += -march=mips32 -EL
-PLATFORM_LDFLAGS += -EL
+PLATFORM_CPPFLAGS += -march=mips32
index a3fc465e70953d854742722db952d7ffad11227d..4bb5bbc6979fe22fc9c91fd289db21e8fcb000e7 100644 (file)
@@ -11,6 +11,7 @@
 #define __CONFIG_QI_LB60_H
 
 #define CONFIG_MIPS32          /* MIPS32 CPU core */
+#define CONFIG_SYS_LITTLE_ENDIAN
 #define CONFIG_JZSOC           /* Jz SoC */
 #define CONFIG_JZ4740          /* Jz4740 SoC */
 #define CONFIG_NAND_JZ4740