diff options
Diffstat (limited to 'arch/arch.mk.riscv')
-rw-r--r-- | arch/arch.mk.riscv | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arch.mk.riscv b/arch/arch.mk.riscv new file mode 100644 index 0000000000..022d1a6809 --- /dev/null +++ b/arch/arch.mk.riscv @@ -0,0 +1,28 @@ +# +# Configure the GCC_TARGET_ARCH variable and append the +# appropriate RISC-V ISA extensions. +# + +ifeq ($(BR2_riscv),y) + +ifeq ($(BR2_ARCH_IS_64),y) +GCC_TARGET_ARCH := rv64i +endif + +ifeq ($(BR2_RISCV_ISA_RVM),y) +GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)m +endif +ifeq ($(BR2_RISCV_ISA_RVA),y) +GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)a +endif +ifeq ($(BR2_RISCV_ISA_RVF),y) +GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)f +endif +ifeq ($(BR2_RISCV_ISA_RVD),y) +GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)d +endif +ifeq ($(BR2_RISCV_ISA_RVC),y) +GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)c +endif + +endif |