diff options
Diffstat (limited to 'tmk_core/rules.mk')
-rw-r--r-- | tmk_core/rules.mk | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index 597f7aa82..5a7f29910 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk | |||
@@ -105,7 +105,10 @@ endif | |||
105 | #CFLAGS += -Wundef | 105 | #CFLAGS += -Wundef |
106 | #CFLAGS += -Wunreachable-code | 106 | #CFLAGS += -Wunreachable-code |
107 | #CFLAGS += -Wsign-compare | 107 | #CFLAGS += -Wsign-compare |
108 | GCC_VERSION := $(shell gcc --version 2>/dev/null) | ||
109 | ifeq ($(findstring clang, ${GCC_VERSION}),) | ||
108 | CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) | 110 | CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) |
111 | endif | ||
109 | CFLAGS += $(CSTANDARD) | 112 | CFLAGS += $(CSTANDARD) |
110 | 113 | ||
111 | # This fixes lots of keyboards linking errors but SHOULDN'T BE A FINAL SOLUTION | 114 | # This fixes lots of keyboards linking errors but SHOULDN'T BE A FINAL SOLUTION |
@@ -137,7 +140,9 @@ endif | |||
137 | #CXXFLAGS += -Wstrict-prototypes | 140 | #CXXFLAGS += -Wstrict-prototypes |
138 | #CXXFLAGS += -Wunreachable-code | 141 | #CXXFLAGS += -Wunreachable-code |
139 | #CXXFLAGS += -Wsign-compare | 142 | #CXXFLAGS += -Wsign-compare |
143 | ifeq ($(findstring clang, ${GCC_VERSION}),) | ||
140 | CXXFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) | 144 | CXXFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) |
145 | endif | ||
141 | #CXXFLAGS += $(CSTANDARD) | 146 | #CXXFLAGS += $(CSTANDARD) |
142 | 147 | ||
143 | #---------------- Assembler Options ---------------- | 148 | #---------------- Assembler Options ---------------- |
@@ -150,11 +155,13 @@ CXXFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) | |||
150 | # -listing-cont-lines: Sets the maximum number of continuation lines of hex | 155 | # -listing-cont-lines: Sets the maximum number of continuation lines of hex |
151 | # dump that will be displayed for a given single line of source input. | 156 | # dump that will be displayed for a given single line of source input. |
152 | ASFLAGS += $(ADEFS) | 157 | ASFLAGS += $(ADEFS) |
158 | ifeq ($(findstring clang, ${GCC_VERSION}),) | ||
153 | ifeq ($(strip $(DEBUG_ENABLE)),yes) | 159 | ifeq ($(strip $(DEBUG_ENABLE)),yes) |
154 | ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100 | 160 | ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100 |
155 | else | 161 | else |
156 | ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),--listing-cont-lines=100 | 162 | ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),--listing-cont-lines=100 |
157 | endif | 163 | endif |
164 | endif | ||
158 | ifeq ($(VERBOSE_AS_CMD),yes) | 165 | ifeq ($(VERBOSE_AS_CMD),yes) |
159 | ASFLAGS += -v | 166 | ASFLAGS += -v |
160 | endif | 167 | endif |