summaryrefslogtreecommitdiffstats
path: root/Makefile.pre.in
diff options
context:
space:
mode:
authorMartin Panter <vadmium+py@gmail.com>2016-02-03 05:19:44 (GMT)
committerMartin Panter <vadmium+py@gmail.com>2016-02-03 05:19:44 (GMT)
commitc9deece272abe87865d91f3077fe4591e57303ad (patch)
tree0e37b52652488978ad93896991f7a94afbe2814c /Makefile.pre.in
parenta63897164eb1fb01bdc51fb8de0d6bc7eb791de9 (diff)
downloadcpython-c9deece272abe87865d91f3077fe4591e57303ad.zip
cpython-c9deece272abe87865d91f3077fe4591e57303ad.tar.gz
cpython-c9deece272abe87865d91f3077fe4591e57303ad.tar.bz2
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 57167e6..2a687e5 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="";; \