xref: /openbmc/u-boot/arch/riscv/config.mk (revision 74bf9326)
1# SPDX-License-Identifier: GPL-2.0+
2#
3# (C) Copyright 2000-2002
4# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5#
6# Copyright (c) 2017 Microsemi Corporation.
7# Padmarao Begari, Microsemi Corporation <padmarao.begari@microsemi.com>
8#
9# Copyright (C) 2017 Andes Technology Corporation
10# Rick Chen, Andes Technology Corporation <rick@andestech.com>
11#
12
1332bit-emul		:= elf32lriscv
1464bit-emul		:= elf64lriscv
15
16ifdef CONFIG_32BIT
17PLATFORM_LDFLAGS	+= -m $(32bit-emul)
18EFI_LDS			:= elf_riscv32_efi.lds
19endif
20
21ifdef CONFIG_64BIT
22PLATFORM_LDFLAGS	+= -m $(64bit-emul)
23EFI_LDS			:= elf_riscv64_efi.lds
24endif
25
26CONFIG_STANDALONE_LOAD_ADDR ?= 0x00000000
27
28PLATFORM_CPPFLAGS	+= -ffixed-gp -fpic
29PLATFORM_RELFLAGS	+= -fno-common -gdwarf-2 -ffunction-sections \
30			   -fdata-sections
31LDFLAGS_u-boot		+= --gc-sections -static -pie
32
33EFI_CRT0		:= crt0_riscv_efi.o
34EFI_RELOC		:= reloc_riscv_efi.o
35