toolchain: add a version that can be bumped to force toolchain/target rebuild
This can be used to ensure that the compiled code is up to date, when something important changes in the toolchain. A recent example of this is the gcc 11 fix for a code miscompilation issue Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
9
scripts/check-toolchain-clean.sh
Executable file
9
scripts/check-toolchain-clean.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
eval `grep CONFIG_GCC_VERSION .config`
|
||||
CONFIG_TOOLCHAIN_BUILD_VER="$CONFIG_GCC_VERSION-$(cat toolchain/build_version)"
|
||||
touch .toolchain_build_ver
|
||||
[ "$CONFIG_TOOLCHAIN_BUILD_VER" = "$(cat .toolchain_build_ver)" ] && exit 0
|
||||
echo "Toolchain build version changed, running make targetclean"
|
||||
make targetclean
|
||||
echo "$CONFIG_TOOLCHAIN_BUILD_VER" > .toolchain_build_ver
|
||||
exit 0
|
||||
Reference in New Issue
Block a user