xref: /OK3568_Linux_fs/buildroot/arch/arch.mk.riscv (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1#
2# Configure the GCC_TARGET_ARCH variable and append the
3# appropriate RISC-V ISA extensions.
4#
5
6ifeq ($(BR2_riscv),y)
7
8ifeq ($(BR2_RISCV_64),y)
9GCC_TARGET_ARCH := rv64i
10else
11GCC_TARGET_ARCH := rv32i
12endif
13
14ifeq ($(BR2_RISCV_ISA_RVM),y)
15GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)m
16endif
17ifeq ($(BR2_RISCV_ISA_RVA),y)
18GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)a
19endif
20ifeq ($(BR2_RISCV_ISA_RVF),y)
21GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)f
22endif
23ifeq ($(BR2_RISCV_ISA_RVD),y)
24GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)d
25endif
26ifeq ($(BR2_RISCV_ISA_RVC),y)
27GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)c
28endif
29
30endif
31