summaryrefslogtreecommitdiff
path: root/tmk_core/native.mk
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2021-08-29 08:20:25 +1000
committerNick Brassel <nick@tzarc.org>2021-08-29 08:20:25 +1000
commitf061ca497464fe85284906fb163a33eaee7a91ef (patch)
tree33ef1bfb529aed382e8526c607c4e18717f92571 /tmk_core/native.mk
parentff65185dec6f97be1eb49f17cea526a0d0bbf3d6 (diff)
parent4bad375d7c09d949a9dcdd4feba147c9c7a67ec6 (diff)
downloadqmk_firmware-f061ca497464fe85284906fb163a33eaee7a91ef.tar.gz
qmk_firmware-f061ca497464fe85284906fb163a33eaee7a91ef.zip
Breaking changes develop merge to master, 2021Q3 edition. (#14196)
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 3caf644546..f609fd0e6f 100644
--- a/tmk_core/native.mk
+++ b/tmk_core/native.mk
@@ -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)