
baselib = "${@d.getVar('BASE_LIB:tune-' + (d.getVar('DEFAULTTUNE') or 'INVALID')) or d.getVar('BASELIB')}"

MULTILIB_VARIANTS = "${@extend_variants(d,'MULTILIBS','multilib')}"
MULTILIB_VARIANTS[vardeps] += "MULTILIBS"
MULTILIB_SAVE_VARNAME = "DEFAULTTUNE TARGET_ARCH TARGET_SYS TARGET_VENDOR"

MULTILIBS ??= "multilib:lib32"

STAGING_DIR_HOST = "${WORKDIR}/${MLPREFIX}recipe-sysroot"
STAGING_DIR_TARGET = "${WORKDIR}/${MLPREFIX}recipe-sysroot"
RECIPE_SYSROOT = "${WORKDIR}/${MLPREFIX}recipe-sysroot"
RECIPE_SYSROOT:class-native = "${WORKDIR}/recipe-sysroot"

INHERIT += "multilib_global"

BBCLASSEXTEND:append = " ${MULTILIBS}"

MULTILIB_GLOBAL_VARIANTS ?= "lib32 lib64 libx32"

OPKG_ARGS:append = " --force-maintainer --force-overwrite"
APT_ARGS:append = " -o Dpkg::Options::=--force-confnew -o Dpkg::Options::=--force-overwrite"

# These recipes don't need multilib variants, the ${BPN} PROVIDES/RPROVIDES
# ${MLPREFIX}${BPN}
NON_MULTILIB_RECIPES = "grub grub-efi make-mod-scripts ovmf u-boot gcc-source llvm-project-source"
