LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] riscv: kexec: do not add '-mno-relax' flag if compiler doesn't support it
@ 2021-07-22 2:17 Changbin Du
2021-08-11 23:37 ` Changbin Du
2021-08-12 5:23 ` Palmer Dabbelt
0 siblings, 2 replies; 3+ messages in thread
From: Changbin Du @ 2021-07-22 2:17 UTC (permalink / raw)
To: Paul Walmsley, Palmer Dabbelt, Albert Ou
Cc: linux-riscv, linux-kernel, Changbin Du
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: fba8a8674f ("RISC-V: Add kexec support")
Signed-off-by: Changbin Du <changbin.du@gmail.com>
---
arch/riscv/kernel/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
--
2.26.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] riscv: kexec: do not add '-mno-relax' flag if compiler doesn't support it
2021-07-22 2:17 [PATCH] riscv: kexec: do not add '-mno-relax' flag if compiler doesn't support it Changbin Du
@ 2021-08-11 23:37 ` Changbin Du
2021-08-12 5:23 ` Palmer Dabbelt
1 sibling, 0 replies; 3+ messages in thread
From: Changbin Du @ 2021-08-11 23:37 UTC (permalink / raw)
To: Changbin Du
Cc: Paul Walmsley, Palmer Dabbelt, Albert Ou, linux-riscv, linux-kernel
Hello, ping status for this fix. There's a build error with gcc7-.
On Thu, Jul 22, 2021 at 10:17:15AM +0800, Changbin Du wrote:
> 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: fba8a8674f ("RISC-V: Add kexec support")
> Signed-off-by: Changbin Du <changbin.du@gmail.com>
> ---
> arch/riscv/kernel/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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
> --
> 2.26.2
>
>
--
Cheers,
Changbin Du
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] riscv: kexec: do not add '-mno-relax' flag if compiler doesn't support it
2021-07-22 2:17 [PATCH] riscv: kexec: do not add '-mno-relax' flag if compiler doesn't support it Changbin Du
2021-08-11 23:37 ` Changbin Du
@ 2021-08-12 5:23 ` Palmer Dabbelt
1 sibling, 0 replies; 3+ messages in thread
From: Palmer Dabbelt @ 2021-08-12 5:23 UTC (permalink / raw)
To: changbin.du; +Cc: Paul Walmsley, aou, linux-riscv, linux-kernel, changbin.du
On Wed, 21 Jul 2021 19:17:15 PDT (-0700), changbin.du@gmail.com wrote:
> 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.
I would not trust GCC 7 on RISC-V, that was a long time ago and there's
been a lot fixed since then.
>
> Fixes: fba8a8674f ("RISC-V: Add kexec support")
> Signed-off-by: Changbin Du <changbin.du@gmail.com>
> ---
> arch/riscv/kernel/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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
This is on fixes.
Thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-12 5:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-22 2:17 [PATCH] riscv: kexec: do not add '-mno-relax' flag if compiler doesn't support it Changbin Du
2021-08-11 23:37 ` Changbin Du
2021-08-12 5:23 ` Palmer Dabbelt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).