aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreentime Hu <greentime@andestech.com>2018-04-19 04:26:43 -0400
committerGreentime Hu <greentime@andestech.com>2018-05-23 01:26:21 -0400
commitb3b112bb06eb26ce44af63d599aaf5fe54de0699 (patch)
treead04b3afd036c4b91fd72e4403e71cf66590978e
parentc8c20f9c162da25ea0893d5c5ded3a89382a2b5e (diff)
nds32: Fix the allmodconfig build. To make sure CONFIG_CPU_LITTLE_ENDIAN is default y
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>
-rw-r--r--arch/nds32/Kconfig.cpu5
-rw-r--r--arch/nds32/Makefile4
2 files changed, 7 insertions, 2 deletions
diff --git a/arch/nds32/Kconfig.cpu b/arch/nds32/Kconfig.cpu
index ba44cc539da9..b8c8984d1456 100644
--- a/arch/nds32/Kconfig.cpu
+++ b/arch/nds32/Kconfig.cpu
@@ -1,10 +1,11 @@
1comment "Processor Features" 1comment "Processor Features"
2 2
3config CPU_BIG_ENDIAN 3config CPU_BIG_ENDIAN
4 bool "Big endian" 4 def_bool !CPU_LITTLE_ENDIAN
5 5
6config CPU_LITTLE_ENDIAN 6config CPU_LITTLE_ENDIAN
7 def_bool !CPU_BIG_ENDIAN 7 bool "Little endian"
8 default y
8 9
9config HWZOL 10config HWZOL
10 bool "hardware zero overhead loop support" 11 bool "hardware zero overhead loop support"
diff --git a/arch/nds32/Makefile b/arch/nds32/Makefile
index 20edf34e70ce..513bb2e9baf9 100644
--- a/arch/nds32/Makefile
+++ b/arch/nds32/Makefile
@@ -32,8 +32,12 @@ endif
32 32
33ifdef CONFIG_CPU_LITTLE_ENDIAN 33ifdef CONFIG_CPU_LITTLE_ENDIAN
34KBUILD_CFLAGS += $(call cc-option, -EL) 34KBUILD_CFLAGS += $(call cc-option, -EL)
35KBUILD_AFLAGS += $(call cc-option, -EL)
36LDFLAGS += $(call cc-option, -EL)
35else 37else
36KBUILD_CFLAGS += $(call cc-option, -EB) 38KBUILD_CFLAGS += $(call cc-option, -EB)
39KBUILD_AFLAGS += $(call cc-option, -EB)
40LDFLAGS += $(call cc-option, -EB)
37endif 41endif
38 42
39boot := arch/nds32/boot 43boot := arch/nds32/boot