Commit Graph

611 Commits

Author SHA1 Message Date
Pablo Galindo Salgado 8e3fde728f
bpo-46968: Check for 'sys/auxv.h' in the configure script (GH-31961) 2022-03-18 05:03:22 -07:00
Oleksandr Pavlyk 3b128c0548
bpo-46968: Fix faulthandler for Sapphire Rapids Xeon (GH-31789)
In Linux kernel 5.14 one can dynamically request size of altstacksize
based on hardware capabilities with getauxval(AT_MINSIGSTKSZ).

This changes allows for Python extension's request to Linux kernel
to use AMX_TILE instruction set on Sapphire Rapids Xeon processor
to succeed, unblocking use of the ISA in frameworks.

Introduced HAVE_LINUX_AUXVEC_H in configure.ac and pyconfig.h.in
Used cpython_autoconf:269 docker container to generate configure.
2022-03-11 23:19:35 +01:00
Christian Heimes ca9689f8da
bpo-46933: Make pwd module optional (GH-31700)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2022-03-07 13:36:47 +01:00
Brett Cannon 50ec3453c5
bpo-46860: Respect `--with-suffix` on case-insensitive file systems (GH-31593)
Previously, case-insensitive file systems were forced to use `.exe` as the file suffix no matter what `--with-suffix` was set to.
2022-03-02 14:23:59 -08:00
Christian Heimes 96b344c2f1
bpo-40280: Address more test failures on Emscripten (GH-31050)
Co-authored-by: Brett Cannon <brett@python.org>
2022-02-05 20:52:01 +01:00
adanhawth b1288964e3
bpo-46602: Do not append conftest.c (GH-31062)
The heredoc creation statements use >> to append conftest.c.  This can cause
tricky build issues if the file is not correctly removed prior to its
name being reused (such name is reused several times for different
contextual tests during the build).  One such result from appending may
cause #include <ac_nonexistent.h> to persist when testing to acquire
PLATFORM_TRIPLET.  This can then lead to downstream issues concerning SOABI.
2022-02-01 21:38:15 -05:00
Victor Stinner 0515eafe55
bpo-46600: ./configure --with-pydebug uses -Og with clang (GH-31052)
Fix the test checking if the C compiler supports -Og option in the
./configure script to also use -Og on clang which supports it.
2022-02-01 14:47:12 +01:00
Natanael Copa 1f036ede59
bpo-43112: detect musl as a separate SOABI (GH-24502)
musl libc and gnu libc are not ABI compatible so we need set different
SOABI for musl and not simply assume that all linux is linux-gnu.

Replace linux-gnu with the detected os for the build from config.guess
for linux-musl*.
2022-01-28 15:02:54 -08:00
Christian Heimes 6e5a193816
bpo-46513: Remove AC_C_CHAR_UNSIGNED / __CHAR_UNSIGNED__ (GH-30851) 2022-01-26 01:03:49 -08:00
Christian Heimes d5fd438b38
bpo-40280: Get help() working and more (GH-30858) 2022-01-24 22:02:01 +01:00
Thomas Klausner 40fcd16889
bpo-30512: Add CAN Socket support for NetBSD (GH-30066) 2022-01-21 09:44:05 +02:00
Christian Heimes c02e860ee7
bpo-40280: Misc fixes for wasm32-emscripten (GH-30722) 2022-01-20 18:56:33 +01:00
Thomas Klausner 60ceedbdd5
bpo-46045: Do not use POSIX semaphores on NetBSD (GH-30047)
This fixes hanging tests test_compileall,, test_multiprocessing_fork and test_concurrent_futures.
2022-01-18 22:38:35 +02:00
Mark Dickinson 025cbe7a9b
bpo-45569: Change PYLONG_BITS_IN_DIGIT default to 30 (GH-30497) 2022-01-14 18:54:56 +00:00
Christian Heimes c8319f7921
bpo-40280: Build WASM stdlib bundle and more modules for node (GH-30597) 2022-01-14 12:11:49 +01:00
Victor Stinner 6be848922b
bpo-44133: Link Python executable with object files (GH-30556)
When Python is built without --enable-shared, the "python" program is
now linked to object files, rather than being linked to the Python
library (libpython.a), to make sure that all symbols are exported.
Previously, the linker omitted some symbols like the Py_FrozenMain()
function.

