Message ID | 20240125140659.28229-2-filmroellchen@serenityos.org |
---|---|
State | Accepted |
Commit | ee9f9d6a41957d03ab414c0d86d68224693e1761 |
Delegated to: | Andes |
Headers | show |
Series | riscv: Support building with Clang | expand |
On Thu, Jan 25, 2024 at 03:06:59PM +0100, kleines Filmröllchen wrote: > 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 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
The -ffixed-gp option of GCC has an exact equivalent of -ffixed-x3 in Clang. Signed-off-by: kleines Filmröllchen <filmroellchen@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(-)