mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
bpo-45548: Remove _math.c workarounds for pre-C99 libm (GH-29179)
The :mod:`math` and :mod:`cmath` implementation now require a C99 compatible ``libm`` and no longer ship with workarounds for missing acosh, asinh, expm1, and log1p functions. The changeset also removes ``_math.c`` and moves the last remaining workaround into ``_math.h``. This simplifies static builds with ``Modules/Setup`` and resolves symbol conflicts. Co-authored-by: Mark Dickinson <mdickinson@enthought.com> Co-authored-by: Brett Cannon <brett@python.org> Signed-off-by: Christian Heimes <christian@python.org>
This commit is contained in:
parent
51ed2c56a1
commit
fa26245a1c
12 changed files with 51 additions and 346 deletions
8
setup.py
8
setup.py
|
@ -904,18 +904,14 @@ class PyBuildExt(build_ext):
|
|||
# Context Variables
|
||||
self.add(Extension('_contextvars', ['_contextvarsmodule.c']))
|
||||
|
||||
shared_math = 'Modules/_math.o'
|
||||
|
||||
# math library functions, e.g. sin()
|
||||
self.add(Extension('math', ['mathmodule.c'],
|
||||
extra_objects=[shared_math],
|
||||
depends=['_math.h', shared_math],
|
||||
depends=['_math.h'],
|
||||
libraries=['m']))
|
||||
|
||||
# complex math library functions
|
||||
self.add(Extension('cmath', ['cmathmodule.c'],
|
||||
extra_objects=[shared_math],
|
||||
depends=['_math.h', shared_math],
|
||||
depends=['_math.h'],
|
||||
libraries=['m']))
|
||||
|
||||
# time libraries: librt may be needed for clock_gettime()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue