]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
nds32: Fix the allmodconfig build. To make sure CONFIG_CPU_LITTLE_ENDIAN is default y
authorGreentime Hu <greentime@andestech.com>
Thu, 19 Apr 2018 08:26:43 +0000 (16:26 +0800)
committerGreentime Hu <greentime@andestech.com>
Wed, 23 May 2018 05:26:21 +0000 (13:26 +0800)
This way we can build kernel with CONFIG_CPU_LITTLE_ENDIAN=y. Build allmodconfig
and allnoconfig are available too. It also fixes the endian mismatch issue
because AFLAGS and LDFLAGS is not passed correctly.

Signed-off-by: Vincent Ren-Wei Chen <vincentc@andestech.com>
Signed-off-by: Greentime Hu <greentime@andestech.com>
arch/nds32/Kconfig.cpu
arch/nds32/Makefile

index ba44cc539da9a03381fd383e95753dde8685ac7a..b8c8984d145616c48083d1d0b63ae45ae1a177b9 100644 (file)
@@ -1,10 +1,11 @@
 comment "Processor Features"
 
 config CPU_BIG_ENDIAN
-       bool "Big endian"
+       def_bool !CPU_LITTLE_ENDIAN
 
 config CPU_LITTLE_ENDIAN
-        def_bool !CPU_BIG_ENDIAN
+       bool "Little endian"
+       default y
 
 config HWZOL
        bool "hardware zero overhead loop support"
index 20edf34e70ce7fb4cab2823c63ed2e25317846f2..513bb2e9baf9fa84615a8d03ce9ec57fb7f55849 100644 (file)
@@ -32,8 +32,12 @@ endif
 
 ifdef CONFIG_CPU_LITTLE_ENDIAN
 KBUILD_CFLAGS   += $(call cc-option, -EL)
+KBUILD_AFLAGS   += $(call cc-option, -EL)
+LDFLAGS         += $(call cc-option, -EL)
 else
 KBUILD_CFLAGS   += $(call cc-option, -EB)
+KBUILD_AFLAGS   += $(call cc-option, -EB)
+LDFLAGS         += $(call cc-option, -EB)
 endif
 
 boot := arch/nds32/boot