summaryrefslogtreecommitdiffstats
path: root/setup.py
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 /setup.py
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 'setup.py')
-rw-r--r--setup.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/setup.py b/setup.py
index da67731..930b64a 100644
--- a/setup.py
+++ b/setup.py
@@ -582,13 +582,17 @@ class PyBuildExt(build_ext):
# array objects
exts.append( Extension('array', ['arraymodule.c']) )
+
+ shared_math = 'Modules/_math.o'
# complex math library functions
- exts.append( Extension('cmath', ['cmathmodule.c', '_math.c'],
- depends=['_math.h'],
+ exts.append( Extension('cmath', ['cmathmodule.c'],
+ extra_objects=[shared_math],
+ depends=['_math.h', shared_math],
libraries=math_libs) )
# math library functions, e.g. sin()
- exts.append( Extension('math', ['mathmodule.c', '_math.c'],
- depends=['_math.h'],
+ exts.append( Extension('math', ['mathmodule.c'],
+ extra_objects=[shared_math],
+ depends=['_math.h', shared_math],
libraries=math_libs) )
# time libraries: librt may be needed for clock_gettime()