aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/native.mk
diff options
context:
space:
mode:
authorDonald Kjer <don.kjer@gmail.com>2021-08-17 14:12:12 -0700
committerGitHub <noreply@github.com>2021-08-18 07:12:12 +1000
commit483691dd73e5260fac958c524e0a12e705db43f6 (patch)
tree8a044839de7c6906e021a54abe5ee2bc15dbf507 /tmk_core/native.mk
parent857716794b233f3d4ac078c85a5a142091264aa6 (diff)
downloadqmk_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.mk5
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 @@
1SYSTEM_TYPE := $(shell gcc -dumpmachine) 1SYSTEM_TYPE := $(shell gcc -dumpmachine)
2GCC_VERSION := $(shell gcc --version 2>/dev/null)
2 3
3CC = gcc 4CC = gcc
4OBJCOPY = 5OBJCOPY =
@@ -12,7 +13,9 @@ BIN =
12 13
13 14
14COMPILEFLAGS += -funsigned-char 15COMPILEFLAGS += -funsigned-char
16ifeq ($(findstring clang, ${GCC_VERSION}),)
15COMPILEFLAGS += -funsigned-bitfields 17COMPILEFLAGS += -funsigned-bitfields
18endif
16COMPILEFLAGS += -ffunction-sections 19COMPILEFLAGS += -ffunction-sections
17COMPILEFLAGS += -fdata-sections 20COMPILEFLAGS += -fdata-sections
18COMPILEFLAGS += -fshort-enums 21COMPILEFLAGS += -fshort-enums
@@ -21,7 +24,9 @@ COMPILEFLAGS += -mno-ms-bitfields
21endif 24endif
22 25
23CFLAGS += $(COMPILEFLAGS) 26CFLAGS += $(COMPILEFLAGS)
27ifeq ($(findstring clang, ${GCC_VERSION}),)
24CFLAGS += -fno-inline-small-functions 28CFLAGS += -fno-inline-small-functions
29endif
25CFLAGS += -fno-strict-aliasing 30CFLAGS += -fno-strict-aliasing
26 31
27CXXFLAGS += $(COMPILEFLAGS) 32CXXFLAGS += $(COMPILEFLAGS)