2018-05-07 05:58:06 +08:00
|
|
|
# SPDX-License-Identifier: GPL-2.0+
|
2017-12-26 13:55:52 +08: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
|
2020-03-27 23:46:27 +08:00
|
|
|
KBUILD_LDFLAGS += -m $(32bit-emul)
|
2018-04-23 13:59:45 +08:00
|
|
|
EFI_LDS := elf_riscv32_efi.lds
|
2017-12-26 13:55:52 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_64BIT
|
2020-03-27 23:46:27 +08:00
|
|
|
KBUILD_LDFLAGS += -m $(64bit-emul)
|
2018-04-23 13:59:45 +08:00
|
|
|
EFI_LDS := elf_riscv64_efi.lds
|
2017-12-26 13:55:52 +08:00
|
|
|
endif
|
|
|
|
|
2019-01-04 08:37:34 +08:00
|
|
|
CONFIG_STANDALONE_LOAD_ADDR ?= 0x00000000
|
2017-12-26 13:55:52 +08:00
|
|
|
|
|
|
|
PLATFORM_CPPFLAGS += -ffixed-gp -fpic
|
2018-11-22 18:26:16 +08:00
|
|
|
PLATFORM_RELFLAGS += -fno-common -gdwarf-2 -ffunction-sections \
|
|
|
|
-fdata-sections
|
2018-09-26 21:55:13 +08:00
|
|
|
LDFLAGS_u-boot += --gc-sections -static -pie
|
2018-04-23 13:59:45 +08:00
|
|
|
|
|
|
|
EFI_CRT0 := crt0_riscv_efi.o
|
|
|
|
EFI_RELOC := reloc_riscv_efi.o
|