From ddecc1441dfd84078433f3cf74d5c71cc05892a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Br=C3=BCns?= Date: Wed, 8 Mar 2017 04:55:31 +0100 Subject: [PATCH] Makefile: Fix linker error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instantiation of the static singleton instance thermalManager in general requires locking, but we know its safe to do without. Add -fno-threadsafe-statics to avoid using locking primitives, which result in linking errors: undefined reference to `__cxa_guard_acquire' undefined reference to `__cxa_guard_release' Signed-off-by: Stefan BrĂ¼ns --- Marlin/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/Makefile b/Marlin/Makefile index 81eeceada..cfe64ed2b 100644 --- a/Marlin/Makefile +++ b/Marlin/Makefile @@ -393,7 +393,7 @@ ifneq ($(HARDWARE_MOTHERBOARD),) CTUNING += -DMOTHERBOARD=${HARDWARE_MOTHERBOARD} endif #CEXTRA = -Wa,-adhlns=$(<:.c=.lst) -CEXTRA = -fno-use-cxa-atexit +CEXTRA = -fno-use-cxa-atexit -fno-threadsafe-statics CFLAGS := $(CDEBUG) $(CDEFS) $(CINCS) -O$(OPT) $(CWARN) $(CEXTRA) $(CTUNING) $(CSTANDARD) CXXFLAGS := $(CDEFS) $(CINCS) -O$(OPT) -Wall $(CEXTRA) $(CTUNING) $(CXXSTANDARD)