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
This commit is contained in:
Fabián González Martín 2021-02-28 17:01:16 +01:00 committed by GitHub
parent ef49a9243b
commit 90c7ae70c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -108,6 +108,10 @@ endif
CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
CFLAGS += $(CSTANDARD) CFLAGS += $(CSTANDARD)
# This fixes lots of keyboards linking errors but SHOULDN'T BE A FINAL SOLUTION
# Fixing of multiple variable definitions must be made.
CFLAGS += -fcommon
#---------------- Compiler Options C++ ---------------- #---------------- Compiler Options C++ ----------------
# -g*: generate debugging information # -g*: generate debugging information
# -O*: optimization level # -O*: optimization level
@ -124,6 +128,7 @@ CXXFLAGS += -O$(OPT)
CXXFLAGS += -w CXXFLAGS += -w
CXXFLAGS += -Wall CXXFLAGS += -Wall
CXXFLAGS += -Wundef CXXFLAGS += -Wundef
ifneq ($(strip $(ALLOW_WARNINGS)), yes) ifneq ($(strip $(ALLOW_WARNINGS)), yes)
CXXFLAGS += -Werror CXXFLAGS += -Werror
endif endif