Skip to content

Commit e9f3fb7

Browse files
iSevenDaysdpgeorge
authored andcommitted
mpy-cross: Fix Makefile to handle gc-sections linker flags on OS X.
1 parent 9626662 commit e9f3fb7

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

mpy-cross/Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,12 @@ endif
3737
ifeq ($(UNAME_S),Darwin)
3838
CC = clang
3939
# Use clang syntax for map file
40-
LDFLAGS_ARCH = -Wl,-map,$@.map
40+
LDFLAGS_ARCH = -Wl,-map,$@.map -Wl,-dead_strip
4141
else
4242
# Use gcc syntax for map file
43-
LDFLAGS_ARCH = -Wl,-Map=$@.map,--cref
43+
LDFLAGS_ARCH = -Wl,-Map=$@.map,--cref -Wl,--gc-sections
4444
endif
4545
LDFLAGS = $(LDFLAGS_MOD) $(LDFLAGS_ARCH) -lm $(LDFLAGS_EXTRA)
46-
LDFLAGS += -Wl,--gc-sections
4746

4847
# source files
4948
SRC_C = \

0 commit comments

Comments
 (0)