+# Similar to build configs, but alias configs are a 4-tuple
+
+# $(1) is an expanded kernel config from a TARGET_CONFIGS_ALIASES_UC tuple
+# $(2) is an expanded arch config from a TARGET_CONFIGS_ALIASES_UC tuple
+# $(3) is an expanded kernel machine config from a TARGET_CONFIGS_ALIASES_UC tuple
+# $(4) is an expanded SoC platform config from a TARGET_CONFIGS_ALIASES_UC tuple,
+# which should be an alias of $(3)
+_function_create_alias_configs_join = $(strip $(1))^$(strip $(2))^$(strip $(3))^$(strip $(4))
+
+_function_create_alias_configs_do_expand = $(call _function_create_alias_configs_join, \
+ $(if $(filter DEFAULT,$(1)), \
+ $(DEFAULT_KERNEL_CONFIG), \
+ $(1) \
+ ), \
+ $(if $(filter DEFAULT,$(2)), \
+ $(DEFAULT_ARCH_CONFIG), \
+ $(2) \
+ ), \
+ $(3), \
+ $(4) \
+ )
+
+function_create_alias_configs = $(sort \
+ $(strip \
+ $(call _function_create_alias_configs_do_expand, \
+ $(word 1,$(1)), \
+ $(word 2,$(1)), \
+ $(word 3,$(1)), \
+ $(word 4,$(1)), \
+ ) \
+ $(if $(word 5,$(1)), \
+ $(call function_create_alias_configs, \
+ $(wordlist 5,$(words $(1)),$(1)) \
+ ), \
+ ) \
+ ) \
+ )
+