Merge pull request #16114 from fjmolinas/pr_picolibc_fail

makefiles/libc/picolibc.mk: only fail when building
This commit is contained in:
Martine Lenders 2021-03-01 15:22:02 +01:00 committed by GitHub
commit d6c4cd0a26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,13 +7,19 @@ ifneq (,$(filter picolibc,$(USEMODULE)))
LINKFLAGS += -Wl,--no-wchar-size-warning LINKFLAGS += -Wl,--no-wchar-size-warning
endif endif
else else
$(warning picolibc was selected to be build but no picolibc.spec could be found) BUILDDEPS += _missing-picolibc
$(warning you might want to install "picolibc" for "$(TARGET_ARCH)")
$(warning or add "FEATURES_BLACKLIST += picolibc" to Makefile)
$(error check your installation or build configuration.)
endif endif
endif endif
.PHONY: _missing-picolibc
_missing-picolibc:
@$(Q)echo "picolibc was selected to be build but no picolibc.spec could be found"
@$(Q)echo "you might want to install "picolibc" for "$(TARGET_ARCH)""
@$(Q)echo "or add "FEATURES_BLACKLIST += picolibc" to Makefile)"
@$(COLOR_ECHO) "$(COLOR_RED)check your installation or build configuration."
@$(Q)exit 1
ifeq (1,$(USE_PICOLIBC)) ifeq (1,$(USE_PICOLIBC))
LINKFLAGS += -specs=picolibc.specs LINKFLAGS += -specs=picolibc.specs
CFLAGS += -specs=picolibc.specs CFLAGS += -specs=picolibc.specs