diff options
author | Donald Kjer <don.kjer@gmail.com> | 2021-08-17 14:12:12 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-18 07:12:12 +1000 |
commit | 483691dd73e5260fac958c524e0a12e705db43f6 (patch) | |
tree | 8a044839de7c6906e021a54abe5ee2bc15dbf507 /tmk_core/native.mk | |
parent | 857716794b233f3d4ac078c85a5a142091264aa6 (diff) | |
download | qmk_firmware-483691dd73e5260fac958c524e0a12e705db43f6.tar.gz qmk_firmware-483691dd73e5260fac958c524e0a12e705db43f6.zip |
Fixes for clang not being able to run unit tests (#13546)
Diffstat (limited to 'tmk_core/native.mk')
-rw-r--r-- | tmk_core/native.mk | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tmk_core/native.mk b/tmk_core/native.mk index 3caf64454..f609fd0e6 100644 --- a/tmk_core/native.mk +++ b/tmk_core/native.mk | |||
@@ -1,4 +1,5 @@ | |||
1 | SYSTEM_TYPE := $(shell gcc -dumpmachine) | 1 | SYSTEM_TYPE := $(shell gcc -dumpmachine) |
2 | GCC_VERSION := $(shell gcc --version 2>/dev/null) | ||
2 | 3 | ||
3 | CC = gcc | 4 | CC = gcc |
4 | OBJCOPY = | 5 | OBJCOPY = |
@@ -12,7 +13,9 @@ BIN = | |||
12 | 13 | ||
13 | 14 | ||
14 | COMPILEFLAGS += -funsigned-char | 15 | COMPILEFLAGS += -funsigned-char |
16 | ifeq ($(findstring clang, ${GCC_VERSION}),) | ||
15 | COMPILEFLAGS += -funsigned-bitfields | 17 | COMPILEFLAGS += -funsigned-bitfields |
18 | endif | ||
16 | COMPILEFLAGS += -ffunction-sections | 19 | COMPILEFLAGS += -ffunction-sections |
17 | COMPILEFLAGS += -fdata-sections | 20 | COMPILEFLAGS += -fdata-sections |
18 | COMPILEFLAGS += -fshort-enums | 21 | COMPILEFLAGS += -fshort-enums |
@@ -21,7 +24,9 @@ COMPILEFLAGS += -mno-ms-bitfields | |||
21 | endif | 24 | endif |
22 | 25 | ||
23 | CFLAGS += $(COMPILEFLAGS) | 26 | CFLAGS += $(COMPILEFLAGS) |
27 | ifeq ($(findstring clang, ${GCC_VERSION}),) | ||
24 | CFLAGS += -fno-inline-small-functions | 28 | CFLAGS += -fno-inline-small-functions |
29 | endif | ||
25 | CFLAGS += -fno-strict-aliasing | 30 | CFLAGS += -fno-strict-aliasing |
26 | 31 | ||
27 | CXXFLAGS += $(COMPILEFLAGS) | 32 | CXXFLAGS += $(COMPILEFLAGS) |