Unverified Commit 030d6dbf authored by Changbin Du's avatar Changbin Du Committed by Palmer Dabbelt
Browse files

riscv: kexec: do not add '-mno-relax' flag if compiler doesn't support it



The RISC-V special option '-mno-relax' which to disable linker relaxations
is supported by GCC8+. For GCC7 and lower versions do not support this
option.

Fixes: fba8a867 ("RISC-V: Add kexec support")
Signed-off-by: default avatarChangbin Du <changbin.du@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarPalmer Dabbelt <palmerdabbelt@google.com>
parent 867432be
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ endif
CFLAGS_syscall_table.o	+= $(call cc-option,-Wno-override-init,)

ifdef CONFIG_KEXEC
AFLAGS_kexec_relocate.o := -mcmodel=medany -mno-relax
AFLAGS_kexec_relocate.o := -mcmodel=medany $(call cc-option,-mno-relax)
endif

extra-y += head.o