summaryrefslogtreecommitdiff
path: root/Makefile.pre.in
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-02-03 05:19:44 +0000
committerMartin Panter <vadmium+py@gmail.com>2016-02-03 05:19:44 +0000
commitb834b7be5d232de43fb3002e8bee259f8f86245e (patch)
treedd5e9705f069df476abb19fb309e4f51c3c9b36d /Makefile.pre.in
parent47714719f2002322524845f8c7d5c347c6e2d7cc (diff)
downloadcpython-b834b7be5d232de43fb3002e8bee259f8f86245e.tar.gz
Issue #24421: Compile _math.c separately to avoid race condition
Diffstat (limited to 'Makefile.pre.in')
-rw-r--r--Makefile.pre.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile.pre.in b/Makefile.pre.in
index 57167e61d3..2a687e58c9 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -586,11 +586,15 @@ pybuilddir.txt: $(BUILDPYTHON)
exit 1 ; \
fi
+# This is shared by the math and cmath modules
+Modules/_math.o: Modules/_math.c Modules/_math.h
+ $(CC) -c $(CCSHARED) $(PY_CORE_CFLAGS) -o $@ $<
+
# Build the shared modules
# Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for
# -s, --silent or --quiet is always the first char.
# Under BSD make, MAKEFLAGS might be " -s -v x=y".
-sharedmods: $(BUILDPYTHON) pybuilddir.txt
+sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
@case "$$MAKEFLAGS" in \
*\ -s*|s*) quiet="-q";; \
*) quiet="";; \