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

toolchain/gnu.inc.mk: don't check version if CC is not installed

With b30efeeb65 a warning was introduced when using `make term` without
the proper toolchain installed (e.g. when using BUILD_IN_DOCKER, but
`term` outside of the docker). This removes this warning
This commit is contained in:
Martine Lenders 2023-01-13 11:44:06 +01:00
parent 89ef35f9c6
commit 212933f080
No known key found for this signature in database
GPG Key ID: 2134D77A5336DD80

View File

@ -23,7 +23,7 @@ endif
_OBJDUMP := $(or $(shell command -v $(PREFIX)objdump || command -v gobjdump),objdump)
OBJDUMP ?= $(_OBJDUMP)
GCC_VERSION := $(shell $(CC) -dumpversion | cut -d . -f 1)
GCC_VERSION := $(shell command -v $(CC) > /dev/null && $(CC) -dumpversion | cut -d . -f 1)
# -fmacro-prefix-map requires GCC 8
ifneq (8, $(firstword $(shell echo 8 $(GCC_VERSION) | tr ' ' '\n' | sort -n)))