10000 examples/embedding: Fix example so it compiles again. · micropython/micropython@42035e5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 42035e5

Browse files
santtudpgeorge
authored andcommitted
examples/embedding: Fix example so it compiles again.
There were a few changes that had broken this example, specifically 2cdf1d2 removed file.c from ports/unix. And (at least for MacOS) mp_state_ctx must be placed in the BSS with -fno-common so it is visible to the linker. Signed-off-by: Santeri Paavolainen <santtu@iki.fi>
1 parent 7546d3c commit 42035e5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/embedding/Makefile.upylib

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ CWARN = -Wall -Werror
2121
CWARN += -Wpointer-arith -Wuninitialized
2222
CFLAGS = $(INC) $(CWARN) -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
2323

24+
# Some systems (eg MacOS) need -fno-common so that mp_state_ctx is placed in the BSS.
25+
CFLAGS += -fno-common
26+
2427
# Debugging/Optimization
2528
ifdef DEBUG
2629
CFLAGS += -g
@@ -133,7 +136,6 @@ SRC_C = $(addprefix ports/unix/,\
133136
gccollect.c \
134137
unix_mphal.c \
135138
input.c \
136-
file.c \
137139
modmachine.c \
138140
modos.c \
139141
moduselect.c \
@@ -146,6 +148,7 @@ SRC_C = $(addprefix ports/unix/,\
146148
LIB_SRC_C = $(addprefix lib/,\
147149
$(LIB_SRC_C_EXTRA) \
148150
utils/printf.c \
151+
utils/gchelper_generic.c \
149152
timeutils/timeutils.c \
150153
)
151154

0 commit comments

Comments
 (0)
0