Merge tag 'mips-pull-2019-11-16' of git://git.denx.de/u-boot-mips
[oweals/u-boot.git] / arch / riscv / config.mk
index ed9eb0c24cddc86f0d459c64edcb3f277f641604..84654eb3ed87e72a153f43ee3831377f323f0755 100644 (file)
 64bit-emul             := elf64lriscv
 
 ifdef CONFIG_32BIT
-PLATFORM_CPPFLAGS      += -march=rv32ima -mabi=ilp32
 PLATFORM_LDFLAGS       += -m $(32bit-emul)
-CFLAGS_EFI             += -march=rv32ima -mabi=ilp32
 EFI_LDS                        := elf_riscv32_efi.lds
 endif
 
 ifdef CONFIG_64BIT
-PLATFORM_CPPFLAGS      += -march=rv64ima -mabi=lp64
 PLATFORM_LDFLAGS       += -m $(64bit-emul)
-CFLAGS_EFI             += -march=rv64ima -mabi=lp64
 EFI_LDS                        := elf_riscv64_efi.lds
 endif
 
-CONFIG_STANDALONE_LOAD_ADDR = 0x00000000 \
-                             -T $(srctree)/examples/standalone/riscv.lds
+CONFIG_STANDALONE_LOAD_ADDR ?= 0x00000000
 
 PLATFORM_CPPFLAGS      += -ffixed-gp -fpic
-PLATFORM_RELFLAGS      += -fno-common -gdwarf-2 -ffunction-sections
+PLATFORM_RELFLAGS      += -fno-common -gdwarf-2 -ffunction-sections \
+                          -fdata-sections
 LDFLAGS_u-boot         += --gc-sections -static -pie
 
 EFI_CRT0               := crt0_riscv_efi.o