summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/riscv/config.mk2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/riscv/config.mk b/arch/riscv/config.mk
index f74c3f37e63..9cf2aef0a41 100644
--- a/arch/riscv/config.mk
+++ b/arch/riscv/config.mk
@@ -16,11 +16,13 @@
ifdef CONFIG_32BIT
KBUILD_LDFLAGS += -m $(32bit-emul)
EFI_LDS := elf_riscv32_efi.lds
+PLATFORM_ELFFLAGS += -B riscv -O elf32-littleriscv
endif
ifdef CONFIG_64BIT
KBUILD_LDFLAGS += -m $(64bit-emul)
EFI_LDS := elf_riscv64_efi.lds
+PLATFORM_ELFFLAGS += -B riscv -O elf64-littleriscv
endif
PLATFORM_CPPFLAGS += -ffixed-gp -fpic