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>
diff --git a/arch/riscv/config.mk b/arch/riscv/config.mk
index 9cf2aef..9f16dda 100644
--- a/arch/riscv/config.mk
+++ b/arch/riscv/config.mk
@@ -25,7 +25,7 @@
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