aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Mussared2020-08-14 16:40:55 +1000
committerDamien George2020-09-08 12:53:16 +1000
commitfeed69aa5c4e9fda037497a1b63c05a27b164920 (patch)
treee407ae568577a34f98243b65f96c5f1d9485916c
parentaa18ab7db2a055440cb4798487c12809c74935c5 (diff)
unix/Makefile: Always enable -f*-sections regardless of DEBUG setting.
-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