forked from contiki-ng/contiki-ng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.gcc
38 lines (34 loc) · 1.44 KB
/
Makefile.gcc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# -*- makefile -*-
#
# GCC specific definitions and actions
#
GCC_MAJOR_VERSION := $(shell $(CC) -v 2>&1 | grep "gcc version" | cut -b 13)
GCC_MINOR_VERSION := $(shell $(CC) -v 2>&1 | grep "gcc version" | cut -b 15)
# Warn if using version 6.3.x of arm-none-eabi-gcc
ifeq ("$(CC)","arm-none-eabi-gcc")
ifeq (6,$(GCC_MAJOR_VERSION))
ifeq (3,$(GCC_MINOR_VERSION))
$(warning Warning: you're using a version of $(CC) that may create broken Contiki-NG executables.)
$(warning We recommend to upgrade or downgrade your toolchain.)
endif
endif
endif
# Warn if using anything older than version 6.x of arm-none-eabi-gcc on nrf52840
ifeq ("$(TARGET)","nrf52840")
ifeq ("$(CC)","arm-none-eabi-gcc")
ifeq ($(shell test $(GCC_MAJOR_VERSION) -lt 6; echo $$?),0)
$(warning Warning: you're using a version of $(CC) that is known to create broken Contiki-NG executables for the nRF52840 platform.)
$(warning Issues reported include the inability to perform any radio communication.)
$(warning We recommend to upgrade your toolchain.)
endif
endif
endif
# Warn if using 4.6.x or older msp430-gcc
ifeq ("$(CC)","msp430-gcc")
ifeq ($(shell test $(GCC_MAJOR_VERSION) -lt 5; echo $$?),0)
ifeq ($(shell test $(GCC_MINOR_VERSION) -lt 7; echo $$?),0)
$(warning Warning: you're using an old version of $(CC).)
$(warning Upgrade to 4.7.x is recommended for extended memory support and bugfixes.)
endif
endif
endif