COMPONENT_SUBMODULES += lib
+ifeq ($(GCC_NOT_5_2_0), 1)
# TODO: annotate fallthroughs in Bluedroid code with comments
CFLAGS += -Wno-implicit-fallthrough
+endif
endif
bluedroid/api \
bluedroid
+ifeq ($(GCC_NOT_5_2_0), 1)
bluedroid/bta/sdp/bta_sdp_act.o: CFLAGS += -Wno-unused-const-variable
bluedroid/btc/core/btc_config.o: CFLAGS += -Wno-unused-const-variable
bluedroid/stack/btm/btm_sec.o: CFLAGS += -Wno-unused-const-variable
bluedroid/stack/smp/smp_keys.o: CFLAGS += -Wno-unused-const-variable
+endif
endif
libcoap/src/debug.o: CFLAGS += -Wno-write-strings
libcoap/src/pdu.o: CFLAGS += -Wno-write-strings
+ifeq ($(GCC_NOT_5_2_0), 1)
# Temporary suppress "fallthrough" warnings until they are fixed in libcoap repo
libcoap/src/option.o: CFLAGS += -Wno-implicit-fallthrough
+endif
COMPONENT_SRCDIRS := expat/expat/lib port
CFLAGS += -DHAVE_EXPAT_CONFIG_H -DHAVE_GETRANDOM
+ifeq ($(GCC_NOT_5_2_0), 1)
# Temporary suppress "fallthrough" warnings until they are fixed in expat repo
CFLAGS += -Wno-implicit-fallthrough
-
+endif
COMPONENT_SUBMODULES += expat
# randombytes.c needs to pull in platform-specific implementation
$(LSRC)/randombytes/randombytes.o: CFLAGS+=-DRANDOMBYTES_DEFAULT_IMPLEMENTATION
+ifeq ($(GCC_NOT_5_2_0), 1)
# Temporary suppress "fallthrough" warnings until they are fixed in libsodium repo
$(LSRC)/crypto_shorthash/siphash24/ref/shorthash_siphashx24_ref.o: CFLAGS += -Wno-implicit-fallthrough
$(LSRC)/crypto_shorthash/siphash24/ref/shorthash_siphash24_ref.o: CFLAGS += -Wno-implicit-fallthrough
+endif
endif
CFLAGS += -Wno-address # lots of LWIP source files evaluate macros that check address of stack variables
+
+ifeq ($(GCC_NOT_5_2_0), 1)
+else
+netif/ppp/pppos.o: CFLAGS += -Wno-type-limits
+endif
\ No newline at end of file
# Main Makefile. This is basically the same as a component makefile.
#
+ifeq ($(GCC_NOT_5_2_0), 1)
hid_device_le_prf.o: CFLAGS += -Wno-unused-const-variable
+endif
\ No newline at end of file
-Wno-error=unused-function \
-Wno-error=unused-but-set-variable \
-Wno-error=unused-variable \
- -Wno-error=unused-const-variable \
-Wno-error=deprecated-declarations \
-Wextra \
-Wno-unused-parameter -Wno-sign-compare
-Wno-int-in-bool-context
endif
-
ifdef CONFIG_WARN_WRITE_STRINGS
COMMON_WARNING_FLAGS += -Wwrite-strings
endif #CONFIG_WARN_WRITE_STRINGS
SIZE := $(call dequote,$(CONFIG_TOOLPREFIX))size
export CC CXX LD AR OBJCOPY SIZE
+COMPILER_VERSION_STR := $(shell $(CC) -dumpversion)
+COMPILER_VERSION_NUM := $(subst .,,$(COMPILER_VERSION_STR))
+GCC_NOT_5_2_0 := $(shell expr $(COMPILER_VERSION_STR) != "5.2.0")
+export COMPILER_VERSION_STR COMPILER_VERSION_NUM GCC_NOT_5_2_0
+
+CPPFLAGS += -DGCC_NOT_5_2_0=$(GCC_NOT_5_2_0)
+export CPPFLAGS
+
PYTHON=$(call dequote,$(CONFIG_PYTHON))
# the app is the main executable built by the project
# Check toolchain version using the output of xtensa-esp32-elf-gcc --version command.
# The output normally looks as follows
# xtensa-esp32-elf-gcc (crosstool-NG crosstool-ng-1.22.0-80-g6c4433a) 5.2.0
-# The part in brackets is extracted into TOOLCHAIN_COMMIT_DESC variable,
-# the part after the brackets is extracted into TOOLCHAIN_GCC_VER.
+# The part in brackets is extracted into TOOLCHAIN_COMMIT_DESC variable
ifdef CONFIG_TOOLPREFIX
ifndef MAKE_RESTARTS
TOOLCHAIN_HEADER := $(shell $(CC) --version | head -1)
TOOLCHAIN_PATH := $(shell which $(CC))
TOOLCHAIN_COMMIT_DESC := $(shell $(CC) --version | sed -E -n 's|.*\(crosstool-NG (.*)\).*|\1|gp')
-TOOLCHAIN_GCC_VER := $(shell $(CC) --version | sed -E -n 's|xtensa-esp32-elf-gcc.*\ \(.*\)\ (.*)|\1|gp')
+TOOLCHAIN_GCC_VER := $(COMPILER_VERSION_STR)
# Officially supported version(s)
include $(IDF_PATH)/tools/toolchain_versions.mk
# Ignore the next messages:
# "error.o" or "-Werror" in compiler's command line
# "reassigning to symbol" or "changes choice state" in sdkconfig
-sort -u "${LOG_SUSPECTED}" | \
-grep -v "library/error\.o\|\ -Werror\|error\.d\|reassigning to symbol\|changes choice state" \
+# Compiler and toochain versions is not supported from make/project.mk
+IGNORE_WARNS="\
+library/error\.o\
+\|\ -Werror\|error\.d\
+\|reassigning to symbol\
+\|changes choice state\
+\|Compiler version is not supported\
+\|Toolchain version is not supported\
+"
+
+sort -u "${LOG_SUSPECTED}" | grep -v "${IGNORE_WARNS}" \
&& RESULT=$RESULT_ISSUES \
|| echo -e "\tNone"
# Component Makefile
#
+ifeq ($(GCC_NOT_5_2_0), 1)
unity.o: CFLAGS += -Wno-unused-const-variable
+endif
\ No newline at end of file