Commit 9f532750 authored by Damien George's avatar Damien George
Browse files

Merge pull request #871 from blmorris/osx_build_fix

Fix unix/Makefile to build on OSX
parents eaaebf32 fa6567a3
......@@ -29,7 +29,19 @@ else
LDFLAGS = $(LDFLAGS_MOD) -lm -Wl,-Map=$,--cref $(LDFLAGS_EXTRA)
# On OSX, 'gcc' is a symlink to clang unless a real gcc is installed.
# The unix port of micropython on OSX must be compiled with clang,
# while cross-compile ports require gcc, so we test here for OSX and
# if necessary override the value of 'CC' set in py/
ifeq ($(UNAME_S),Darwin)
CC = clang
# Use clang syntax for map file and set osx specific flags
LDFLAGS_ARCH = -Wl,-order_file,$(BUILD)/order.def -Wl,-map,$
# Use gcc syntax for map file
LDFLAGS_ARCH = -Wl,-Map=$,--cref
ifeq ($(MICROPY_FORCE_32BIT),1)
CFLAGS += -m32
......@@ -79,9 +91,6 @@ SRC_C = \
ifeq ($(UNAME_S),Darwin)
LDFLAGS+ = -Wl,-order_file,$(BUILD)/order.def
# Must be the last file in list of sources
SRC_C += seg_helpers.c
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