riscv: Support building with Clang

The -ffixed-gp option of GCC has an exact equivalent of -ffixed-x3 in
Clang.

Signed-off-by: kleines Filmröllchen <filmroellchen@serenityos.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
kleines Filmröllchen 2024-01-25 15:06:59 +01:00 committed by Leo Yu-Chi Liang
parent 6b0520c939
commit ee9f9d6a41

View file

@ -25,7 +25,7 @@ EFI_LDS := elf_riscv64_efi.lds
PLATFORM_ELFFLAGS += -B riscv -O elf64-littleriscv
endif
PLATFORM_CPPFLAGS += -ffixed-gp -fpic
PLATFORM_CPPFLAGS += -ffixed-x3 -fpic
PLATFORM_RELFLAGS += -fno-common -ffunction-sections -fdata-sections
LDFLAGS_u-boot += --gc-sections -static -pie