linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Qian Cai <cai@lca.pw>
To: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: ndesaulniers@google.com,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	natechancellor@gmail.com, Thomas Gleixner <tglx@linutronix.de>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: "arm64: vdso: Substitute gettimeofday() with C implementation" breaks clang build
Date: Tue, 25 Jun 2019 10:28:07 -0400	[thread overview]
Message-ID: <1561472887.5154.72.camel@lca.pw> (raw)
In-Reply-To: <5113362e-1256-6712-6ce8-9599b1806cf1@arm.com>

On Tue, 2019-06-25 at 15:11 +0100, Vincenzo Frascino wrote:
> Hi Qian,
> 
> On 25/06/2019 14:51, Qian Cai wrote:
> > On Tue, 2019-06-25 at 14:40 +0100, Vincenzo Frascino wrote:
> > > On 25/06/2019 13:56, Qian Cai wrote:
> > > > On Tue, 2019-06-25 at 13:47 +0100, Vincenzo Frascino wrote:
> > > > > Hi Qian,
> > > > > 
> > > > > On 25/06/2019 13:16, Qian Cai wrote:
> > > > > > The linux-next commit "arm64: vdso: Substitute gettimeofday() with C
> > > > > > implementation" [1] breaks clang build.
> > > > > > 
> > > > > > error: invalid value 'tiny' in '-mcode-model tiny'
> > > > > > make[1]: *** [scripts/Makefile.build:279:
> > > > > > arch/arm64/kernel/vdso/vgettimeofday.o] Error 1
> > > > > > make[1]: *** Waiting for unfinished jobs....
> > > > > > make: *** [arch/arm64/Makefile:180: vdso_prepare] Error 2
> > > > > > 
> > > > > > [1] https://patchwork.kernel.org/patch/11009663/
> > > > > > 
> > > > > 
> > > > > I am not sure what does exactly break from your report. Could you
> > > > > please
> > > > > provide
> > > > > more details?
> > > > 
> > > > Here is the config to reproduce.
> > > > 
> > > > https://raw.githubusercontent.com/cailca/linux-mm/master/arm64.config
> > > > 
> > > > # make CC=clang -j $(nr_cpus)
> > > > 
> > > > I can get it working again by removing "-mcmodel=tiny" in
> > > > arch/arm64/kernel/vdso/Makefile
> > > > 
> > > 
> > > With your defconfig I can't still reproduce the problem. Which version of
> > > clang
> > > are you using?
> > 
> > Compiler: clang version 7.0.1 (tags/RELEASE_701/final)
> > 
> 
> I am using clang 8.0.0. Could you please try with it and see if the issue goes
> away?

Looks like the "tiny" was added since clang 8.0.

https://reviews.llvm.org/D49674

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.

> 
> Thanks,
> Vincenzo
> 
> > > 
> > > > > 
> > > > > On my env:
> > > > > 
> > > > > $ make mrproper && make defconfig && make CC=clang HOSTCC=clang
> > > > > -j$(nproc)
> > > > > 
> > > > > ...
> > > > > 
> > > > > arch/arm64/Makefile:56: CROSS_COMPILE_COMPAT is clang, the compat vDSO
> > > > > will
> > > > > not
> > > > > be built
> > > > > 
> > > > > ...
> > > > > 
> > > > >   LDS     arch/arm64/kernel/vdso/vdso.lds
> > > > >   AS      arch/arm64/kernel/vdso/note.o
> > > > >   AS      arch/arm64/kernel/vdso/sigreturn.o
> > > > >   CC      arch/arm64/kernel/vdso/vgettimeofday.o
> > > > >   LD      arch/arm64/kernel/vdso/vdso.so.dbg
> > > > >   VDSOCHK arch/arm64/kernel/vdso/vdso.so.dbg
> > > > >   VDSOSYM include/generated/vdso-offsets.h
> > > > > 
> > > > > ...
> > > > > 
> > > > >   LD      vmlinux.o
> > > > >   MODPOST vmlinux.o
> > > > >   MODINFO modules.builtin.modinfo
> > > > >   KSYM    .tmp_kallsyms1.o
> > > > >   KSYM    .tmp_kallsyms2.o
> > > > >   LD      vmlinux
> > > > >   SORTEX  vmlinux
> > > > >   SYSMAP  System.map
> > > > >   Building modules, stage 2.
> > > > >   OBJCOPY arch/arm64/boot/Image
> > > > >   MODPOST 483 modules
> > > > > 
> > > 
> > > 
> 
> 

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

  reply	other threads:[~2019-06-25 14:28 UTC|newest]

Thread overview: 16+ 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:47 ` Vincenzo Frascino
2019-06-25 12:56   ` Qian Cai
2019-06-25 13:40     ` Vincenzo Frascino
2019-06-25 13:51       ` Qian Cai
2019-06-25 14:11         ` Vincenzo Frascino
2019-06-25 14:28           ` Qian Cai [this message]
2019-06-25 14:30             ` Vincenzo Frascino
2019-06-25 14:54             ` Vincenzo Frascino
2019-06-25 15:16               ` Qian Cai
2019-06-25 16:26               ` Nick Desaulniers
2019-06-25 17:00                 ` Vincenzo Frascino
2019-06-25 17:31                   ` Qian Cai
2019-06-25 17:33                     ` Vincenzo Frascino
2019-06-26  9:38                   ` Will Deacon
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=1561472887.5154.72.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 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).