summaryrefslogtreecommitdiff
path: root/setup.py
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
commit63d096ddabc430ede485bc5fb8ce11bb78cb8afa (patch)
tree0dc97e87fa4a31a976ab7c43f414fafe9ec3d14c /setup.py
parentbc85e35fe66edf18c7998d98bfa5682a9cbb0269 (diff)
downloadcpython-git-63d096ddabc430ede485bc5fb8ce11bb78cb8afa.tar.gz
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 3ebc3deb82..de6e5ad8dc 100644
--- a/setup.py
+++ b/setup.py
@@ -598,13 +598,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()