1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Makefile.include: add output for unsupported toolchains

Assuming `TOOLCHAIN_SUPPORTED` is provided by the board and
`TOOLCHAIN_BLACKLIST` by a module or `pkg`, this outputs the fact that
a toolchain is not supported or blacklisted in a similar manner as
(un-)supported features and boards are.
This commit is contained in:
Martine Lenders 2018-08-07 16:22:49 +02:00
parent e2d2a479bf
commit 814a7c3a21

View File

@ -245,6 +245,9 @@ include $(RIOTBOARD)/$(BOARD)/Makefile.include
INCLUDES += -I$(RIOTCPU)/$(CPU)/include
include $(RIOTCPU)/$(CPU)/Makefile.include
# Assume GCC/GNU as supported toolchain if CPU's Makefile.include doesn't
# provide this macro
TOOLCHAINS_SUPPORTED ?= gnu
# Import all toolchain settings
include $(RIOTMAKE)/toolchain/$(TOOLCHAIN).inc.mk
@ -592,6 +595,20 @@ ifneq (, $(filter all, $(if $(MAKECMDGOALS), $(MAKECMDGOALS), all)))
endif
endif
# test if toolchain is supported.
ifeq (,$(filter $(TOOLCHAIN),$(TOOLCHAINS_SUPPORTED)))
$(shell $(COLOR_ECHO) "$(COLOR_RED)The selected TOOLCHAIN=$(TOOLCHAIN) is not supported.$(COLOR_RESET)\nSupported toolchains: $(TOOLCHAINS_SUPPORTED)" 1>&2)
EXPECT_ERRORS := 1
endif
# If there is a blacklist, then test if the board is blacklisted.
ifneq (,$(TOOLCHAINS_BLACKLIST))
ifneq (,$(filter $(TOOLCHAIN),$(TOOLCHAINS_BLACKLIST)))
$(shell $(COLOR_ECHO) "$(COLOR_RED)The selected TOOLCHAIN=$(TOOLCHAIN) is blacklisted:$(COLOR_RESET) $(TOOLCHAINS_BLACKLIST)" 1>&2)
EXPECT_ERRORS := 1
endif
endif
ifneq (, $(EXPECT_CONFLICT))
$(shell $(COLOR_ECHO) "\n$(COLOR_YELLOW)EXPECT undesired behaviour!$(COLOR_RESET)" 1>&2)
endif