linuxOS_D21X/package/arch/arch.mk.riscv

55 lines
1011 B
Plaintext
Raw Normal View History

2024-11-29 08:13:19 +00:00
#
# Configure the GCC_TARGET_ARCH variable and append the
# appropriate RISC-V ISA extensions.
#
ifeq ($(BR2_riscv),y)
ifeq ($(BR2_RISCV_64),y)
GCC_TARGET_ARCH := rv64i
else
GCC_TARGET_ARCH := rv32i
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_RVM),y)
ifeq ($(BR2_RISCV_ISA_RVA),y)
ifeq ($(BR2_RISCV_ISA_RVF),y)
ifeq ($(BR2_RISCV_ISA_RVD),y)
ifeq ($(BR2_RISCV_64),y)
GCC_TARGET_ARCH := rv64g
endif
ifeq ($(BR2_RISCV_32),y)
GCC_TARGET_ARCH := rv32g
endif
endif
endif
endif
endif
ifeq ($(BR2_RISCV_ISA_RVC),y)
GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)c
endif
2024-11-29 08:23:11 +00:00
ifeq ($(BR2_RISCV_ISA_RVV),y)
GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)v
endif
2024-11-29 08:13:19 +00:00
ifeq ($(BR2_RISCV_ISA_RVXTHEAD),y)
2024-11-29 08:33:21 +00:00
GCC_TARGET_ARCH := $(GCC_TARGET_ARCH)xtheadc
2024-11-29 08:13:19 +00:00
endif
endif