EXTERNAL_TOOLCHAIN_GCC = "${TOPDIR}/../../riscv-toolchain-gcc"
EXTERNAL_TOOLCHAIN_CLANG = "${TOPDIR}/../../riscv-toolchain-clang"
export EXTERNAL_TOOLCHAIN_EXPORT_GCC = "${EXTERNAL_TOOLCHAIN_GCC}"
export EXTERNAL_TOOLCHAIN_EXPORT_CLANG = "${EXTERNAL_TOOLCHAIN_CLANG}"
BB_BASEHASH_IGNORE_VARS:append = " EXTERNAL_TOOLCHAIN_GCC EXTERNAL_TOOLCHAIN_EXPORT_GCC \
    EXTERNAL_TOOLCHAIN_CLANG EXTERNAL_TOOLCHAIN_EXPORT_CLANG"
GCC_VERSION:forcevariable = "14.3.0"

TOOLCHAIN ?= "gcc"
EXTERNAL_TOOLCHAIN = "${EXTERNAL_TOOLCHAIN_GCC}"
EXTERNAL_TOOLCHAIN:toolchain-clang = "${EXTERNAL_TOOLCHAIN_CLANG}"
CLANG_VERSION = "18.1.8"
EXTERNAL_CC:toolchain-clang = "clang"
PREFERRED_PROVIDER_clang-cross-${TARGET_ARCH} ?= "clang-external-cross-${TARGET_ARCH}"

TOOLCHAIN:pn-atomicbench = "gcc"
TOOLCHAIN:pn-glibc-benchtests = "gcc"
TOOLCHAIN:pn-libffi = "gcc"
TOOLCHAIN:pn-ltp = "gcc"
TOOLCHAIN:pn-lxc = "gcc"
TOOLCHAIN:pn-opensbi = "gcc"
TOOLCHAIN:pn-qemu-test = "gcc"
TOOLCHAIN:pn-softfloat = "gcc"
TOOLCHAIN:pn-sysbench = "gcc"
TOOLCHAIN:pn-testfloat = "gcc"
TOOLCHAIN:pn-valgrind = "gcc"
TOOLCHAIN:pn-zsb = "gcc"
TOOLCHAIN:pn-libsodium = "gcc"
TOOLCHAIN:pn-openmpi = "gcc"
TOOLCHAIN:pn-linux-xuantie = "gcc"
TOOLCHAIN:pn-litmus-tests-riscv = "gcc"
TOOLCHAIN:pn-perf = "gcc"
TOOLCHAIN:pn-dragonwell = "gcc"
TOOLCHAIN:pn-cpufp = "gcc"
TOOLCHAIN:pn-nss = "gcc"
TOOLCHAIN:pn-spec2006-tools = "gcc"

TOOLCHAIN:pn-spec2006 = "clang"
TOOLCHAIN:pn-spec2017 = "clang"
TOOLCHAIN:pn-spdk = "clang"
TOOLCHAIN:pn-dpdk = "clang"
TOOLCHAIN:pn-openmpbench = "clang"
