Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0+ |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 2 | # |
| 3 | # Copyright (C) 2017 Andes Technology Corporation. |
| 4 | # Rick Chen, Andes Technology Corporation <rick@andestech.com> |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 5 | |
Lukas Auer | 17d3e90 | 2018-11-22 11:26:15 +0100 | [diff] [blame^] | 6 | ifeq ($(CONFIG_ARCH_RV64I),y) |
| 7 | ARCH_BASE = rv64im |
| 8 | ABI = lp64 |
| 9 | endif |
| 10 | ifeq ($(CONFIG_ARCH_RV32I),y) |
| 11 | ARCH_BASE = rv32im |
| 12 | ABI = ilp32 |
| 13 | endif |
| 14 | ifeq ($(CONFIG_RISCV_ISA_A),y) |
| 15 | ARCH_A = a |
| 16 | endif |
| 17 | ifeq ($(CONFIG_RISCV_ISA_C),y) |
| 18 | ARCH_C = c |
| 19 | endif |
| 20 | |
| 21 | ARCH_FLAGS = -march=$(ARCH_BASE)$(ARCH_A)$(ARCH_C) -mabi=$(ABI) |
| 22 | |
| 23 | PLATFORM_CPPFLAGS += $(ARCH_FLAGS) |
| 24 | CFLAGS_EFI += $(ARCH_FLAGS) |
| 25 | |
Bin Meng | bcb3843 | 2018-09-26 06:55:17 -0700 | [diff] [blame] | 26 | head-y := arch/riscv/cpu/start.o |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 27 | |
Bin Meng | 055700e | 2018-09-26 06:55:14 -0700 | [diff] [blame] | 28 | libs-y += arch/riscv/cpu/ |
Rick Chen | 64d4ead | 2017-12-26 13:55:52 +0800 | [diff] [blame] | 29 | libs-y += arch/riscv/cpu/$(CPU)/ |
| 30 | libs-y += arch/riscv/lib/ |