[Xiaomi Mi A1 ROMs, Kernels, Recoveries, & Other De] CosmicDan:
May I ask your toolchain and clang used to compile?

UPDATE: Decided to build LOS 19.1 from source, I will try to get the kernel compiling in that tree. Will take a while to test though.

Wanted to adjust some defconfig in the OC branch but can't get it to compile. Been out of the loop for ages sorry, I'm ignorant :)

Attempt #1: Tried using modern clang with LLVM (rather than old AOSP GCC toolchain) as recommended these days, with this:

make O=out ARCH=arm64 tissot_defconfig

PATH="/home/cosmicdan/Tissot-Kernel-LXC/clang/clang-r450784e/bin:${PATH}" \
make -j$(nproc --all) O=out \
ARCH=arm64 \
CC=clang \
CLANG_TRIPLE=aarch64-linux-gnu- \
CROSS_COMPILE=aarch64-linux-android- \
CROSS_COMPILE_ARM32=arm-linux-androideabi-

...which results in this error:

Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler

...which can be disabled but I also get these warnings:

arch/arm64/Makefile:27: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum

...so I guess your kernel source is not updated for LLVM or I'm doing something wrong....?

Attempt #2: Tried the classic way, used Android GCC 4.9 (since it's been wiped out from AOSP repo, need to get it from this commit ID - https://android.googlesource.com/pl....9/+/357ead66eff30a77b2b752595d4df09fb56e23f0)

make O=out ARCH=arm64 tissot_defconfig
PATH="/home/cosmicdan/Tissot-Kernel-LXC/clang/clang-r450784e/bin:/home/cosmicdan/Tissot-Kernel-LXC/toolchain/bin:${PATH}" \
make -j$(nproc --all) O=out \
ARCH=arm64 \
CC=clang \
CLANG_TRIPLE=aarch64-linux-gnu- \
CROSS_COMPILE=aarch64-linux-android- \
CROSS_COMPILE_ARM32=arm-linux-androideabi-

...same as above just with GCC toolchain in path. Results in this error:

CALL ../scripts/checksyscalls.sh
VDSOC arch/arm64/kernel/vdso/vgettimeofday.o
/tmp/vgettimeofday-f6602c.s: Assembler messages:
/tmp/vgettimeofday-f6602c.s:3: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-f6602c.s:3: Error: file number less than one
/tmp/vgettimeofday-f6602c.s:4: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-f6602c.s:5: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-f6602c.s:6: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-f6602c.s:7: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-f6602c.s:54: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-f6602c.s:67: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-f6602c.s:139: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-f6602c.s:170: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-f6602c.s:1106: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-f6602c.s:1107: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-f6602c.s:1108: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-f6602c.s:1109: Error: junk at end of line, first unrecognized character is `"'
/tmp/vgettimeofday-f6602c.s:1125: Error: junk at end of line, first unrecognized character is `"'
clang-14: error: assembler command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../arch/arm64/kernel/vdso/Makefile:71: arch/arm64/kernel/vdso/vgettimeofday.o] Error 1

------------------

So either way my environment isn't right, dunno what toolchain + clang you're using.

Cheers!