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