[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <186daa632c13751fc68bc31c52d3230846966a6a.1524229040.git.greentime@andestech.com>
Date: Fri, 20 Apr 2018 21:31:15 +0800
From: Greentime Hu <green.hu@...il.com>
To: linux-kernel@...r.kernel.org, arnd@...db.de,
greentime@...estech.com, green.hu@...il.com, private@...ck-us.net,
hch@...radead.org, vincentc@...estech.com, nickhu@...estech.com
Subject: [PATCH v2 9/9] 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 fix the endian mismatch issue because
AFLAGS and LDFLAGS is not passed correctly.
Signed-off-by: Vincent Ren-Wei Chen <vincentc@...estech.com>
Signed-off-by: Greentime Hu <greentime@...estech.com>
---
arch/nds32/Kconfig.cpu | 5 +++--
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 @@
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"
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
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
--
1.9.5
Powered by blists - more mailing lists