diff options
author | Greentime Hu <greentime@andestech.com> | 2018-04-19 04:26:43 -0400 |
---|---|---|
committer | Greentime Hu <greentime@andestech.com> | 2018-05-23 01:26:21 -0400 |
commit | b3b112bb06eb26ce44af63d599aaf5fe54de0699 (patch) | |
tree | ad04b3afd036c4b91fd72e4403e71cf66590978e | |
parent | c8c20f9c162da25ea0893d5c5ded3a89382a2b5e (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.cpu | 5 | ||||
-rw-r--r-- | arch/nds32/Makefile | 4 |
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 @@ | |||
1 | comment "Processor Features" | 1 | comment "Processor Features" |
2 | 2 | ||
3 | config CPU_BIG_ENDIAN | 3 | config CPU_BIG_ENDIAN |
4 | bool "Big endian" | 4 | def_bool !CPU_LITTLE_ENDIAN |
5 | 5 | ||
6 | config CPU_LITTLE_ENDIAN | 6 | config CPU_LITTLE_ENDIAN |
7 | def_bool !CPU_BIG_ENDIAN | 7 | bool "Little endian" |
8 | default y | ||
8 | 9 | ||
9 | config HWZOL | 10 | config 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 | ||
33 | ifdef CONFIG_CPU_LITTLE_ENDIAN | 33 | ifdef CONFIG_CPU_LITTLE_ENDIAN |
34 | KBUILD_CFLAGS += $(call cc-option, -EL) | 34 | KBUILD_CFLAGS += $(call cc-option, -EL) |
35 | KBUILD_AFLAGS += $(call cc-option, -EL) | ||
36 | LDFLAGS += $(call cc-option, -EL) | ||
35 | else | 37 | else |
36 | KBUILD_CFLAGS += $(call cc-option, -EB) | 38 | KBUILD_CFLAGS += $(call cc-option, -EB) |
39 | KBUILD_AFLAGS += $(call cc-option, -EB) | ||
40 | LDFLAGS += $(call cc-option, -EB) | ||
37 | endif | 41 | endif |
38 | 42 | ||
39 | boot := arch/nds32/boot | 43 | boot := arch/nds32/boot |