0

When I use LLVM 14.0.3 to build Linux Kernel v5.11.22 or v5.10.118 for aarch64, it reports the below error:

CC      arch/arm64/kernel/vdso/vgettimeofday.o
/tmp/vgettimeofday-0dc7a1.s: Assembler messages:
/tmp/vgettimeofday-0dc7a1.s:15: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:15: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:16: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:17: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:18: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:19: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:25: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:25: Error: junk at end of line, first unrecognized character is `0'
/tmp/vgettimeofday-0dc7a1.s:50: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:151: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:191: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:236: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:277: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:382: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:382: Error: junk at end of line, first unrecognized character is `2'
/tmp/vgettimeofday-0dc7a1.s:746: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:747: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:748: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:749: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:750: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:757: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:757: Error: junk at end of line, first unrecognized character is `0'
/tmp/vgettimeofday-0dc7a1.s:1063: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:1063: Error: junk at end of line, first unrecognized character is `2'
/tmp/vgettimeofday-0dc7a1.s:1155: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-0dc7a1.s:1162: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:1162: Error: junk at end of line, first unrecognized character is `0'
/tmp/vgettimeofday-0dc7a1.s:1295: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:1295: Error: junk at end of line, first unrecognized character is `2'
/tmp/vgettimeofday-0dc7a1.s:1324: Error: file number less than one
/tmp/vgettimeofday-0dc7a1.s:1324: Error: junk at end of line, first unrecognized character is `2'
clang-14: error: assembler command failed with exit code 1 (use -v to see invocation)
make[1]: *** [scripts/Makefile.build:279: arch/arm64/kernel/vdso/vgettimeofday.o] Error 1
make: *** [arch/arm64/Makefile:191: vdso_prepare] Error 2  

Below are the build commands that I use:

make ARCH=arm64 LLVM=1 CROSS_COMPILE=aarch64-linux-gnu- defconfig
make ARCH=arm64 LLVM=1 CROSS_COMPILE=aarch64-linux-gnu-

But I can build Linux Kernel v5.15.43 and the latest v5.18 by using the same build commands. Also I tried LLVM 13.0.0, it can build Linux Kernel v5.11.22 for aarch64.

  • OK, but what's the question? I mean, are you just suggesting that there's an solved problem in old versions of either of two software packages, but whatever and wherever it was, it's fixed now? Or do you have a concrete problem that can be solved? – arnt May 30 '22 at 12:22
  • Kernel 5.10 is a "longterm maintenance release", so will probably get updated to support LLVM 14 eventually. Kernel 5.11 is no longer supported by the Linux "stable" kernel team, although there might be some distro that is supporting its own version. – Ian Abbott May 30 '22 at 13:48
  • @arnt Sorry, I didn't express myself clearly, my question is what is the root cause for the above error? For some reason I want to use llvm 14 to build Linux kernel 5.10, so I post this – Simon Zhu May 30 '22 at 14:06
  • Too obscure for my taste, I'm afraid, but [git bisect](https://stackoverflow.com/q/4713088/fnord) should help you. – arnt May 31 '22 at 15:04

0 Answers0