blob: 55d7c6550e98bab450c706ade18feeb4343b40d4 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001# SPDX-License-Identifier: GPL-2.0+
Rick Chen64d4ead2017-12-26 13:55:52 +08002#
3# Copyright (C) 2017 Andes Technology Corporation.
4# Rick Chen, Andes Technology Corporation <rick@andestech.com>
Rick Chen64d4ead2017-12-26 13:55:52 +08005
Lukas Auer17d3e902018-11-22 11:26:15 +01006ifeq ($(CONFIG_ARCH_RV64I),y)
7 ARCH_BASE = rv64im
8 ABI = lp64
9endif
10ifeq ($(CONFIG_ARCH_RV32I),y)
11 ARCH_BASE = rv32im
12 ABI = ilp32
13endif
14ifeq ($(CONFIG_RISCV_ISA_A),y)
15 ARCH_A = a
16endif
17ifeq ($(CONFIG_RISCV_ISA_C),y)
18 ARCH_C = c
19endif
20
21ARCH_FLAGS = -march=$(ARCH_BASE)$(ARCH_A)$(ARCH_C) -mabi=$(ABI)
22
23PLATFORM_CPPFLAGS += $(ARCH_FLAGS)
24CFLAGS_EFI += $(ARCH_FLAGS)
25
Bin Mengbcb38432018-09-26 06:55:17 -070026head-y := arch/riscv/cpu/start.o
Rick Chen64d4ead2017-12-26 13:55:52 +080027
Bin Meng055700e2018-09-26 06:55:14 -070028libs-y += arch/riscv/cpu/
Rick Chen64d4ead2017-12-26 13:55:52 +080029libs-y += arch/riscv/cpu/$(CPU)/
30libs-y += arch/riscv/lib/