summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
author默默 <wangqiang1588@sina.com>2019-03-31 16:07:03 +0800
committerTom Rini <trini@konsulko.com>2019-04-03 10:26:46 -0400
commitab8fc413028b4fd22492a93ef31223d606cac5a6 (patch)
tree6d7126e5cbb95858e7cd5e3238ec1bf75d21f97c /Makefile
parent2118a272e3c2ae9e677ab0527939a979dc1a0f60 (diff)
fix compile error on macOS Mojave
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index c1af9307b3..92e04dd689 100644
--- a/Makefile
+++ b/Makefile
@@ -291,6 +291,9 @@ DARWIN_MINOR_VERSION = $(shell sw_vers -productVersion | cut -f 2 -d '.')
os_x_before = $(shell if [ $(DARWIN_MAJOR_VERSION) -le $(1) -a \
$(DARWIN_MINOR_VERSION) -le $(2) ] ; then echo "$(3)"; else echo "$(4)"; fi ;)
+os_x_after = $(shell if [ $(DARWIN_MAJOR_VERSION) -ge $(1) -a \
+ $(DARWIN_MINOR_VERSION) -ge $(2) ] ; then echo "$(3)"; else echo "$(4)"; fi ;)
+
# Snow Leopards build environment has no longer restrictions as described above
HOSTCC = $(call os_x_before, 10, 5, "cc", "gcc")
HOSTCFLAGS += $(call os_x_before, 10, 4, "-traditional-cpp")
@@ -300,6 +303,10 @@ HOSTLDFLAGS += $(call os_x_before, 10, 5, "-multiply_defined suppress")
# in some host tools which is a problem then ... so disable ASLR for these
# tools
HOSTLDFLAGS += $(call os_x_before, 10, 7, "", "-Xlinker -no_pie")
+
+# macOS Mojave (10.14.X)
+# Undefined symbols for architecture x86_64: "_PyArg_ParseTuple"
+HOSTLDFLAGS += $(call os_x_after, 10, 14, "-lpython -dynamclib", "")
endif
# Decide whether to build built-in, modular, or both.