config.mk 858 B

123456789101112131415161718192021222324252627282930313233
  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. ifeq ($(CROSS_COMPILE),)
  13. CROSS_COMPILE := riscv32-unknown-linux-gnu-
  14. endif
  15. 32bit-emul := elf32lriscv
  16. 64bit-emul := elf64lriscv
  17. ifdef CONFIG_32BIT
  18. PLATFORM_LDFLAGS += -m $(32bit-emul)
  19. endif
  20. ifdef CONFIG_64BIT
  21. PLATFORM_LDFLAGS += -m $(64bit-emul)
  22. endif
  23. CONFIG_STANDALONE_LOAD_ADDR = 0x00000000 \
  24. -T $(srctree)/examples/standalone/riscv.lds
  25. PLATFORM_CPPFLAGS += -ffixed-gp -fpic
  26. PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -gdwarf-2
  27. LDFLAGS_u-boot += --gc-sections -static -pie