From cd9988191b01d346ff972da0d49ec21fdd559c18 Mon Sep 17 00:00:00 2001 From: Hubert Badocha Date: Tue, 10 Sep 2024 17:26:00 +0200 Subject: [PATCH] riscv64/Makefile: disable gp relaxations binutils 2.41 silently introduced gp relaxations which for some reason make kernel impossible to build. JIRA: RTOS-912 --- hal/riscv64/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hal/riscv64/Makefile b/hal/riscv64/Makefile index 143f3998b..01e26d9c9 100644 --- a/hal/riscv64/Makefile +++ b/hal/riscv64/Makefile @@ -11,3 +11,8 @@ include hal/$(TARGET_SUFF)/$(TARGET_SUBFAMILY)/Makefile CFLAGS += -Ihal/$(TARGET_SUFF) -Ihal/$(TARGET_SUFF)/$(TARGET_SUBFAMILY) +# binutils 2.41 silently introduced gp relaxations which for some reason make kernel impossible to build +# TODO: investigate further +ifeq ($(shell expr $(LD_VERSION_MINOR) ">=" 41), 1) +LDFLAGS += $(LDFLAGS_PREFIX)--no-relax-gp +endif