Commit 42035e5e authored by Santeri Paavolainen's avatar Santeri Paavolainen Committed by Damien George

examples/embedding: Fix example so it compiles again.

There were a few changes that had broken this example, specifically
2cdf1d25 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: default avatarSanteri Paavolainen <santtu@iki.fi>
parent 7546d3cf
...@@ -21,6 +21,9 @@ CWARN = -Wall -Werror ...@@ -21,6 +21,9 @@ CWARN = -Wall -Werror
CWARN += -Wpointer-arith -Wuninitialized CWARN += -Wpointer-arith -Wuninitialized
CFLAGS = $(INC) $(CWARN) -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA) 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 # Debugging/Optimization
ifdef DEBUG ifdef DEBUG
CFLAGS += -g CFLAGS += -g
...@@ -133,7 +136,6 @@ SRC_C = $(addprefix ports/unix/,\ ...@@ -133,7 +136,6 @@ SRC_C = $(addprefix ports/unix/,\
gccollect.c \ gccollect.c \
unix_mphal.c \ unix_mphal.c \
input.c \ input.c \
file.c \
modmachine.c \ modmachine.c \
modos.c \ modos.c \
moduselect.c \ moduselect.c \
...@@ -146,6 +148,7 @@ SRC_C = $(addprefix ports/unix/,\ ...@@ -146,6 +148,7 @@ SRC_C = $(addprefix ports/unix/,\
LIB_SRC_C = $(addprefix lib/,\ LIB_SRC_C = $(addprefix lib/,\
$(LIB_SRC_C_EXTRA) \ $(LIB_SRC_C_EXTRA) \
utils/printf.c \ utils/printf.c \
utils/gchelper_generic.c \
timeutils/timeutils.c \ timeutils/timeutils.c \
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment