diff options
author | Felix Fietkau <nbd@nbd.name> | 2021-11-16 12:46:21 -0800 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-11-16 22:02:45 +0100 |
commit | db34b93331e91bdb2cbc15d17632aaaab7217a6d (patch) | |
tree | 5c2a610d3cf7ad7a033c64c28494f1c31bfd9510 /Makefile | |
parent | 0c249ab07645489088c9010bb528b637356aa052 (diff) | |
download | openwrt-db34b93331e91bdb2cbc15d17632aaaab7217a6d.tar.gz openwrt-db34b93331e91bdb2cbc15d17632aaaab7217a6d.tar.bz2 openwrt-db34b93331e91bdb2cbc15d17632aaaab7217a6d.zip |
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>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 17 |
1 files changed, 13 insertions, 4 deletions
@@ -38,7 +38,7 @@ else include tools/Makefile include toolchain/Makefile -$(toolchain/stamp-compile): $(tools/stamp-compile) +$(toolchain/stamp-compile): $(tools/stamp-compile) $(if $(CONFIG_BUILDBOT),toolchain_rebuild_check) $(target/stamp-compile): $(toolchain/stamp-compile) $(tools/stamp-compile) $(BUILD_DIR)/.prepared $(package/stamp-compile): $(target/stamp-compile) $(package/stamp-cleanup) $(package/stamp-install): $(package/stamp-compile) @@ -50,14 +50,23 @@ printdb: prepare: $(target/stamp-compile) -clean: FORCE +_clean: FORCE rm -rf $(BUILD_DIR) $(STAGING_DIR) $(BIN_DIR) $(OUTPUT_DIR)/packages/$(ARCH_PACKAGES) $(BUILD_LOG_DIR) $(TOPDIR)/staging_dir/packages -dirclean: clean - rm -rf $(STAGING_DIR_HOST) $(STAGING_DIR_HOSTPKG) $(TOOLCHAIN_DIR) $(BUILD_DIR_BASE)/host $(BUILD_DIR_BASE)/hostpkg $(BUILD_DIR_TOOLCHAIN) +clean: _clean + rm -rf $(BUILD_LOG_DIR) + +targetclean: _clean + rm -rf $(TOOLCHAIN_DIR) $(BUILD_DIR_BASE)/hostpkg $(BUILD_DIR_TOOLCHAIN) + +dirclean: targetclean clean + rm -rf $(STAGING_DIR_HOST) $(STAGING_DIR_HOSTPKG) $(BUILD_DIR_BASE)/host rm -rf $(TMP_DIR) $(MAKE) -C $(TOPDIR)/scripts/config clean +toolchain_rebuild_check: + $(SCRIPT_DIR)/check-toolchain-clean.sh + cacheclean: ifneq ($(CONFIG_CCACHE),) $(STAGING_DIR_HOST)/bin/ccache -C |