From c5b29916ebb2ca41d58c277c9eb3b83b7f745ed2 Mon Sep 17 00:00:00 2001 From: Leandro Lanzieri Date: Mon, 15 Nov 2021 09:40:01 +0100 Subject: [PATCH] makefile.dep: require arch_ cpu_core_ features first --- Makefile.dep | 6 ------ Makefile.include | 5 +++++ makefiles/info-global.inc.mk | 4 ++++ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Makefile.dep b/Makefile.dep index 8a8adb2116..e654862740 100644 --- a/Makefile.dep +++ b/Makefile.dep @@ -93,12 +93,6 @@ ifneq (1, $(RIOTBOOT_BUILD)) FEATURES_OPTIONAL += periph_pm endif -# always select provided architecture features -FEATURES_REQUIRED += $(filter arch_%,$(FEATURES_PROVIDED)) - -# always select CPU core features -FEATURES_REQUIRED += $(filter cpu_core_%,$(FEATURES_PROVIDED)) - # don't use idle thread if architecture has needed support FEATURES_OPTIONAL += no_idle_thread diff --git a/Makefile.include b/Makefile.include index 461b8db59d..79b3e2b018 100644 --- a/Makefile.include +++ b/Makefile.include @@ -406,6 +406,11 @@ ifeq (1,$(TEST_KCONFIG)) KCONFIG_PACKAGES := $(call lowercase,$(patsubst CONFIG_PACKAGE_%,%,$(filter CONFIG_PACKAGE_%,$(.VARIABLES)))) USEPKG := $(KCONFIG_PACKAGES) else + # always select provided architecture features + FEATURES_REQUIRED += $(filter arch_%,$(FEATURES_PROVIDED)) + # always select CPU core features + FEATURES_REQUIRED += $(filter cpu_core_%,$(FEATURES_PROVIDED)) + # check if required features are provided and update $(FEATURES_USED) include $(RIOTMAKE)/features_check.inc.mk diff --git a/makefiles/info-global.inc.mk b/makefiles/info-global.inc.mk index b14a867ce8..59150a34a6 100644 --- a/makefiles/info-global.inc.mk +++ b/makefiles/info-global.inc.mk @@ -47,6 +47,10 @@ define board_unsatisfied_features undefine CPU_FAM include $(RIOTBASE)/Makefile.features + # always select provided architecture features + FEATURES_REQUIRED += $$(filter arch_%,$$(FEATURES_PROVIDED)) + # always select CPU core features + FEATURES_REQUIRED += $$(filter cpu_core_%,$$(FEATURES_PROVIDED)) # FEATURES_USED must be populated first in this case so that dependency # resolution can take optional features into account during the first pass. # Also: This allows us to skip resolution if already a missing feature is