When Python is configured with --without-static-libpython, the Python
static library (libpython.a) is no longer built.

* Check --without-static-libpython earlier in configure.ac
* Add LINK_PYTHON_OBJS and LINK_PYTHON_DEPS variables to Makefile.
* test_capi now ensures that the "Py_FrozenMain" symbol is exported.
2022-01-13 19:24:28 +01:00
Christian Heimes a6ca8eee22
bpo-46315: Add ifdef HAVE_ feature checks for WASI compatibility (GH-30507) 2022-01-13 09:46:04 +01:00
Christian Heimes e34c9367f8
bpo-40280: Allow to compile _testcapi as builtin module (GH-30559) 2022-01-12 20:27:37 +01:00
Christian Heimes 43839ba438
bpo-40280: Add --with-emscripten-target to build for browser or node (GH-30552)
Co-authored-by: Ethan Smith <ethan@ethanhs.me>
2022-01-12 16:08:19 +01:00
Thomas Klausner 3d11c1b8b4
bpo-46308: Fix unportable test(1) operator in configure script (GH-30490) 2022-01-08 19:54:13 -05:00
Christian Heimes 994f90c077
bpo-45723: Fix detection of epoll (#30449) 2022-01-07 09:15:20 +01:00
Christian Heimes cae55542d2
bpo-46263: Don't use MULTIARCH on FreeBSD (#30410) 2022-01-05 10:54:17 +01:00
Christian Heimes 0339434835
bpo-40280: Add Tools/wasm with helpers for cross building (GH-29984)
Co-authored-by: Ethan Smith <ethan@ethanhs.me>
Co-authored-by: Brett Cannon <brett@python.org>
2021-12-18 15:54:02 +01:00
Mark Shannon 342b93f9f2
bpo-46072: Add --with-pystats configure option to simplify gathering of VM stats (GH-30116)
* Simplify specialization stats collection macros.

* Add --enable-pystats option to configure.

* Update specialization summary script to handle larger number of kinds
2021-12-15 15:32:32 +00:00
Christian Heimes eb483c46d6
bpo-45949: Pure Python freeze module for cross builds (GH-29899) 2021-12-13 20:48:46 +01:00
Erlend Egeberg Aasland 74b23c97cd
bpo-45723: Normalise configure user communication (GH-30024) 2021-12-10 12:27:38 +01:00
Christian Heimes 0461c68cdf
bpo-45847: Don't override user overrides for CFLAGS/LIBS (GH-29967) 2021-12-08 11:52:08 +01:00
Christian Heimes 91b59a3fcd
bpo-45847: Revert Port _ctypes partly to PY_STDLIB_MOD (GH-29747) (GH-29969) 2021-12-07 20:56:41 +01:00
Ned Deily ddbab69b6d
bpo-45798: Let libmpdec decide which archs to build on macOS as done previously. (GH-29949) 2021-12-06 21:35:50 -05:00
Christian Heimes fc012d8012
bpo-45847: Fix uuid detection on macOS (GH-29946) 2021-12-06 21:43:44 +01:00
Christian Heimes 612e59b53f
bpo-45950: Fix macOS framework builds of _bootstrap_python (GH-29936) 2021-12-06 17:13:53 +01:00
Christian Heimes 64be8d369b
bpo-45847: Update whatsnew and add place holder entries for missing extensions (GH-29914) 2021-12-04 15:14:48 +01:00
Christian Heimes 4045392e0e
bpo-45847: Port _ctypes partly to PY_STDLIB_MOD (GH-29747)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-12-04 11:21:43 +01:00
Christian Heimes 84ca1232b0
bpo-45950: Introduce Bootstrap Python again (#29859)
The build system now uses a :program:`_bootstrap_python` interpreter for
freezing and deepfreezing again. To speed up build process the build tools
:program:`_bootstrap_python` and :program:`_freeze_module` are no longer
build with LTO.

Cross building depends on a build Python interpreter, which must have same
version and bytecode as target host Python.
2021-12-03 16:01:11 +01:00
Christian Heimes 309110f37c
bpo-40280: Emscripten with_ensurepip=no, second attempt (GH-29884) 2021-12-01 23:16:27 +01:00
Christian Heimes 9deb83468c
bpo-40280: Emscripten defaults to --with-ensurepip=no (GH-29873) 2021-12-01 20:43:07 +01:00
Christian Heimes 992565f7f7
bpo-45881: configure --with-freeze-module --with-build-python (GH-29835)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Co-authored-by: Ethan Smith <ethan@ethanhs.me>
2021-11-29 17:23:29 +01:00
Christian Heimes b394af13f6
bpo-45847: PY_STDLIB_MOD_SIMPLE now checks py_stdlib_not_available (GH-29844) 2021-11-29 16:34:16 +01:00
Christian Heimes 6ac3c8a314
bpo-40280: Emscripten systems use .wasm suffix by default (GH-29842) 2021-11-29 16:01:55 +01:00
Erlend Egeberg Aasland c1dec9540a
bpo-45723: Sort the grand AC_CHECK_HEADERS check (GH-29846)
Automerge-Triggered-By: GH:tiran
2021-11-29 06:41:11 -08:00
Erlend Egeberg Aasland f7a62f2405
bpo-45847: Make socket module conditional (GH-29769) 2021-11-29 14:57:36 +01:00
Erlend Egeberg Aasland b3f443a35e
bpo-40280: Disable unusable core extension modules on emscripten (GH-29834)
Co-authored-by: Christian Heimes <christian@python.org>
2021-11-29 12:39:14 +01:00
Erlend Egeberg Aasland aaf42222cf
bpo-45847: Port _multiprocessing to PY_STDLIB_MOD (GH-29768) 2021-11-28 13:00:51 +01:00
Pablo Galindo Salgado e71c12efcd
bpo-42268: Fail the configure step if the selected compiler doesn't support memory sanitizer (GH-29806) 2021-11-27 18:04:06 +00:00
Christian Heimes 4ebde73b8e
bpo-40280: Move hard-coded feature checks to configure (GH-29789)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-11-26 19:36:48 +01:00
Christian Heimes 8caceb7a47
bpo-40280: Add configure check for socket shutdown (GH-29795) 2021-11-26 15:16:54 +01:00
Christian Heimes ee1e2c604c
bpo-40280: Use Setup.stdlib static for wasm builds (GH-29784)
``Modules/Setup.stdlib`` contains ``Setup`` lines for all stdlib extension modules for which ``configure`` has detected their dependencies. The file is not used yet and still under development. To use the file, do ``ln -sfr Modules/Setup.stdlib Modules/Setup.local``.
2021-11-26 08:26:49 +01:00
Christian Heimes 1052a39b76
bpo-40280: Add wasm cross build targets (GH-29771) 2021-11-25 21:24:40 +01:00
Christian Heimes 64c3807da9
bpo-45847: Fix _crypt detection on Ubuntu (GH-29743) 2021-11-24 10:47:22 +01:00
Christian Heimes 8af6481f6b
bpo-45847: Port _uuid to PY_STDLIB_MOD (GH-29741) 2021-11-24 10:20:37 +01:00
Erlend Egeberg Aasland 324527012f
bpo-45847: Port _posixshmem to PY_STDLIB_MOD (GH-29738) 2021-11-24 08:19:17 +01:00
Christian Heimes 9cf5646bb4
bpo-45847: Port _gdbm to PY_STDLIB_MOD (GH-29720) 2021-11-23 22:58:38 +01:00
Christian Heimes b9e9292d75
bpo-45847: Port _ssl and _hashlib to PY_STDLIB_MOD (GH-29727) 2021-11-23 22:58:13 +01:00
Christian Heimes 095bc8f0d6
bpo-45847: Port _crypt to PY_STDLIB_MOD (GH-29725) 2021-11-23 22:26:50 +01:00
Christian Heimes f840398a5f
bpo-45873: Restore Python 3.6 compatibility (GH-29730)
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
2021-11-23 21:36:40 +01:00
Guido van Rossum 5be98e57b3
bpo-45873: Get rid of bootstrap_python (#29717)
Instead we use $(PYTHON_FOR_REGEN) .../deepfreeze.py with the
frozen .h file as input, as we did for Windows in bpo-45850.

We also get rid of the code that generates the .h files
when make regen-frozen is run (i.e., .../make_frozen.py),
and the MANIFEST file.

Restore Python 3.8 and 3.9 as Windows host Python again

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2021-11-23 08:56:06 -08:00
Erlend Egeberg Aasland d82f2caf94
bpo-45847: Port _socket to PY_STDLIB_MOD (GH-29713) 2021-11-23 08:52:05 +01:00
Erlend Egeberg Aasland 758a23d1c4
bpo-45847: Fix xxlimited and xxlimited_35 build conditions (GH-29715) 2021-11-23 08:51:30 +01:00
Erlend Egeberg Aasland 2dc7d3dda6
bpo-45847: Port xxlimited and xxlimited_35 to PY_STDLIB_MOD (GH-29707) 2021-11-22 21:27:05 +01:00
Christian Heimes 0e1c2f3ef8
bpo-45847: port _struct to PY_STDLIB_MOD (GH-29706) 2021-11-22 15:58:43 +01:00
Erlend Egeberg Aasland eee683cbde
bpo-45847: Port audioop, _csv, and _posixsubprocess to PY_STDLIB_MOD_SIMPLE (GH-29705)
Automerge-Triggered-By: GH:tiran
2021-11-22 06:37:25 -08:00
Christian Heimes c6dec7e27a
bpo-45847: Port nis module to PY_STDLIB_MOD (GH-29699) 2021-11-22 15:18:41 +01:00
Christian Heimes d9cedabeba
bpo-45847: Port compression libs to PY_STDLIB_MOD (GH-29702) 2021-11-22 14:52:29 +01:00
Erlend Egeberg Aasland b451673f93
bpo-45847: Port mmap, select, and _xxsubinterpreters to Py_STDLIB_MOD (GH-29703) 2021-11-22 14:49:58 +01:00
Erlend Egeberg Aasland 5b946cadaa
bpo-45847: Port fcntl to Py_STDLIB_MOD (GH-29696)
Co-authored-by: Christian Heimes <christian@python.org>
2021-11-22 14:02:27 +01:00
Christian Heimes 29699a2a2a
bpo-45847: Various PY_STDLIB_MOD cleanups (GH-29697) 2021-11-22 12:09:14 +01:00
Erlend Egeberg Aasland 39f7d2ff01
bpo-45847: Port _lfprof, _opcode, _asyncio, _queue, _statistics, and _typing to PY_STDLIB_MOD_SIMPLE (GH-29690)
Automerge-Triggered-By: GH:tiran
2021-11-22 01:57:50 -08:00
Erlend Egeberg Aasland 718cee08cc
bpo-45847: Port _bisect, _heapq, _json, _pickle, _random, and _zoneinfo to PY_STDLIB_MOD_SIMPLE (GH-29689)
Automerge-Triggered-By: GH:tiran
2021-11-22 00:45:41 -08:00
Erlend Egeberg Aasland 133c65a870
bpo-45847: Port array, _contextvars, math, and cmath to PY_STDLIB_MOD_SIMPLE (GH-29688) 2021-11-22 09:05:36 +01:00
Erlend Egeberg Aasland db2277a114
bpo-45723: Add helpers for save/restore env (GH-29637) 2021-11-22 09:05:06 +01:00
Christian Heimes 2afa1a1266
bpo-45847: Port codecs and unicodedata to PY_STDLIB_MOD (GH-29685) 2021-11-21 14:08:47 +01:00
Christian Heimes f201d261cf
bpo-45847: Port grp, spwd, termios, resource, syslog to PY_STDLIB_MOD (GH-29668) 2021-11-21 10:45:31 +01:00
Christian Heimes f36c69a26e
bpo-45847: Port test modules to PY_STDLIB_MOD (GH-29660) 2021-11-20 16:43:10 +01:00
Erlend Egeberg Aasland 6d430ef5ab
bpo-45774: Fix SQLite load extension autodetection (GH-29659) 2021-11-20 15:02:52 +01:00
Christian Heimes 5596909eac
bpo-45847: Port _scproxy to PY_STDLIB_MOD (GH-29644) 2021-11-20 10:18:48 +01:00
Christian Heimes c8c21bdd19
bpo-45847: Port builtin hashlib extensions to PY_STDLIB_MOD (GH-29642) 2021-11-19 20:20:32 +01:00
Christian Heimes 7e44dc0ba7
bpo-45573: Move mandatory core modules to Modules/Setup.bootstrap (GH-29616) 2021-11-19 16:40:57 +01:00
Erlend Egeberg Aasland 29e5874d5a
bpo-45774: Autoconfiscate SQLite detection (GH-29507)
Co-authored-by: Christian Heimes <christian@python.org>
2021-11-19 15:10:41 +01:00
Christian Heimes e4bb22fabb
bpo-45573: Add Modules/Setup.stdlib with conditional modules (GH-29615) 2021-11-18 14:40:01 +01:00
Christian Heimes 5275e59c0c
bpo-45573: check for ossaudiodev in configure (GH-29614) 2021-11-18 10:56:26 +01:00
Christian Heimes 25ecc040d0
bpo-45573: Introduce extension module flags in Makefile (GH-29594)
``configure`` now uses a standardized format to forward state, compiler
flags, and linker flags to ``Makefile``, ``setup.py``, and
``Modules/Setup``. ``makesetup`` use the new variables by default if a
module line does not contain any compiler or linker flags. ``setup.py``
has a new function ``addext()``.

For a module ``egg``, configure adds:

* ``MODULE_EGG`` with value yes, missing, disabled, or n/a
* ``MODULE_EGG_CFLAGS``
* ``MODULE_EGG_LDFLAGS``

``Makefile.pre.in`` may also provide ``MODULE_EGG_DEPS`` that lists
dependencies such as header files and static libs.

Signed-off-by: Christian Heimes <christian@python.org>
2021-11-18 09:18:44 +01:00
Christian Heimes 464e6616be
bpo-45800: Move pyexpat build setup into configure (GH-29547)
Settings for :mod:`pyexpat` C extension are now detected by ``configure``.
The bundled ``expat`` library is built in ``Makefile``.

Signed-off-by: Christian Heimes <christian@python.org>
2021-11-14 10:02:24 +01:00
Christian Heimes 0486570f7b
bpo-45798: Move _decimal build setup into configure (GH-29541)
Settings for :mod:`decimal` internal C extension are now detected by
:program:`configure`. The bundled `libmpdec` library is built in
``Makefile``.

Signed-off-by: Christian Heimes <christian@python.org>
2021-11-13 13:56:16 +01:00
Guido van Rossum 1cbaa505d0
bpo-45696: Deep-freeze selected modules (GH-29118)
This gains 10% or more in startup time for `python -c pass` on UNIX-ish systems.

The Makefile.pre.in generating code builds on Eric's work for bpo-45020, but the .c file generator is new.

Windows version TBD.
2021-11-10 18:01:53 -08:00
Christian Heimes fc9b622819
bpo-45723: Add --with-pkg-config to configure (GH-29517)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-11-10 23:02:19 +01:00
Christian Heimes 0a9f69539b
bpo-45747: Detect gdbm/dbm dependencies in configure (GH-29467)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-11-10 20:26:55 +01:00
Erlend Egeberg Aasland 76d14fac72
bpo-45723: Improve and simplify more configure.ac checks (GH-29485) 2021-11-10 16:30:18 +01:00
Erlend Egeberg Aasland 49171aa91a
bpo-45723: Remove dead code for obsolete `--with-dyld` option (GH-29500)
Was commented out by Jack Jansen in 2001-08-15 by commit
b6e9cad34ce46a6a733d8aa5bf5b9d389fa1316f:

"Ripped out Next/OpenStep support, which was broken anyway"

Automerge-Triggered-By: GH:tiran
2021-11-09 13:05:58 -08:00
Christian Heimes 5b7c7cb104
bpo-45763: Detect compression build deps in configure (GH-29483) 2021-11-09 16:42:53 +01:00
Erlend Egeberg Aasland 185533639d
bpo-45723: Remove obsolete AC_EXEEXT from configure.ac (GH-29486)
From the autoconf docs *Obsolete Macros* section:

    Defined the output variable EXEEXT based on the output of the 
    compiler, which is now done automatically. Typically set to empty
    string if Posix and ‘.exe’ if a DOS variant.
2021-11-09 07:32:59 -08:00
Christian Heimes 8fefaad242
bpo-45743: -Wl,-search_paths_first is no longer needed (GH-29464) 2021-11-09 09:06:41 +01:00
Christian Heimes cbab997efb
bpo-45723: Prepare support for autoconf 2.71 (GH-29441) 2021-11-08 19:31:14 +01:00
Erlend Egeberg Aasland 9bd0cf5970
bpo-45723: Add macro for disabling/enabling CC warnings (GH-29466)
Co-authored-by: Christian Heimes <christian@python.org>
2021-11-08 18:58:22 +01:00
Christian Heimes 57c50c9c7c
bpo-45723: Add helper macros and more caching to configure.ac (GH-29429)
Almost all checks are now cached by AC_CACHE_CHECK().

Common patterns are replaced by helper macros.

Variable names now use naming scheme ``ac_cv_func_$funcname``,
``ac_cv_lib_$library_$funcname``, or ``ac_cv_header_$headername_h``.

``SYS_SELECT_WITH_SYS_TIME`` is no longer used.

``uuid_create`` and ``uuid_enc_be`` are provided by libc on BSD. It is
safe to use ``AC_CHECK_FUNCS`` here.

Caching speeds up ./configure -C from ~ 4s to 2.6s on my system.

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2021-11-08 08:06:31 +01:00
Christian Heimes be3cd5c05d
bpo-45723: Detect missing pkg-config (GH-29442) 2021-11-07 11:18:45 +01:00
Christian Heimes e9594f6747
bpo-45731: Handle --enable-loadable-sqlite-extensions in configure (GH-29434) 2021-11-06 10:30:37 +01:00
Christian Heimes 77a1f8d94c
bpo-43158: Use configure values for building _uuid extension (GH-29353) 2021-11-02 12:25:13 +01:00
Christian Heimes 4c95fb4640
bpo-45548: Fix out-of-tree and Debian builds (GH-29263)
Add Modules subdirs to SRCDIRS to generate directories for out-of-tree
object files.

Debian wants ncurses lib. Works on Fedora, too.

Debian also needs pkg-config to detect correct flags.

Remove more outdated comments. Makefile now tracks header dependencies
-lintl is injected by configure when needed. Build _dbm with
gdbm-compat.

Group some modules by purpose. socket, select, and mmap work on Windows,
too.
2021-10-28 11:57:38 +02:00
Christian Heimes 77e3f224d6
bpo-45548: Remove checks for finite and gamma (GH-29206) 2021-10-25 18:25:43 +02:00
Christian Heimes fa26245a1c
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>
2021-10-25 01:25:27 -07:00