cortex-m7: improve compiler detection

Recent debian testing and ubuntu 15.10 releases contain a
gcc-arm-none-eabi toolchain that returns 0 for the test with -mcpu and
-fsyntax-only, despite not actually supporting cortex-m7.  They then
failed hard on actual compilation steps.

Use the --help=target output instead. tested with old g-a-e 4.7 and
newer releases.
This commit is contained in:
Karl Palsson 2016-02-16 09:47:17 +00:00
parent 6d4a7d1d0c
commit 7545a321b0

View File

@ -56,7 +56,7 @@ Your toolchain doesn't support -mcpu=cortex-m7.
Please use gcc-arm-embedded 4.8 2014q3 or newer. Skipping this sub-library.
endef
ifneq ($(shell $(CC) -fsyntax-only -mcpu=cortex-m7 -mthumb -xc /dev/null 2>&1; echo $$?),0)
ifneq ($($(CC) --help=target | grep -q '\<cortex-m7\>'; echo $$?),0)
$(warning $(MISSING_CPU))
all clean: