All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qian Cai <cai@lca.pw>
To: Vincenzo Frascino <vincenzo.frascino@arm.com>,
	Nick Desaulniers <ndesaulniers@google.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Nathan Chancellor <natechancellor@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: "arm64: vdso: Substitute gettimeofday() with C implementation" breaks clang build
Date: Tue, 25 Jun 2019 13:31:28 -0400	[thread overview]
Message-ID: <1561483888.5154.78.camel@lca.pw> (raw)
In-Reply-To: <193c179e-16ca-4b4e-2584-75e8f6c1819f@arm.com>

On Tue, 2019-06-25 at 18:00 +0100, Vincenzo Frascino wrote:
> Hi Nick,
> 
> On 25/06/2019 17:26, Nick Desaulniers wrote:
> > On Tue, Jun 25, 2019 at 7:54 AM Vincenzo Frascino
> > <vincenzo.frascino@arm.com> wrote:
> > > 
> > > Hi Qian,
> > > 
> > > ...
> > > 
> > > > 
> > > > but clang 7.0 is still use in many distros by default, so maybe this
> > > > commit can
> > > > be fixed by adding a conditional check to use "small" if clang version <
> > > > 8.0.
> > > > 
> > > 
> > > Could you please verify that the patch below works for you?
> > 
> > Should it be checking against CONFIG_CLANG_VERSION, or better yet be
> > using cc-option macro?
> > 
> 
> This is what I did in my proposed patch, but I was surprised that clang-7
> generates relocations that clang-8 does not.
> 
>   LD      arch/arm64/kernel/vdso/vdso.so.dbg
>   VDSOCHK arch/arm64/kernel/vdso/vdso.so.dbg
> 00000000000009d0 R_AARCH64_JUMP_SLOT  _mcount
> 
> arch/arm64/kernel/vdso/vdso.so.dbg: dynamic relocations are not supported
> make[1]: *** [arch/arm64/kernel/vdso/Makefile:59:
> arch/arm64/kernel/vdso/vdso.so.dbg] Error 1
> make: *** [arch/arm64/Makefile:180: vdso_prepare] Error 2
> 
> This is the the result of the macro I introduced in lib/vdso/Makefile.
> 
> And I just found out why. I forgot to add a "+" in the patch provided :)
> 
> @Qian: Could you please retry with the one provided below?
> 

It works fine.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Qian Cai <cai@lca.pw>
To: Vincenzo Frascino <vincenzo.frascino@arm.com>,
	Nick Desaulniers <ndesaulniers@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Will Deacon <will.deacon@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Nathan Chancellor <natechancellor@gmail.com>
Subject: Re: "arm64: vdso: Substitute gettimeofday() with C implementation" breaks clang build
Date: Tue, 25 Jun 2019 13:31:28 -0400	[thread overview]
Message-ID: <1561483888.5154.78.camel@lca.pw> (raw)
In-Reply-To: <193c179e-16ca-4b4e-2584-75e8f6c1819f@arm.com>

On Tue, 2019-06-25 at 18:00 +0100, Vincenzo Frascino wrote:
> Hi Nick,
> 
> On 25/06/2019 17:26, Nick Desaulniers wrote:
> > On Tue, Jun 25, 2019 at 7:54 AM Vincenzo Frascino
> > <vincenzo.frascino@arm.com> wrote:
> > > 
> > > Hi Qian,
> > > 
> > > ...
> > > 
> > > > 
> > > > but clang 7.0 is still use in many distros by default, so maybe this
> > > > commit can
> > > > be fixed by adding a conditional check to use "small" if clang version <
> > > > 8.0.
> > > > 
> > > 
> > > Could you please verify that the patch below works for you?
> > 
> > Should it be checking against CONFIG_CLANG_VERSION, or better yet be
> > using cc-option macro?
> > 
> 
> This is what I did in my proposed patch, but I was surprised that clang-7
> generates relocations that clang-8 does not.
> 
>   LD      arch/arm64/kernel/vdso/vdso.so.dbg
>   VDSOCHK arch/arm64/kernel/vdso/vdso.so.dbg
> 00000000000009d0 R_AARCH64_JUMP_SLOT  _mcount
> 
> arch/arm64/kernel/vdso/vdso.so.dbg: dynamic relocations are not supported
> make[1]: *** [arch/arm64/kernel/vdso/Makefile:59:
> arch/arm64/kernel/vdso/vdso.so.dbg] Error 1
> make: *** [arch/arm64/Makefile:180: vdso_prepare] Error 2
> 
> This is the the result of the macro I introduced in lib/vdso/Makefile.
> 
> And I just found out why. I forgot to add a "+" in the patch provided :)
> 
> @Qian: Could you please retry with the one provided below?
> 

It works fine.

  reply	other threads:[~2019-06-25 17:31 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-25 12:16 "arm64: vdso: Substitute gettimeofday() with C implementation" breaks clang build Qian Cai
2019-06-25 12:16 ` Qian Cai
2019-06-25 12:47 ` Vincenzo Frascino
2019-06-25 12:47   ` Vincenzo Frascino
2019-06-25 12:56   ` Qian Cai
2019-06-25 12:56     ` Qian Cai
2019-06-25 13:40     ` Vincenzo Frascino
2019-06-25 13:40       ` Vincenzo Frascino
2019-06-25 13:51       ` Qian Cai
2019-06-25 13:51         ` Qian Cai
2019-06-25 14:11         ` Vincenzo Frascino
2019-06-25 14:11           ` Vincenzo Frascino
2019-06-25 14:28           ` Qian Cai
2019-06-25 14:28             ` Qian Cai
2019-06-25 14:30             ` Vincenzo Frascino
2019-06-25 14:30               ` Vincenzo Frascino
2019-06-25 14:54             ` Vincenzo Frascino
2019-06-25 14:54               ` Vincenzo Frascino
2019-06-25 15:16               ` Qian Cai
2019-06-25 15:16                 ` Qian Cai
2019-06-25 16:26               ` Nick Desaulniers
2019-06-25 16:26                 ` Nick Desaulniers
2019-06-25 17:00                 ` Vincenzo Frascino
2019-06-25 17:00                   ` Vincenzo Frascino
2019-06-25 17:31                   ` Qian Cai [this message]
2019-06-25 17:31                     ` Qian Cai
2019-06-25 17:33                     ` Vincenzo Frascino
2019-06-25 17:33                       ` Vincenzo Frascino
2019-06-26  9:38                   ` Will Deacon
2019-06-26  9:38                     ` Will Deacon
2019-06-26  9:45                     ` Vincenzo Frascino
2019-06-26  9:45                       ` Vincenzo Frascino

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=1561483888.5154.78.camel@lca.pw \
    --to=cai@lca.pw \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=tglx@linutronix.de \
    --cc=vincenzo.frascino@arm.com \
    --cc=will.deacon@arm.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.