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

Signed-off-by: kleines Filmröllchen <filmroellc...@serenityos.org>
---

Changes in v2:
- Removed copyright attribution
- Use -ffixed-x3 unconditionally as it is also supported by GCC

 arch/riscv/config.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/config.mk b/arch/riscv/config.mk
index 9cf2aef0a4..9f16dda92a 100644
--- a/arch/riscv/config.mk
+++ b/arch/riscv/config.mk
@@ -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
 
-- 
2.39.2

Reply via email to