]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
riscv: Support building with Clang
authorkleines Filmröllchen <malu.bertsch@gmail.com>
Thu, 25 Jan 2024 14:06:59 +0000 (15:06 +0100)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Wed, 31 Jan 2024 08:52:36 +0000 (16:52 +0800)
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>
arch/riscv/config.mk

index 9cf2aef0a41589eef4980fd01165126a246918cd..9f16dda92a0882a8c2eed5b37403883e0e63ef1e 100644 (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