2022-02-05 14:23:32 +00:00
|
|
|
# determines TARGET_CPU, if not forced by user
|
2023-03-22 21:56:33 +00:00
|
|
|
if [ -z "$TARGET_CPU" ]; then
|
2022-02-05 14:23:32 +00:00
|
|
|
TARGET_CPU=cortex-a53
|
|
|
|
fi
|
|
|
|
|
|
|
|
# TARGET_CPU:
|
|
|
|
# generic cortex-a35 cortex-a53 cortex-a57 cortex-a72
|
|
|
|
# exynos-m1 qdf24xx thunderx xgene1 cortex-a57.cortex-a53
|
|
|
|
# cortex-a72.cortex-a53
|
|
|
|
|
|
|
|
# determine architecture's family
|
2023-03-22 21:56:33 +00:00
|
|
|
case $TARGET_CPU in
|
|
|
|
generic|cortex-a35|cortex-a53|cortex-a57|cortex-a72|exynos-m1|qdf24xx|thunderx|xgene1|cortex-a57.cortex-a53|cortex-a72.cortex-a53|cortex-a55|cortex-a76.cortex-a55|cortex-a73.cortex-a53)
|
2022-02-05 14:23:32 +00:00
|
|
|
TARGET_SUBARCH=aarch64
|
|
|
|
TARGET_VARIANT=armv8-a
|
|
|
|
TARGET_ABI=eabi
|
|
|
|
TARGET_FEATURES+=" neon"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2022-07-04 19:19:45 +00:00
|
|
|
TARGET_GCC_ARCH=${TARGET_SUBARCH/-}
|
2022-02-05 14:23:32 +00:00
|
|
|
TARGET_KERNEL_ARCH=arm64
|
|
|
|
|
|
|
|
# setup ARCH specific *FLAGS
|
2023-03-22 21:56:33 +00:00
|
|
|
TARGET_CFLAGS="-march=${TARGET_VARIANT}${TARGET_CPU_FLAGS} -mabi=lp64 -Wno-psabi -mtune=$TARGET_CPU"
|
2022-02-05 14:23:32 +00:00
|
|
|
# Disable runtime checking support of ARMv8.0's optional LSE feature. Breaks gdb and mesa compile.
|
2022-11-24 14:13:17 +00:00
|
|
|
TARGET_CFLAGS="${TARGET_CFLAGS} -mno-outline-atomics"
|
2023-03-22 21:56:33 +00:00
|
|
|
TARGET_LDFLAGS="-march=${TARGET_VARIANT}${TARGET_CPU_FLAGS} -mtune=$TARGET_CPU"
|
|
|
|
GCC_OPTS="--with-abi=lp64 --with-arch=$TARGET_VARIANT"
|