mirror of
https://github.com/licsber/micropython.git
synced 2024-09-19 08:39:38 +08:00
examples/embedding: Add -fno-common to the sample compiler flags.
This makes no difference when files are linked directly into a target application, but on macOS additional steps are needed to index common symbols in static libraries. See https://stackoverflow.com/a/26581710 By not creating any common symbols, this problem is bypassed. This will also trigger linker errors if there are cases where the same symbol is defined in the host application. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
This commit is contained in:
parent
3e48d24576
commit
457f2ccf80
@ -12,7 +12,7 @@ PROG = embed
|
||||
CFLAGS += -I.
|
||||
CFLAGS += -I$(EMBED_DIR)
|
||||
CFLAGS += -I$(EMBED_DIR)/port
|
||||
CFLAGS += -Wall -Og
|
||||
CFLAGS += -Wall -Og -fno-common
|
||||
|
||||
SRC += main.c
|
||||
SRC += $(wildcard $(EMBED_DIR)/*/*.c) $(wildcard $(EMBED_DIR)/*/*/*.c)
|
||||
|
Loading…
Reference in New Issue
Block a user