From 90c7ae70c68662c671ee1026d1c5abe67026c473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabi=C3=A1n=20Gonz=C3=A1lez=20Mart=C3=ADn?= <61802930+FabSchwul@users.noreply.github.com> Date: Sun, 28 Feb 2021 17:01:16 +0100 Subject: [PATCH] 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 --- tmk_core/rules.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index f5f758943e..bbcfc1e4d1 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -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 @@ -124,6 +128,7 @@ CXXFLAGS += -O$(OPT) CXXFLAGS += -w CXXFLAGS += -Wall CXXFLAGS += -Wundef + ifneq ($(strip $(ALLOW_WARNINGS)), yes) CXXFLAGS += -Werror endif