summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorSanteri Paavolainen <santtu@iki.fi>2021-02-24 10:33:26 +0200
committerDamien George <damien@micropython.org>2021-04-09 15:47:54 +1000
commit42035e5eded531d41319ffde999fa5a97478c872 (patch)
tree63d3529c33367ee6df598cf32a0a9e4750908ac1 /examples
parent7546d3cf73608b7888583d5bdbcec059954ccfe8 (diff)
examples/embedding: Fix example so it compiles again.
There were a few changes that had broken this example, specifically 2cdf1d25f59409b6130c0e8b6cf50300aed2d7e6 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>
Diffstat (limited to 'examples')
-rw-r--r--examples/embedding/Makefile.upylib5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/embedding/Makefile.upylib b/examples/embedding/Makefile.upylib
index 0e388332e..00def493d 100644
--- a/examples/embedding/Makefile.upylib
+++ b/examples/embedding/Makefile.upylib
@@ -21,6 +21,9 @@ CWARN = -Wall -Werror
CWARN += -Wpointer-arith -Wuninitialized
CFLAGS = $(INC) $(CWARN) -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
+# Some systems (eg MacOS) need -fno-common so that mp_state_ctx is placed in the BSS.
+CFLAGS += -fno-common
+
# Debugging/Optimization
ifdef DEBUG
CFLAGS += -g
@@ -133,7 +136,6 @@ SRC_C = $(addprefix ports/unix/,\
gccollect.c \
unix_mphal.c \
input.c \
- file.c \
modmachine.c \
modos.c \
moduselect.c \
@@ -146,6 +148,7 @@ SRC_C = $(addprefix ports/unix/,\
LIB_SRC_C = $(addprefix lib/,\
$(LIB_SRC_C_EXTRA) \
utils/printf.c \
+ utils/gchelper_generic.c \
timeutils/timeutils.c \
)