diff mbox series

[uclibc-ng-devel,1/5] kvx: add support for kv3-2 (Coolidge v2 SoC)

Message ID 20230914145524.19784-1-yann@sionneau.net
State Accepted
Headers show
Series [uclibc-ng-devel,1/5] kvx: add support for kv3-2 (Coolidge v2 SoC) | expand

Commit Message

Yann Sionneau Sept. 14, 2023, 2:55 p.m. UTC
From: Yann Sionneau <ysionneau@kalray.eu>

The only difference, with regard to libc, is the compile flag: -march= 

Signed-off-by: Yann Sionneau <ysionneau@kalray.eu>
---
 Rules.mak                |  3 ++-
 extra/Configs/Config.kvx | 18 ++++++++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

Comments

Waldemar Brodkorb Sept. 16, 2023, 12:10 p.m. UTC | #1
Hi Yann,
yann@sionneau.net wrote,

> From: Yann Sionneau <ysionneau@kalray.eu>
> 
> The only difference, with regard to libc, is the compile flag: -march= 
> 
> Signed-off-by: Yann Sionneau <ysionneau@kalray.eu>

Series applied and pushed,
 best regards
  Waldemar
diff mbox series

Patch

diff --git a/Rules.mak b/Rules.mak
index 8984edb38..c3313b257 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -459,7 +459,8 @@  ifeq ($(TARGET_ARCH),csky)
 endif
 
 ifeq ($(TARGET_ARCH),kvx)
-	CPU_CFLAGS-$(CONFIG_KVX) += -march=kvx
+	CPU_CFLAGS-y += -march=$(call qstrip,$(TARGET_MARCH))
+	CPU_LDFLAGS-y += -march=$(call qstrip,$(TARGET_MARCH))
 endif
 
 ifeq ($(TARGET_ARCH),m68k)
diff --git a/extra/Configs/Config.kvx b/extra/Configs/Config.kvx
index 398ffceaa..04df53c38 100644
--- a/extra/Configs/Config.kvx
+++ b/extra/Configs/Config.kvx
@@ -7,6 +7,24 @@  config TARGET_ARCH
 	string
 	default "kvx"
 
+choice
+	prompt "Target architecture variant"
+	help
+		Select CPU variant to use
+
+config CONFIG_KVX_COOLIDGE_V1
+        bool "Coolidge V1"
+
+config CONFIG_KVX_COOLIDGE_V2
+        bool "Coolidge V2"
+
+endchoice
+
+config TARGET_MARCH
+	string
+	default "kv3-1" if CONFIG_KVX_COOLIDGE_V1
+	default "kv3-2" if CONFIG_KVX_COOLIDGE_V2
+
 config FORCE_OPTIONS_FOR_ARCH
 	bool
 	default y