Skip to content

Commit 030d6db

Browse files
changbindupalmer-dabbelt
authored andcommitted
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: fba8a86 ("RISC-V: Add kexec support") Signed-off-by: Changbin Du <[email protected]> Cc: [email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 867432b commit 030d6db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/kernel/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ endif
1111
CFLAGS_syscall_table.o += $(call cc-option,-Wno-override-init,)
1212

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

1717
extra-y += head.o

0 commit comments

Comments
 (0)