Skip to content

Commit 7e56e55

Browse files
committed
unix: Refactor order file munging fo MacOSX.
1 parent eecf3e9 commit 7e56e55

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

unix/Makefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ PROG = micropython
77
# qstr definitions (must come before including py.mk)
88
QSTR_DEFS = qstrdefsport.h
99

10+
# OS name, for simple autoconfig
11+
UNAME_S := $(shell uname -s)
12+
1013
# include py core make definitions
1114
include ../py/py.mk
1215

@@ -26,12 +29,7 @@ else
2629
COPT = -Os #-DNDEBUG
2730
endif
2831

29-
UNAME_S := $(shell uname -s)
30-
ifeq ($(UNAME_S),Darwin)
31-
LDFLAGS = $(LDFLAGS_MOD) -lm -Wl,-map,$@.map,-order_file,$(BUILD)/order.def
32-
else
33-
LDFLAGS = $(LDFLAGS_MOD) -lm -Wl,-Map=$@.map,--cref
34-
endif
32+
LDFLAGS = $(LDFLAGS_MOD) -lm -Wl,-Map=$@.map,--cref
3533

3634
ifeq ($(MICROPY_FORCE_32BIT),1)
3735
CFLAGS += -m32
@@ -76,6 +74,9 @@ SRC_C = \
7674
$(SRC_MOD)
7775

7876
ifeq ($(UNAME_S),Darwin)
77+
78+
LDFLAGS+ = -Wl,-order_file,$(BUILD)/order.def
79+
7980
# Must be the last file in list of sources
8081
SRC_C += seg_helpers.c
8182

0 commit comments

Comments
 (0)