I'm trying to compile android linux kernel (4.4) on my iMac but it keeps showing this error, here the full output:
juampi@iMacEscritorio /Volumes/roms/kernels/msm8998 make -j4 O=out ARCH=arm64 \
CC='/Users/juampi/Downloads/android-ndk-r21b/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang' \
CLANG_TRIPLE=aarch64-linux-gnu \
CROSS_COMPILE_ARM32='/Users/juampi/Downloads/android-ndk-r21b/toolchains/arm-linux-androideabi-4.9/bin/arm-linux-androideabi-' \
CROSS_COMPILE='/Users/juampi/Downloads/android-ndk-r21b/toolchains/arm-linux-androideabi-4.9' \
CROSS_COMPILE='/Volumes/roms/peplus/prebuilts/gcc/darwin-x86/arm/bin/aarch64-linux-android-'
CHK include/config/kernel.release
GEN ./Makefile
CHK include/generated/uapi/linux/version.h
CHK scripts/mod/devicetable-offsets.h
Using .. as source for kernel
CHK include/generated/utsrelease.h
CHK include/generated/timeconst.h
CHK include/generated/bounds.h
CHK include/generated/asm-offsets.h
CALL ../scripts/checksyscalls.sh
VDSOL arch/arm64/kernel/vdso/vdso.so.dbg
ld: unknown option: -EL
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [arch/arm64/kernel/vdso/vdso.so.dbg] Error 1
make[1]: *** [vdso_prepare] Error 2
make: *** [sub-make] Error 2
Any ideas what could be causing this?
Thanks in advance
Thanks to Alan Birtles comment I realized that I could (and should) use the ld from the toolchain. I did not know how to do that exactly so I backed up Mac ld and cp the one from the toolchain to /usr/bin. If someone knows how to do it correctly please answer
EDIT: The correct way of doing what I stated before is setting the
PATH
properly