Fixed bsd compile error ld: unknown option: --gc-sections (#217)

Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
This commit is contained in:
Patrick Grimm
2022-01-29 23:08:47 +01:00
committed by GitHub
parent 5daa34dae3
commit 3ddc851876
+4
View File
@@ -127,7 +127,11 @@ endif
LFLAGS += -Wl,$(SYSTEM_LIB)
# GCC dead code removal
CFLAGS += -ffunction-sections -fdata-sections
ifeq ($(shell uname -s),Darwin)
LFLAGS += -Wl,-dead_strip
else
LFLAGS += -Wl,--gc-sections
endif
.EXPORT_ALL_VARIABLES: