require conf/multilib.conf
require conf/machine/include/arm/armv8a/tune-cortexa72-cortexa53.inc
require conf/machine/include/baremetal-tc.conf

# Define ilp32 variant (not in tune files)
TUNEVALID[ilp32] = "ilp32 ABI"

TUNE_CCARGS .= '${@bb.utils.contains("TUNE_FEATURES", "ilp32", " -mabi=ilp32", "", d)}'

# ILP request an alternative machine dictionary
INHERIT += "xlnx-standalone"
PACKAGEQA_EXTRA_MACHDEFFUNCS .= '${@bb.utils.contains("TUNE_FEATURES", "ilp32", " xlnx_ilp32_dict", "", d)}'

# Define all of the multilibs supported by this configuration
MULTILIB_GLOBAL_VARIANTS = "${@extend_variants(d,'MULTILIBS','multilib')}"
MULTILIBS = "multilib:libilp32"

# Base configuration
# CFLAGS:
DEFAULTTUNE = "cortexa72-cortexa53"

# CFLAGS: -mabi=ilp32
DEFAULTTUNE:virtclass-multilib-libilp32 = "cortexa72-cortexa53-ilp32"

AVAILTUNES += "cortexa72-cortexa53-ilp32"
ARMPKGARCH:tune-cortexa72-cortexa53-ilp32 = "${ARMPKGARCH:tune-cortexa72-cortexa53}-ilp32"
TUNE_FEATURES:tune-cortexa72-cortexa53-ilp32 = "${TUNE_FEATURES:tune-cortexa72-cortexa53} ilp32"
PACKAGE_EXTRA_ARCHS:tune-cortexa72-cortexa53-ilp32 = "${PACKAGE_EXTRA_ARCHS:tune-cortexa72-cortexa53} cortexa72-cortexa53-ilp32"
BASE_LIB:tune-cortexa72-cortexa53-ilp32 = "lib/ilp32"
