Fixes for clang not being able to run unit tests (#13546)
This commit is contained in:
parent
857716794b
commit
483691dd73
2 changed files with 12 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
SYSTEM_TYPE := $(shell gcc -dumpmachine)
|
||||
GCC_VERSION := $(shell gcc --version 2>/dev/null)
|
||||
|
||||
CC = gcc
|
||||
OBJCOPY =
|
||||
|
@ -12,7 +13,9 @@ BIN =
|
|||
|
||||
|
||||
COMPILEFLAGS += -funsigned-char
|
||||
ifeq ($(findstring clang, ${GCC_VERSION}),)
|
||||
COMPILEFLAGS += -funsigned-bitfields
|
||||
endif
|
||||
COMPILEFLAGS += -ffunction-sections
|
||||
COMPILEFLAGS += -fdata-sections
|
||||
COMPILEFLAGS += -fshort-enums
|
||||
|
@ -21,7 +24,9 @@ COMPILEFLAGS += -mno-ms-bitfields
|
|||
endif
|
||||
|
||||
CFLAGS += $(COMPILEFLAGS)
|
||||
ifeq ($(findstring clang, ${GCC_VERSION}),)
|
||||
CFLAGS += -fno-inline-small-functions
|
||||
endif
|
||||
CFLAGS += -fno-strict-aliasing
|
||||
|
||||
CXXFLAGS += $(COMPILEFLAGS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue