linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nathan Chancellor <natechancellor@gmail.com>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	Paul Burton <paulburton@kernel.org>,
	linux-mips@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	clang-built-linux <clang-built-linux@googlegroups.com>
Subject: Re: [PATCH] MIPS: vdso: Wrap -mexplicit-relocs in cc-option
Date: Tue, 18 Feb 2020 11:30:11 -0700	[thread overview]
Message-ID: <20200218183011.GA7516@ubuntu-m2-xlarge-x86> (raw)
In-Reply-To: <CAKwvOdnRbMrXNSMAA20UnoAUKBu5X7JO+DvNTb9pebuzQbRVcw@mail.gmail.com>

On Tue, Feb 18, 2020 at 10:28:15AM -0800, Nick Desaulniers wrote:
> On Mon, Feb 17, 2020 at 1:11 PM Nathan Chancellor
> <natechancellor@gmail.com> wrote:
> >
> > Clang does not support this option and errors out:
> >
> > clang-11: error: unknown argument: '-mexplicit-relocs'
> >
> > Clang does not appear to need this flag like GCC does because the jalr
> > check that was added in commit 976c23af3ee5 ("mips: vdso: add build
> > time check that no 'jalr t9' calls left") passes just fine with
> >
> > $ make ARCH=mips CC=clang CROSS_COMPILE=mipsel-linux-gnu- malta_defconfig arch/mips/vdso/
> >
> > even before commit d3f703c4359f ("mips: vdso: fix 'jalr t9' crash in
> > vdso code").
> >
> > -mrelax-pic-calls has been supported since clang 9, which is the
> > earliest version that could build a working MIPS kernel, and it is the
> > default for clang so just leave it be.
> >
> > Fixes: d3f703c4359f ("mips: vdso: fix 'jalr t9' crash in vdso code")
> > Link: https://github.com/ClangBuiltLinux/linux/issues/890
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> 
> Thanks for the patch, and detailed context.
> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> 
> With this patch applied:
> $ make ARCH=mips CC=clang CROSS_COMPILE=mipsel-linux-gnu-
> malta_defconfig arch/mips/vdso/
> $ lvm-objdump --disassemble arch/mips/vdso/vdso.so.dbg.raw | egrep -h "jarl.*t9"
> $ llvm-objdump --disassemble arch/mips/vdso/vdso.so.dbg.raw | grep jarl
> So jarl instructions aren't emitted.
> 
> Tested-by: Nick Desaulniers <ndesaulniers@google.com>

Thank you for double checking and the review!

Cheers,
Nathan

  reply	other threads:[~2020-02-18 18:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-17 21:11 [PATCH] MIPS: vdso: Wrap -mexplicit-relocs in cc-option Nathan Chancellor
2020-02-18 18:28 ` Nick Desaulniers
2020-02-18 18:30   ` Nathan Chancellor [this message]
2020-02-19 19:01 ` Paul Burton

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=20200218183011.GA7516@ubuntu-m2-xlarge-x86 \
    --to=natechancellor@gmail.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=paulburton@kernel.org \
    --cc=ralf@linux-mips.org \
    /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 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).