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
|
|
|
|
PLATFORM_LDFLAGS += -m $(32bit-emul)
|
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
|
|
|
|
PLATFORM_LDFLAGS += -m $(64bit-emul)
|
2018-04-23 05:59:45 +00:00
|
|
|
EFI_LDS := elf_riscv64_efi.lds
|
2017-12-26 05:55:52 +00:00
|
|
|
endif
|
|
|
|
|
2018-09-23 17:15:15 +00:00
|
|
|
CONFIG_STANDALONE_LOAD_ADDR = 0x00000000
|
|
|
|
LDFLAGS_STANDALONE += -T $(srctree)/examples/standalone/riscv.lds
|
2017-12-26 05:55:52 +00:00
|
|
|
|
|
|
|
PLATFORM_CPPFLAGS += -ffixed-gp -fpic
|
2018-11-22 10:26:16 +00:00
|
|
|
PLATFORM_RELFLAGS += -fno-common -gdwarf-2 -ffunction-sections \
|
|
|
|
-fdata-sections
|
2018-09-26 13:55:13 +00:00
|
|
|
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
|