Skip to content

Commit

Permalink
nds32: Fix the allmodconfig build. To make sure CONFIG_CPU_LITTLE_END…
Browse files Browse the repository at this point in the history
…IAN 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 <[email protected]>
Signed-off-by: Greentime Hu <[email protected]>
  • Loading branch information
Greentime Hu committed May 23, 2018
1 parent c8c20f9 commit b3b112b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/nds32/Kconfig.cpu
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 4 additions & 0 deletions arch/nds32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b3b112b

Please sign in to comment.