1 # SPDX-License-Identifier: GPL-2.0+
3 # (C) Copyright 2000-2002
4 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
6 # Copyright (c) 2017 Microsemi Corporation.
7 # Padmarao Begari, Microsemi Corporation <padmarao.begari@microsemi.com>
9 # Copyright (C) 2017 Andes Technology Corporation
10 # Rick Chen, Andes Technology Corporation <rick@andestech.com>
13 32bit-emul := elf32lriscv
14 64bit-emul := elf64lriscv
17 PLATFORM_LDFLAGS += -m $(32bit-emul)
18 EFI_LDS := elf_riscv32_efi.lds
22 PLATFORM_LDFLAGS += -m $(64bit-emul)
23 EFI_LDS := elf_riscv64_efi.lds
26 CONFIG_STANDALONE_LOAD_ADDR = 0x00000000
27 LDFLAGS_STANDALONE += -T $(srctree)/examples/standalone/riscv.lds
29 PLATFORM_CPPFLAGS += -ffixed-gp -fpic
30 PLATFORM_RELFLAGS += -fno-common -gdwarf-2 -ffunction-sections
31 LDFLAGS_u-boot += --gc-sections -static -pie
33 EFI_CRT0 := crt0_riscv_efi.o
34 EFI_RELOC := reloc_riscv_efi.o