config.mk 879 B

12345678910111213141516171819202122232425262728293031323334
  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. 32bit-emul := elf32lriscv
  13. 64bit-emul := elf64lriscv
  14. ifdef CONFIG_32BIT
  15. KBUILD_LDFLAGS += -m $(32bit-emul)
  16. EFI_LDS := elf_riscv32_efi.lds
  17. endif
  18. ifdef CONFIG_64BIT
  19. KBUILD_LDFLAGS += -m $(64bit-emul)
  20. EFI_LDS := elf_riscv64_efi.lds
  21. endif
  22. CONFIG_STANDALONE_LOAD_ADDR ?= 0x00000000
  23. PLATFORM_CPPFLAGS += -ffixed-gp -fpic
  24. PLATFORM_RELFLAGS += -fno-common -gdwarf-2 -ffunction-sections \
  25. -fdata-sections
  26. LDFLAGS_u-boot += --gc-sections -static -pie
  27. EFI_CRT0 := crt0_riscv_efi.o
  28. EFI_RELOC := reloc_riscv_efi.o