From ba2d4a0d116fc082e2b93af06ec57deb3e87f99a Mon Sep 17 00:00:00 2001
From: Joakim Gebart <joakim.gebart@eistec.se>
Date: Sat, 30 May 2015 11:25:43 +0200
Subject: [PATCH] cortexm: Make linker warnings fatal

Linker warnings usually means something does not get placed where it is
supposed to and the most likely result is a broken binary.
Linker warnings should be treated as serious problems with the program
and should be solved before the program is tested on actual hardware.
---
 boards/Makefile.include.cortexm_common | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/boards/Makefile.include.cortexm_common b/boards/Makefile.include.cortexm_common
index 241dbe00fa..cd6bf0d560 100644
--- a/boards/Makefile.include.cortexm_common
+++ b/boards/Makefile.include.cortexm_common
@@ -16,7 +16,7 @@ export CFLAGS_OPT   ?= -Os
 export CFLAGS += $(CFLAGS_CPU) $(CFLAGS_STYLE) $(CFLAGS_LINK) $(CFLAGS_DBG) $(CFLAGS_OPT)
 
 export ASFLAGS += $(CFLAGS_CPU) $(CFLAGS_DEBUG)
-export LINKFLAGS += -L$(RIOTCPU)/$(CPU)/ldscripts -T$(RIOTCPU)/$(CPU)/ldscripts/$(CPU_MODEL).ld
+export LINKFLAGS += -L$(RIOTCPU)/$(CPU)/ldscripts -T$(RIOTCPU)/$(CPU)/ldscripts/$(CPU_MODEL).ld -Wl,--fatal-warnings
 export LINKFLAGS += $(CFLAGS_DEBUG) $(CFLAGS_CPU) $(CFLAGS_STYLE) -static -lgcc -nostartfiles
 
 # use the nano-specs of the NewLib when available
-- 
GitLab