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
|
2020-03-27 15:46:27 +00:00
|
|
|
KBUILD_LDFLAGS += -m $(32bit-emul)
|
2018-04-23 05:59:45 +00:00
|
|
|
EFI_LDS := elf_riscv32_efi.lds
|
2023-02-20 06:02:39 +00:00
|
|
|
PLATFORM_ELFFLAGS += -B riscv -O elf32-littleriscv
|
2017-12-26 05:55:52 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef CONFIG_64BIT
|
2020-03-27 15:46:27 +00:00
|
|
|
KBUILD_LDFLAGS += -m $(64bit-emul)
|
2018-04-23 05:59:45 +00:00
|
|
|
EFI_LDS := elf_riscv64_efi.lds
|
2023-02-20 06:02:39 +00:00
|
|
|
PLATFORM_ELFFLAGS += -B riscv -O elf64-littleriscv
|
2017-12-26 05:55:52 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
PLATFORM_CPPFLAGS += -ffixed-gp -fpic
|
2023-04-07 05:44:59 +00:00
|
|
|
PLATFORM_RELFLAGS += -fno-common -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
|