diff --git a/ports/unix/Makefile b/ports/unix/Makefile index a9ba5edfad..090b58d8ec 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