From bd961d1cd32922aadfaa09758bd8a65959c131d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Th=C3=A9baudeau?= Date: Sun, 29 May 2016 23:05:17 +0200 Subject: [PATCH] cc2538: Fix possible linker script breakage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The conditional definitions in project-conf.h depending on CONTIKI_TARGET_ were ignored at link time, which broke the linker script if it used these definitions, so the flashed applications could crash or malfunction. Signed-off-by: Benoît Thébaudeau --- cpu/cc2538/Makefile.cc2538 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cpu/cc2538/Makefile.cc2538 b/cpu/cc2538/Makefile.cc2538 index a11dc2b87..f28a77d11 100644 --- a/cpu/cc2538/Makefile.cc2538 +++ b/cpu/cc2538/Makefile.cc2538 @@ -115,8 +115,7 @@ CUSTOM_RULE_LINK=1 cp $< $@ ### This rule is used to generate the correct linker script -LDGENFLAGS += $(addprefix -D,$(subst $(COMMA), ,$(DEFINES))) -LDGENFLAGS += $(addprefix -I,$(SOURCEDIRS)) +LDGENFLAGS += $(CFLAGS) LDGENFLAGS += -imacros "contiki-conf.h" -imacros "dev/cc2538-dev.h" LDGENFLAGS += -imacros "dev/flash.h" -imacros "cfs-coffee-arch.h" LDGENFLAGS += -x c -P -E