summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/unix/Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/ports/unix/Makefile b/ports/unix/Makefile
index a9ba5edfa..090b58d8e 100644
--- a/ports/unix/Makefile
+++ b/ports/unix/Makefile
@@ -47,10 +47,12 @@ ifdef DEBUG
COPT ?= -O0
else
COPT ?= -Os
-COPT += -fdata-sections -ffunction-sections
COPT += -DNDEBUG
endif
+# Remove unused sections.
+COPT += -fdata-sections -ffunction-sections
+
# Always enable symbols -- They're occasionally useful, and don't make it into the
# final .bin/.hex/.dfu so the extra size doesn't matter.
CFLAGS += -g