Skip to content

Commit

Permalink
toolchain/gnu.inc.mk: don't check version if CC is not installed
Browse files Browse the repository at this point in the history
With b30efee 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
  • Loading branch information
miri64 committed Jan 13, 2023
1 parent 89ef35f commit 212933f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion makefiles/toolchain/gnu.inc.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit 212933f

Please sign in to comment.