Skip to content

Commit

Permalink
Modified tmk_core/rules.mk to avoid linking errors (#10728)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
FabSchwul authored Feb 28, 2021
1 parent ef49a92 commit 90c7ae7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tmk_core/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ endif
CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst)
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++ ----------------
# -g*: generate debugging information
# -O*: optimization level
Expand All @@ -124,6 +128,7 @@ CXXFLAGS += -O$(OPT)
CXXFLAGS += -w
CXXFLAGS += -Wall
CXXFLAGS += -Wundef

ifneq ($(strip $(ALLOW_WARNINGS)), yes)
CXXFLAGS += -Werror
endif
Expand Down

0 comments on commit 90c7ae7

Please sign in to comment.