diff options
author | Angus Gratton <angus@redyak.com.au> | 2024-01-31 11:18:05 +1100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2024-01-31 14:29:07 +1100 |
commit | 457f2ccf804dd0e9a770984ed11f2568c2fcd958 (patch) | |
tree | 3465147a33132e311e8105668fbbd9ae0dd4c75b | |
parent | 3e48d24576f8a44a20e65a5782204944de2467b3 (diff) |
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>
-rw-r--r-- | examples/embedding/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/embedding/Makefile b/examples/embedding/Makefile index 13bfdf123..c3ca14836 100644 --- a/examples/embedding/Makefile +++ b/examples/embedding/Makefile @@ -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) |