Merge branch 'next'
[u-boot.git] / arch / riscv / config.mk
blob9f16dda92a0882a8c2eed5b37403883e0e63ef1e
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
16 ifdef CONFIG_32BIT
17 KBUILD_LDFLAGS += -m $(32bit-emul)
18 EFI_LDS := elf_riscv32_efi.lds
19 PLATFORM_ELFFLAGS += -B riscv -O elf32-littleriscv
20 endif
22 ifdef CONFIG_64BIT
23 KBUILD_LDFLAGS += -m $(64bit-emul)
24 EFI_LDS := elf_riscv64_efi.lds
25 PLATFORM_ELFFLAGS += -B riscv -O elf64-littleriscv
26 endif
28 PLATFORM_CPPFLAGS += -ffixed-x3 -fpic
29 PLATFORM_RELFLAGS += -fno-common -ffunction-sections -fdata-sections
30 LDFLAGS_u-boot += --gc-sections -static -pie
32 EFI_CRT0 := crt0_riscv_efi.o
33 EFI_RELOC := reloc_riscv_efi.o