Re: "arm64: vdso: Substitute gettimeofday() with C implementation" breaks clang build

From: Qian Cai
Date: Tue Jun 25 2019 - 11:17:01 EST


On Tue, 2019-06-25 at 15:54 +0100, Vincenzo Frascino 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?
>
> Thanks,
> Vincenzo
>
> --->8----
>

It does not work unfortunately.

# make CC=clang -j 256 2>/tmp/warn3.txt
 HOSTCCÂÂscripts/basic/fixdep
 HOSTCCÂÂscripts/dtc/dtc.o
 HOSTCCÂÂscripts/dtc/flattree.o
 HOSTCCÂÂscripts/dtc/fstree.o
 HOSTCCÂÂscripts/dtc/data.o
 HOSTCCÂÂscripts/dtc/livetree.o
 HOSTCCÂÂscripts/dtc/treesource.o
 HOSTCCÂÂscripts/dtc/srcpos.o
 HOSTCCÂÂscripts/dtc/checks.o
 HOSTCCÂÂscripts/dtc/util.o
 LEXÂÂÂÂÂscripts/dtc/dtc-lexer.lex.c
 YACCÂÂÂÂscripts/dtc/dtc-parser.tab.h
 YACCÂÂÂÂscripts/dtc/dtc-parser.tab.c
 HOSTCCÂÂscripts/dtc/dtc-parser.tab.o
 HOSTCCÂÂscripts/dtc/dtc-lexer.lex.o
 HOSTLDÂÂscripts/dtc/dtc
 HOSTCCÂÂscripts/kallsyms
 HOSTCCÂÂscripts/recordmcount
 HOSTCCÂÂscripts/sortextable
 DTCÂÂÂÂÂarch/arm64/boot/dts/arm/foundation-v8.dtb
 DTCÂÂÂÂÂarch/arm64/boot/dts/arm/foundation-v8-psci.dtb
 DTCÂÂÂÂÂarch/arm64/boot/dts/arm/foundation-v8-gicv3.dtb
 DTCÂÂÂÂÂarch/arm64/boot/dts/arm/foundation-v8-gicv3-psci.dtb
 DTCÂÂÂÂÂarch/arm64/boot/dts/arm/juno.dtb
 DTCÂÂÂÂÂarch/arm64/boot/dts/arm/juno-r1.dtb
 DTCÂÂÂÂÂarch/arm64/boot/dts/arm/juno-r2.dtb
 DTCÂÂÂÂÂarch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dtb
 DTCÂÂÂÂÂarch/arm64/boot/dts/arm/vexpress-v2f-1xv7-ca53x2.dtb
 DTCÂÂÂÂÂarch/arm64/boot/dts/arm/fvp-base-revc.dtb
 DTCÂÂÂÂÂarch/arm64/boot/dts/cavium/thunder2-99xx.dtb
 DTCÂÂÂÂÂarch/arm64/boot/dts/hisilicon/hi3660-hikey960.dtb
 DTCÂÂÂÂÂarch/arm64/boot/dts/hisilicon/hi3670-hikey970.dtb
 DTCÂÂÂÂÂarch/arm64/boot/dts/hisilicon/hi3798cv200-poplar.dtb
 DTCÂÂÂÂÂarch/arm64/boot/dts/hisilicon/hi6220-hikey.dtb
 DTCÂÂÂÂÂarch/arm64/boot/dts/hisilicon/hip05-d02.dtb
 DTCÂÂÂÂÂarch/arm64/boot/dts/hisilicon/hip06-d03.dtb
 DTCÂÂÂÂÂarch/arm64/boot/dts/hisilicon/hip07-d05.dtb
 HOSTCCÂÂscripts/mod/mk_elfconfig
 CCÂÂÂÂÂÂscripts/mod/devicetable-offsets.s
 CCÂÂÂÂÂÂscripts/mod/empty.o
 MKELFÂÂÂscripts/mod/elfconfig.h
 HOSTCCÂÂscripts/mod/modpost.o
 HOSTCCÂÂscripts/mod/file2alias.o
 HOSTCCÂÂscripts/mod/sumversion.o
 HOSTLDÂÂscripts/mod/modpost
 CCÂÂÂÂÂÂkernel/bounds.s
 CALLÂÂÂÂscripts/atomic/check-atomics.sh
 CCÂÂÂÂÂÂarch/arm64/kernel/asm-offsets.s
 CALLÂÂÂÂscripts/checksyscalls.sh
 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
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