2018-05-06 21:58:06 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
2017-12-26 05:55:52 +00:00
|
|
|
#
|
|
|
|
# (C) Copyright 2000-2002
|
|
|
|
# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
|
|
|
|
#
|
|
|
|
# Copyright (c) 2017 Microsemi Corporation.
|
|
|
|
# Padmarao Begari, Microsemi Corporation <padmarao.begari@microsemi.com>
|
|
|
|
#
|
|
|
|
# Copyright (C) 2017 Andes Technology Corporation
|
|
|
|
# Rick Chen, Andes Technology Corporation <rick@andestech.com>
|
|
|
|
#
|
|
|
|
|
|
|
|
32bit-emul := elf32lriscv
|
|
|
|
64bit-emul := elf64lriscv
|
|
|
|
|
|
|
|
ifdef CONFIG_32BIT
|
2018-09-26 13:55:13 +00:00
|
|
|
PLATFORM_CPPFLAGS += -march=rv32ima -mabi=ilp32
|
2017-12-26 05:55:52 +00:00
|
|
|
PLATFORM_LDFLAGS += -m $(32bit-emul)
|
2018-09-26 13:55:13 +00:00
|
|
|
CFLAGS_EFI += -march=rv32ima -mabi=ilp32
|
2018-04-23 05:59:45 +00:00
|
|
|
EFI_LDS := elf_riscv32_efi.lds
|
2017-12-26 05:55:52 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_64BIT
|
2018-09-26 13:55:13 +00:00
|
|
|
PLATFORM_CPPFLAGS += -march=rv64ima -mabi=lp64
|
2017-12-26 05:55:52 +00:00
|
|
|
PLATFORM_LDFLAGS += -m $(64bit-emul)
|
2018-09-26 13:55:13 +00:00
|
|
|
CFLAGS_EFI += -march=rv64ima -mabi=lp64
|
2018-04-23 05:59:45 +00:00
|
|
|
EFI_LDS := elf_riscv64_efi.lds
|
2017-12-26 05:55:52 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
CONFIG_STANDALONE_LOAD_ADDR = 0x00000000 \
|
|
|
|
-T $(srctree)/examples/standalone/riscv.lds
|
|
|
|
|
|
|
|
PLATFORM_CPPFLAGS += -ffixed-gp -fpic
|
2018-09-26 13:55:13 +00:00
|
|
|
PLATFORM_RELFLAGS += -fno-common -gdwarf-2 -ffunction-sections
|
|
|
|
LDFLAGS_u-boot += --gc-sections -static -pie
|
2018-04-23 05:59:45 +00:00
|
|
|
|
|
|
|
EFI_CRT0 := crt0_riscv_efi.o
|
|
|
|
EFI_RELOC := reloc_riscv_efi.o
|