From: Conor Dooley <conor@kernel.org>
To: Palmer Dabbelt <palmer@rivosinc.com>,
Nathan Chancellor <nathan@kernel.org>
Cc: maskray@google.com, linux-riscv@lists.infradead.org
Subject: Re: [PATCH v2/RESEND] riscv: Pass -mno-relax only on lld < 15.0.0
Date: Sun, 18 Sep 2022 10:57:11 +0100 [thread overview]
Message-ID: <Yybrd99HuLs3ulmy@spud> (raw)
In-Reply-To: <20220918092933.19943-1-palmer@rivosinc.com>
On Sun, Sep 18, 2022 at 02:29:34AM -0700, Palmer Dabbelt wrote:
> From: Fangrui Song <maskray@google.com>
>
> lld since llvm:6611d58f5bbc ("[ELF] Relax R_RISCV_ALIGN"), which will be
> included in the 15.0.0 release, has implemented some RISC-V linker
> relaxation. -mno-relax is no longer needed in
> KBUILD_CFLAGS/KBUILD_AFLAGS to suppress R_RISCV_ALIGN which older lld
> can not handle:
>
> ld.lld: error: capability.c:(.fixup+0x0): relocation R_RISCV_ALIGN
> requires unimplemented linker relaxation; recompile with -mno-relax
> but the .o is already compiled with -mno-relax
>
> Signed-off-by: Fangrui Song <maskray@google.com>
> Link: https://lore.kernel.org/r/20220710071117.446112-1-maskray@google.com/
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> Tested-by: Nick Desaulniers <ndesaulniers@google.com>
> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
> ---
> Fanguri poked me about this one on IRC, I'm not sure what happened but
> it didn't make it to my inbox (and neither did the replies, which is
> kind of scary). Rather that trying to resurrect that thread from lore,
> I figured it would be best to just send the v2 as the commit message
> needed a bit of cleanup.
One of the replies was a T-b from Nathan:
https://lore.kernel.org/linux-riscv/YsxfiKC%2FZBr7U7qI@dev-arch.thelio-3990X/
dunno if you wanna pick that up or he wants to resend..
I gave it a whirl too, so:
Tested-by: Conor Dooley <conor.dooley@microchip.com>
>
> Changes since v1 <20220710071117.446112-1-maskray@google.com>:
>
> * Clean up the commit message a bit.
> ---
> arch/riscv/Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
> index 3fa8ef336822..e7d52a2301e2 100644
> --- a/arch/riscv/Makefile
> +++ b/arch/riscv/Makefile
> @@ -37,6 +37,7 @@ else
> endif
>
> ifeq ($(CONFIG_LD_IS_LLD),y)
> +ifeq ($(shell test $(CONFIG_LLD_VERSION) -lt 150000; echo $$?),0)
> KBUILD_CFLAGS += -mno-relax
> KBUILD_AFLAGS += -mno-relax
> ifndef CONFIG_AS_IS_LLVM
> @@ -44,6 +45,7 @@ ifndef CONFIG_AS_IS_LLVM
> KBUILD_AFLAGS += -Wa,-mno-relax
> endif
> endif
> +endif
>
> # ISA string setting
> riscv-march-$(CONFIG_ARCH_RV32I) := rv32ima
> --
> 2.34.1
>
>
> _______________________________________________
> linux-riscv mailing list
> linux-riscv@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-riscv
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2022-09-18 9:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-18 9:29 [PATCH v2/RESEND] riscv: Pass -mno-relax only on lld < 15.0.0 Palmer Dabbelt
2022-09-18 9:57 ` Conor Dooley [this message]
2022-09-18 10:06 ` Palmer Dabbelt
2022-09-23 11:15 ` Palmer Dabbelt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yybrd99HuLs3ulmy@spud \
--to=conor@kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=maskray@google.com \
--cc=nathan@kernel.org \
--cc=palmer@rivosinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.