From 45a24964cae33d68dd55ef4528872f2a3c809996 Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Tue, 9 Feb 2021 10:45:03 +0100 Subject: [PATCH] build system: fix FEATURES_REQUIRED_ANY Previously, FEATURES_REQUIRED_ANY didn't honor the order of the alternatives provided, if none of the features were already in used and multiple options are provided. This fixes this. (cherry picked from commit f41dcc9a8dea620a3f400b95d09752e29d0d7660) --- makefiles/features_check.inc.mk | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/makefiles/features_check.inc.mk b/makefiles/features_check.inc.mk index 62ba37bedaea..90b443bb3651 100644 --- a/makefiles/features_check.inc.mk +++ b/makefiles/features_check.inc.mk @@ -32,10 +32,9 @@ FEATURES_USABLE := $(filter-out $(FEATURES_BLACKLIST),$(FEATURES_PROVIDED)) FEATURES_REQUIRED_ONE_OUT_OF := $(foreach item,\ $(FEATURES_REQUIRED_ANY),\ $(word 1,\ - $(filter $(subst |, ,$(item)),\ - $(FEATURES_USED_SO_FAR) \ - $(FEATURES_USABLE)) \ - $(item))) + $(filter $(FEATURES_USED_SO_FAR) $(FEATURES_USABLE),\ + $(subst |, ,$(item)))\ + $(item))) # Features that are required by the application but not provided by the BSP # Having features missing may case the build to fail.