summaryrefslogtreecommitdiff
path: root/arch/riscv
diff options
context:
space:
mode:
authorChangbin Du <changbin.du@gmail.com>2021-07-22 05:17:15 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-08-18 10:06:50 +0300
commit33d2301ad61b388b9341938b9ada1be87868893c (patch)
treeefabffd442313c78bea5dc67db75c8dee887eb36 /arch/riscv
parent1579656b0141c5886070ad41eebe149ad4e68554 (diff)
downloadlinux-33d2301ad61b388b9341938b9ada1be87868893c.tar.xz
riscv: kexec: do not add '-mno-relax' flag if compiler doesn't support it
commit 030d6dbf0c2e5fdf23ad29557f0c87a882993e26 upstream. 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: fba8a8674f68 ("RISC-V: Add kexec support") Signed-off-by: Changbin Du <changbin.du@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/riscv')
-rw-r--r--arch/riscv/kernel/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/kernel/Makefile b/arch/riscv/kernel/Makefile
index d3081e4d9600..3397ddac1a30 100644
--- a/arch/riscv/kernel/Makefile
+++ b/arch/riscv/kernel/Makefile
@@ -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