Fixed bsd compile error ld: unknown option: --gc-sections (#217)
Signed-off-by: Patrick Grimm <patrick@lunatiki.de>
This commit is contained in:
@@ -127,7 +127,11 @@ endif
|
|||||||
LFLAGS += -Wl,$(SYSTEM_LIB)
|
LFLAGS += -Wl,$(SYSTEM_LIB)
|
||||||
# GCC dead code removal
|
# GCC dead code removal
|
||||||
CFLAGS += -ffunction-sections -fdata-sections
|
CFLAGS += -ffunction-sections -fdata-sections
|
||||||
|
ifeq ($(shell uname -s),Darwin)
|
||||||
|
LFLAGS += -Wl,-dead_strip
|
||||||
|
else
|
||||||
LFLAGS += -Wl,--gc-sections
|
LFLAGS += -Wl,--gc-sections
|
||||||
|
endif
|
||||||
|
|
||||||
.EXPORT_ALL_VARIABLES:
|
.EXPORT_ALL_VARIABLES:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user