From 46bbc0911840d38d7ca67d70d8c1f7f22afe0ce6 Mon Sep 17 00:00:00 2001 From: Phil Hord Date: Mon, 25 Nov 2013 16:17:45 -0500 Subject: [PATCH] Turn dead-code removal back on when not simulavr --- Makefile-AVR | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile-AVR b/Makefile-AVR index 8be4173..e232dc3 100644 --- a/Makefile-AVR +++ b/Makefile-AVR @@ -127,13 +127,14 @@ CFLAGS += -finline-functions-called-once CFLAGS += -mcall-prologues LDFLAGS = -Wl,--as-needed -# Doesn't work for simulavr, can't allow dead code removal. -#LDFLAGS += -Wl,--gc-sections ifneq ($(realpath ../simulavr/src/simulavr_info.h),) # Neccessary for simulavr support, doesn't hurt others. CFLAGS += -DSIMINFO LDFLAGS += -Wl,--section-start=.siminfo=0x900000 +else + # Doesn't work for simulavr, can't allow dead code removal. + LDFLAGS += -Wl,--gc-sections endif LIBS = -lm