diff options
author | Fabián González Martín <61802930+FabSchwul@users.noreply.github.com> | 2021-02-28 17:01:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-28 08:01:16 -0800 |
commit | 90c7ae70c68662c671ee1026d1c5abe67026c473 (patch) | |
tree | 5379b2915d3899e718e42cd0987c4c0f7e16f177 | |
parent | ef49a9243b15cade7bec006f90cd0457c247e000 (diff) | |
download | qmk_firmware-90c7ae70c68662c671ee1026d1c5abe67026c473.tar.gz qmk_firmware-90c7ae70c68662c671ee1026d1c5abe67026c473.zip |
Modified tmk_core/rules.mk to avoid linking errors (#10728)
* Modified tmk_core/rules.mk to avoid linking errors
Added -fcommon flag to avoid linking errors due to multiple variable definitions. Though this is neither a definitive nor good solution, proper changes and use of extern keyword to avoid those multiple definitions must be made
* Comment updated
-rw-r--r-- | tmk_core/rules.mk | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index f5f758943..bbcfc1e4d 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk | |||
@@ -108,6 +108,10 @@ endif | |||
108 | CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) | 108 | CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) |
109 | CFLAGS += $(CSTANDARD) | 109 | CFLAGS += $(CSTANDARD) |
110 | 110 | ||
111 | # This fixes lots of keyboards linking errors but SHOULDN'T BE A FINAL SOLUTION | ||
112 | # Fixing of multiple variable definitions must be made. | ||
113 | CFLAGS += -fcommon | ||
114 | |||
111 | #---------------- Compiler Options C++ ---------------- | 115 | #---------------- Compiler Options C++ ---------------- |
112 | # -g*: generate debugging information | 116 | # -g*: generate debugging information |
113 | # -O*: optimization level | 117 | # -O*: optimization level |
@@ -124,6 +128,7 @@ CXXFLAGS += -O$(OPT) | |||
124 | CXXFLAGS += -w | 128 | CXXFLAGS += -w |
125 | CXXFLAGS += -Wall | 129 | CXXFLAGS += -Wall |
126 | CXXFLAGS += -Wundef | 130 | CXXFLAGS += -Wundef |
131 | |||
127 | ifneq ($(strip $(ALLOW_WARNINGS)), yes) | 132 | ifneq ($(strip $(ALLOW_WARNINGS)), yes) |
128 | CXXFLAGS += -Werror | 133 | CXXFLAGS += -Werror |
129 | endif | 134 | endif |