From 15412b9ee5eec720d0d6b33321fe36392005ffd6 Mon Sep 17 00:00:00 2001 From: Steve Karg Date: Tue, 29 Oct 2024 12:33:55 -0500 Subject: [PATCH] Added linker specific code for Darwin for compiling mstpcrc (#833) --- apps/mstpcrc/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/mstpcrc/Makefile b/apps/mstpcrc/Makefile index c445a934..66147b7b 100644 --- a/apps/mstpcrc/Makefile +++ b/apps/mstpcrc/Makefile @@ -21,7 +21,11 @@ LFLAGS += -Wl,$(BACNET_LIB) endif # GCC dead code removal CFLAGS += -ffunction-sections -fdata-sections +ifeq ($(shell uname -s),Darwin) +LFLAGS += -Wl,-dead_strip +else LFLAGS += -Wl,--gc-sections +endif OBJS += ${SRCS:.c=.o}