I try to build android kernel from google official document,use official build.sh
from scratch,but got this error message as follow:
VDSOSYM include/generated/vdso-offsets.h
LDS arch/arm64/kernel/vdso32/vdso.lds
VDSOC32 arch/arm64/kernel/vdso32/vgettimeofday.o
VDSOA32 arch/arm64/kernel/vdso32/sigreturn.o
HOSTCC arch/arm64/kernel/vdso32/../../../arm/vdso/vdsomunge
clang-5.0: warning: optimization flag '-fno-delete-null-pointer-checks' is not supported [-Wignored-optimization-argument]
VDSOL32 arch/arm64/kernel/vdso32/vdso.so.raw
/..//bin/ld: unrecognised emulation mode: armelf_linux_eabi
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu i386pep i386pe elf64bpf
clang-5.0: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [/home/tonki/aosp/newkernel/private/msm-google/arch/arm64/kernel/vdso32/Makefile:138: arch/arm64/kernel/vdso32/vdso.so.raw] Error 1
make[2]: *** [arch/arm64/Makefile:242: vdso_prepare] Error 2
make[1]: *** [Makefile:152: sub-make] Error 2
make: *** [Makefile:24: __sub-make] Error 2
I take a look at arch/arm64/kernel/vdso32/Makefile
file,found this line
CC_ARM32 := $(CC) $(CLANG_TARGET_ARM32)
,it use clang --target=arm-linux-androideabi
to link vdso32.raw image but use /usr/bin/ld
to link.
My OS is Arch Linux distribution,there was no gcc-arm-linux-androideabi
official package which i can install with pacman like Ubuntu's apt tool.
Branch: AOSP kernel/android-msm-crosshatch-4.9-pie-qpr2.
Device: Pixel 3XL.
Kernel-config: official b1c1_defconfig(arch/arm64/configs/b1c1_defconfig).
Question: How can i solve it ? I have no idea here.Thanks!