From feed69aa5c4e9fda037497a1b63c05a27b164920 Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Fri, 14 Aug 2020 16:40:55 +1000 Subject: [PATCH] unix/Makefile: Always enable -f*-sections regardless of DEBUG setting. --- ports/unix/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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