2021-11-16 20:46:21 +00:00
|
|
|
#!/bin/sh
|
2022-02-25 10:15:45 +00:00
|
|
|
eval "$(grep CONFIG_GCC_VERSION .config)"
|
2021-11-16 20:46:21 +00:00
|
|
|
CONFIG_TOOLCHAIN_BUILD_VER="$CONFIG_GCC_VERSION-$(cat toolchain/build_version)"
|
|
|
|
touch .toolchain_build_ver
|
2022-02-24 16:37:45 +00:00
|
|
|
CURRENT_TOOLCHAIN_BUILD_VER="$(cat .toolchain_build_ver)"
|
|
|
|
[ -z "$CURRENT_TOOLCHAIN_BUILD_VER" ] && {
|
|
|
|
echo "$CONFIG_TOOLCHAIN_BUILD_VER" > .toolchain_build_ver
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
[ "$CONFIG_TOOLCHAIN_BUILD_VER" = "$CURRENT_TOOLCHAIN_BUILD_VER" ] && exit 0
|
|
|
|
echo "Toolchain build version changed ($CONFIG_TOOLCHAIN_BUILD_VER != $CURRENT_TOOLCHAIN_BUILD_VER), running make targetclean"
|
2021-11-16 20:46:21 +00:00
|
|
|
make targetclean
|
|
|
|
echo "$CONFIG_TOOLCHAIN_BUILD_VER" > .toolchain_build_ver
|
|
|
|
exit 0
|