[Fire HD 8 and HD 10 Original Android Development] peterli99:
Build Error

I tried to build v14.1 but got stuck at

error: unknown target ABI 'aapcs-linux'

Any pointer is appreciated.

Details below

# LOS Repo
repo init -u git://github.com/LineageOS/android.git -b cm-14.1
repo sync

# Device tree
git clone https://github.com/mt8163/android_device_amazon_karnak -b cm-14.1 device/amazon/karnak
git clone https://github.com/mt8163/android_device_amazon_mt8163_common device/amazon/mt8163-common

# Kernel
# git clone https://github.com/mt8163/android_kernel_amazon_karnak -b cm-14.1 kernel/amazon/karnak
git clone https://github.com/mt8163/android_kernel_amazon_karnak kernel/amazon/karnak

# Vendor
git clone https://github.com/mt8163/android_vendor_amazon_karnak -b cm-14.1 vendor/amazon/karnak
git clone https://github.com/mt8163/android_vendor_amazon_mt8163 vendor/amazon/mt8163

# Build scripts
curl https://raw.githubusercontent.com/488315/build_scripts/master/build.sh > build.sh
curl https://raw.githubusercontent.com/488315/build_scripts/master/build_kernel.sh > build_kernel.sh
#####
./build.sh
#####
target C: lib_driver_cmd_mt66xx <= device/amazon/mt8163-common/mtk/wpa_supplicant/mediatek_driver_cmd_nl80211.c
FAILED: /bin/bash -c "(PWD=/proc/self/cwd prebuilts/clang/host/linux-x86/clang-2690385/bin/clang -I device/amazon/mt8163-common/include -I external/wpa_supplicant_8/src -I external/wpa_supplicant_8/src/common -I external/wpa_supplicant_8/src/drivers -I external/wpa_supplicant_8/src/l2_packet -I external/wpa_supplicant_8/src/utils -I external/wpa_supplicant_8/src/wps -I external/wpa_supplicant_8/wpa_supplicant -I external/libnl/include -I device/amazon/mt8163-common/mtk/wpa_supplicant -I /data/Dev/LOS0-14.1/out/target/product/karnak/obj/STATIC_LIBRARIES/lib_driver_cmd_mt66xx_intermediates -I /data/Dev/LOS0-14.1/out/target/product/karnak/gen/STATIC_LIBRARIES/lib_driver_cmd_mt66xx_intermediates -I libnativehelper/include/nativehelper \$(cat /data/Dev/LOS0-14.1/out/target/product/karnak/obj/STATIC_LIBRARIES/lib_driver_cmd_mt66xx_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem libnativehelper/include -isystem frameworks/native/include -isystem frameworks/native/opengl/include -isystem frameworks/av/include -isystem frameworks/base/include -isystem hardware/ril/include -isystem /data/Dev/LOS0-14.1/out/target/product/karnak/obj/include -isystem bionic/libc/arch-arm64/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/common -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libm/include -isystem bionic/libm/include/arm64 -c -fno-exceptions -Wno-multichar -fno-strict-aliasing -fstack-protector-strong -ffunction-sections -fdata-sections -funwind-tables -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=implicit-function-declaration -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -DNDEBUG -O2 -g -Wstrict-aliasing=2 -DNDEBUG -UDEBUG -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -nostdlibinc -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin -std=gnu99 -mabi=aapcs-linux -DCONFIG_ANDROID_LOG -fPIC -D_USING_LIBCXX -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type -MD -MF /data/Dev/LOS0-14.1/out/target/product/karnak/obj/STATIC_LIBRARIES/lib_driver_cmd_mt66xx_intermediates/mediatek_driver_cmd_nl80211.d -o /data/Dev/LOS0-14.1/out/target/product/karnak/obj/STATIC_LIBRARIES/lib_driver_cmd_mt66xx_intermediates/mediatek_driver_cmd_nl80211.o device/amazon/mt8163-common/mtk/wpa_supplicant/mediatek_driver_cmd_nl80211.c ) && (cp /data/Dev/LOS0-14.1/out/target/product/karnak/obj/STATIC_LIBRARIES/lib_driver_cmd_mt66xx_intermediates/mediatek_driver_cmd_nl80211.d /data/Dev/LOS0-14.1/out/target/product/karnak/obj/STATIC_LIBRARIES/lib_driver_cmd_mt66xx_intermediates/mediatek_driver_cmd_nl80211.P; sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e 's/\$/ :/' < /data/Dev/LOS0-14.1/out/target/product/karnak/obj/STATIC_LIBRARIES/lib_driver_cmd_mt66xx_intermediates/mediatek_driver_cmd_nl80211.d >> /data/Dev/LOS0-14.1/out/target/product/karnak/obj/STATIC_LIBRARIES/lib_driver_cmd_mt66xx_intermediates/mediatek_driver_cmd_nl80211.P; rm -f /data/Dev/LOS0-14.1/out/target/product/karnak/obj/STATIC_LIBRARIES/lib_driver_cmd_mt66xx_intermediates/mediatek_driver_cmd_nl80211.d )"
error: unknown target ABI 'aapcs-linux'
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed