Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
fa6567a3
Commit
fa6567a3
authored
Sep 23, 2014
by
blmorris
Browse files
Clean up logical flow for setting LDFLAGS to build for Linux and OSX
Add more specific comments describing what is going on.
parent
8afb9b38
Changes
1
Hide whitespace changes
Inline
Side-by-side
unix/Makefile
View file @
fa6567a3
...
...
@@ -29,17 +29,19 @@ else
COPT
=
-Os
#-DNDEBUG
endif
LDFLAGS
=
$(LDFLAGS_MOD)
-lm
-Wl
$(LDFLAGS_MAP_EXTRA)
$(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/mkenv.mk
ifeq
($(UNAME_S),Darwin)
# Force OSX to use clang even if gcc is present, value set in mkenv.mk
# must be ovewritten here to avoid breaking stmhal build on OSX
CC
=
clang
# Use clang syntax for
LDFLAGS
LDFLAGS_
MAP_EXTRA
=
,-map,
$@
.map
# Use clang syntax for
map file and set osx specific flags
LDFLAGS_
ARCH
=
-Wl
,-order_file,
$(BUILD)
/order.def
-Wl
,-map,
$@
.map
else
# Use gcc syntax
LDFLAGS_
MAP_EXTRA
=
,-Map
=
$@
.map,--cref
# Use gcc syntax
for map file
LDFLAGS_
ARCH
=
-Wl
,-Map
=
$@
.map,--cref
endif
LDFLAGS
=
$(LDFLAGS_MOD)
$(LDFLAGS_ARCH)
-lm
$(LDFLAGS_EXTRA)
ifeq
($(MICROPY_FORCE_32BIT),1)
CFLAGS
+=
-m32
...
...
@@ -89,9 +91,6 @@ SRC_C = \
$(SRC_MOD)
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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment