From 79ac682a96afbba76c133a886d7d40c5bce718e4 Mon Sep 17 00:00:00 2001 From: Huaqi Fang <578567190@qq.com> Date: Tue, 15 Oct 2024 12:04:35 +0800 Subject: [PATCH] SoC: Add zicsr extension when compiled with nuclei_llvm in npk.yml Signed-off-by: Huaqi Fang <578567190@qq.com> --- SoC/evalsoc/Common/npk.yml | 2 ++ SoC/gd32vf103/Common/npk.yml | 2 ++ SoC/gd32vw55x/Common/npk.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/SoC/evalsoc/Common/npk.yml b/SoC/evalsoc/Common/npk.yml index 535257a8..936a858d 100644 --- a/SoC/evalsoc/Common/npk.yml +++ b/SoC/evalsoc/Common/npk.yml @@ -493,6 +493,8 @@ buildconfig: common_flags: # flags need to be combined together across all packages # Enable experimental extensions for clang - flags: -menable-experimental-extensions + # Add zicsr extension for clang + - flags: -Xclang -target-feature -Xclang +zicsr - flags: -isystem =/include/libncrt condition: $( startswith(${stdclib}, "libncrt") ) ldflags: diff --git a/SoC/gd32vf103/Common/npk.yml b/SoC/gd32vf103/Common/npk.yml index a4f643d0..9c2d24e9 100644 --- a/SoC/gd32vf103/Common/npk.yml +++ b/SoC/gd32vf103/Common/npk.yml @@ -278,6 +278,8 @@ buildconfig: toolchain_name: RISC-V Clang/Newlib cross_prefix: riscv64-unknown-elf- # optional common_flags: # flags need to be combined together across all packages + # Add zicsr extension for clang + - flags: -Xclang -target-feature -Xclang +zicsr - flags: -isystem =/include/libncrt condition: $( startswith(${stdclib}, "libncrt") ) ldflags: diff --git a/SoC/gd32vw55x/Common/npk.yml b/SoC/gd32vw55x/Common/npk.yml index 42a48ed0..41f5fa8d 100644 --- a/SoC/gd32vw55x/Common/npk.yml +++ b/SoC/gd32vw55x/Common/npk.yml @@ -246,6 +246,8 @@ buildconfig: toolchain_name: RISC-V Clang/Newlib cross_prefix: riscv64-unknown-elf- # optional common_flags: # flags need to be combined together across all packages + # Add zicsr extension for clang + - flags: -Xclang -target-feature -Xclang +zicsr - flags: -isystem =/include/libncrt condition: $( startswith(${stdclib}, "libncrt") ) ldflags: