From 392deff2d736813167de6e3149547da40eaed931 Mon Sep 17 00:00:00 2001 From: Olaf Bergmann Date: Fri, 10 Jun 2016 16:41:53 +0200 Subject: [PATCH] Makefile.contiki: Added -Os to remove undefined symbol handle_periodic_timer() in rpl-timers.c relies on the optimizer to remove the if(0)-guarded call to rpl_ns_periodic() when storing mode is selected. This does not happen with clang's default options and thus leads to an error for the undefined reference at link time. This modification adds -Os to fix this. --- examples/contiki/Makefile.contiki | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/contiki/Makefile.contiki b/examples/contiki/Makefile.contiki index 5189a729..9df292a2 100644 --- a/examples/contiki/Makefile.contiki +++ b/examples/contiki/Makefile.contiki @@ -23,7 +23,7 @@ endif all: server -CFLAGS += -ffunction-sections +CFLAGS += -Os -ffunction-sections LDFLAGS += -Wl,--gc-sections,--undefined=_reset_vector__,--undefined=InterruptVectors,--undefined=_copy_data_init__,--undefined=_clear_bss_init__,--undefined=_end_of_init__ CFLAGS += #-DSHORT_ERROR_RESPONSE -DNDEBUG