Commit 1fae7874 authored by blmorris's avatar blmorris
Browse files

Fix unix/Makefile to build on OSX

Force OSX to compile with clang even if gcc is available
Change LDFLAGS syntax to be compatible with clang
Fix questionable syntax on line 90
Remove extraneous tab character
parent 2c180f7c
......@@ -30,6 +30,13 @@ COPT = -Os #-DNDEBUG
LDFLAGS = $(LDFLAGS_MOD) -lm -Wl,-Map=$,--cref $(LDFLAGS_EXTRA)
ifeq ($(UNAME_S),Darwin)
# Force OSX to use clang even if gcc is present, value set in
# must be ovewritten here to avoid breaking stmhal build on OSX
CC = clang
# Use clang syntax for LDFLAGS
ifeq ($(MICROPY_FORCE_32BIT),1)
CFLAGS += -m32
......@@ -80,7 +87,7 @@ SRC_C = \
ifeq ($(UNAME_S),Darwin)
LDFLAGS+ = -Wl,-order_file,$(BUILD)/order.def
LDFLAGS += -Wl,-order_file,$(BUILD)/order.def
# Must be the last file in list of sources
SRC_C += seg_helpers.c
......@@ -92,7 +99,7 @@ seg_helpers.c: $(BUILD)/order.def
$(Q)echo "seg_helpers.o: ___bss_start" > $@
OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
include ../py/
Supports Markdown
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