Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
63d096dd
Commit
63d096dd
authored
Feb 03, 2016
by
Martin Panter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #24421: Compile _math.c separately to avoid race condition
parent
bc85e35f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
5 deletions
+17
-5
Makefile.pre.in
Makefile.pre.in
+5
-1
Misc/NEWS
Misc/NEWS
+4
-0
setup.py
setup.py
+8
-4
No files found.
Makefile.pre.in
View file @
63d096dd
...
...
@@ -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
=
""
;;
\
...
...
Misc/NEWS
View file @
63d096dd
...
...
@@ -261,6 +261,10 @@ Tests
Build
-----
-
Issue
#
24421
:
Compile
Modules
/
_math
.
c
once
,
before
building
extensions
.
Previously
it
could
fail
to
compile
properly
if
the
math
and
cmath
builds
were
concurrent
.
-
Issue
#
25348
:
Added
``--
pgo
``
and
``--
pgo
-
job
``
arguments
to
``
PCbuild
\
build
.
bat
``
for
building
with
Profile
-
Guided
Optimization
.
The
old
``
PCbuild
\
build_pgo
.
bat
``
script
is
now
deprecated
,
and
simply
calls
...
...
setup.py
View file @
63d096dd
...
...
@@ -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()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment