Skip to content

Commit b3b112b

Browse files
author
Greentime Hu
committed
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>
1 parent c8c20f9 commit b3b112b

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎arch/nds32/Kconfig.cpu‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
comment "Processor Features"
22

33
config CPU_BIG_ENDIAN
4-
bool "Big endian"
4+
def_bool !CPU_LITTLE_ENDIAN
55

66
config CPU_LITTLE_ENDIAN
7-
def_bool !CPU_BIG_ENDIAN
7+
bool "Little endian"
8+
default y
89

910
config HWZOL
1011
bool "hardware zero overhead loop support"

‎arch/nds32/Makefile‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,12 @@ endif
3232

3333
ifdef CONFIG_CPU_LITTLE_ENDIAN
3434
KBUILD_CFLAGS += $(call cc-option, -EL)
35+
KBUILD_AFLAGS += $(call cc-option, -EL)
36+
LDFLAGS += $(call cc-option, -EL)
3537
else
3638
KBUILD_CFLAGS += $(call cc-option, -EB)
39+
KBUILD_AFLAGS += $(call cc-option, -EB)
40+
LDFLAGS += $(call cc-option, -EB)
3741
endif
3842

3943
boot := arch/nds32/boot

0 commit comments

Comments
 (0)