Merge pull request #10404 from cladmi/pr/arm/warning_on_ubuntu_bionic_gcc

cortexm.inc.mk: detect 'arm-none-eabi-gcc' from ubuntu bionic
This commit is contained in:
Martine Lenders 2019-01-10 14:44:15 +01:00 committed by GitHub
commit a09dc18b9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,6 +43,32 @@ export USEMODULE += newlib
# set default for CPU_MODEL # set default for CPU_MODEL
export CPU_MODEL ?= $(CPU) export CPU_MODEL ?= $(CPU)
# extract version inside the first parentheses
ARM_GCC_VERSION = $(shell $(TARGET_ARCH)-gcc --version | sed -n '1 s/[^(]*(\([^\)]*\)).*/\1/p')
# Ubuntu bionic gcc-arm-none-eabi compiler is not supported
# Both when using gnu and llvm toolchains
#
# /usr/bin/arm-none-eabi-gcc --version | head -n 1
# arm-none-eabi-gcc (15:6.3.1+svn253039-1build1) 6.3.1 20170620
#
ARM_GCC_UNSUPPORTED += 15:6.3.1% # ubuntu bionic, ignore 'svn' build part
# Should not raise an error on the host system version when building in docker
ifneq (1,$(BUILD_IN_DOCKER))
ifneq (,$(filter $(ARM_GCC_UNSUPPORTED),$(ARM_GCC_VERSION)))
$(warning $(TARGET_ARCH)-gcc version not supported)
$(warning $(shell $(TARGET_ARCH)-gcc --version | head -n 1))
$(warning The currently recommanded version is the one installed in the riotdocker image)
$(warning https://github.com/RIOT-OS/riotdocker/blob/master/Dockerfile)
ifeq (1,$(WERROR))
$(error This check can be ignored by building with 'WERROR=0')
endif # WERROR
endif # ARM_GCC_UNSUPPORTED
endif # BUILD_IN_DOCKER
# Temporary LLVM/Clang Workaround: # Temporary LLVM/Clang Workaround:
# report cortex-m0 instead of cortex-m0plus if llvm/clang (<= 3.6.2) is used # report cortex-m0 instead of cortex-m0plus if llvm/clang (<= 3.6.2) is used
# llvm/clang version 3.6.2 still does not support the cortex-m0plus mcpu type # llvm/clang version 3.6.2 still does not support the cortex-m0plus mcpu type