mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 04:15:44 +03:00
Merge pull request #10403 from haslinghuis/make-tests-with-clang11-linux
This commit is contained in:
commit
d36c62d092
1 changed files with 18 additions and 5 deletions
|
@ -435,9 +435,9 @@ endif
|
||||||
#CC := gcc
|
#CC := gcc
|
||||||
#CXX := g++
|
#CXX := g++
|
||||||
|
|
||||||
# These flags are needed for clang 10 (maybe even clang 9) to make test work
|
# These flags are needed for clang 10 (linux / MacOS) to make test work:
|
||||||
# -Wno-c99-extensions \
|
# -Wno-c99-extensions
|
||||||
# -Wno-reorder
|
# -Wno-reorder
|
||||||
|
|
||||||
COMMON_FLAGS = \
|
COMMON_FLAGS = \
|
||||||
-g \
|
-g \
|
||||||
|
@ -458,11 +458,24 @@ CXX_VERSION = $(shell $(CXX) -dumpversion)
|
||||||
|
|
||||||
ifeq ($(shell $(CC) -v 2>&1 | grep -q "clang version" && echo "clang"),clang)
|
ifeq ($(shell $(CC) -v 2>&1 | grep -q "clang version" && echo "clang"),clang)
|
||||||
|
|
||||||
# Please revisit versions when new clang version arrive. Supported versions: { Linux: 7 - 10; OSX: 7- 12 }
|
# Please revisit versions when new clang version arrive. Supported versions: { Linux: 7 - 11; OSX: 7- 12 }
|
||||||
# Travis reports CC_VERSION of 4.2.1
|
# Travis reports CC_VERSION of 4.2.1
|
||||||
CC_VERSION_MAJOR := $(firstword $(subst ., ,$(CC_VERSION)))
|
CC_VERSION_MAJOR := $(firstword $(subst ., ,$(CC_VERSION)))
|
||||||
CC_VERSION_CHECK_MIN := 7
|
CC_VERSION_CHECK_MIN := 7
|
||||||
CC_VERSION_CHECK_MAX := 10
|
CC_VERSION_CHECK_MAX := 11
|
||||||
|
|
||||||
|
# Added flags for clang 11 (linux) are not backwards compatible:
|
||||||
|
# -fcommon
|
||||||
|
# -Wno-void-pointer-to-int-cast
|
||||||
|
|
||||||
|
ifneq ($(OSFAMILY), macosx)
|
||||||
|
ifeq ($(CC_VERSION_MAJOR), 11)
|
||||||
|
COMMON_FLAGS += \
|
||||||
|
-fcommon \
|
||||||
|
-Wno-void-pointer-to-int-cast
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(OSFAMILY), macosx)
|
ifeq ($(OSFAMILY), macosx)
|
||||||
# MacOS comes with Apple's own flavour of clang that does not adhere to the official versioning
|
# MacOS comes with Apple's own flavour of clang that does not adhere to the official versioning
|
||||||
CC_VERSION_CHECK_MAX := 12
|
CC_VERSION_CHECK_MAX := 12
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue