[Make][Tools] Reliably get the compiler version

If the user didn't have ARM SDK in the ./tools path, then previously they
would not get the compiler version string.
This commit is contained in:
Kenn Sebesta 2022-03-23 12:52:48 -04:00
parent c348120325
commit a36e439158
1 changed files with 5 additions and 3 deletions

View File

@ -225,9 +225,6 @@ endif
ifneq ("$(wildcard $(ARM_SDK_DIR))","")
ARM_SDK_PREFIX := $(ARM_SDK_DIR)/bin/arm-none-eabi-
# Get the ARM GCC version
ARM_GCC_VERSION := $(shell $(ARM_SDK_PREFIX)gcc -dumpversion)
else
ifneq ($(MAKECMDGOALS),arm_sdk_install)
$(info **WARNING** ARM-SDK not in $(ARM_SDK_DIR) Please run 'make arm_sdk_install')
@ -237,6 +234,11 @@ else
endif
# Get the ARM GCC version
ifneq ("$(ARM_SDK_PREFIX)","")
ARM_GCC_VERSION := $(shell $(ARM_SDK_PREFIX)gcc -dumpversion)
endif
# Get the git branch name, commit hash, and clean/dirty state
GIT_BRANCH_NAME := $(shell git rev-parse --abbrev-ref HEAD)
GIT_COMMIT_HASH := $(shell git rev-parse --short HEAD)