summaryrefslogtreecommitdiffstats
path: root/configure.ac
Commit message (Collapse)AuthorAgeFilesLines
* gh-108724: Add PyMutex and _PyParkingLot APIs (gh-109344)Sam Gross2023-09-191-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | PyMutex is a one byte lock with fast, inlineable lock and unlock functions for the common uncontended case. The design is based on WebKit's WTF::Lock. PyMutex is built using the _PyParkingLot APIs, which provides a cross-platform futex-like API (based on WebKit's WTF::ParkingLot). This internal API will be used for building other synchronization primitives used to implement PEP 703, such as one-time initialization and events. This also includes tests and a mini benchmark in Tools/lockbench/lockbench.py to compare with the existing PyThread_type_lock. Uncontended acquisition + release: * Linux (x86-64): PyMutex: 11 ns, PyThread_type_lock: 44 ns * macOS (arm64): PyMutex: 13 ns, PyThread_type_lock: 18 ns * Windows (x86-64): PyMutex: 13 ns, PyThread_type_lock: 38 ns PR Overview: The primary purpose of this PR is to implement PyMutex, but there are a number of support pieces (described below). * PyMutex: A 1-byte lock that doesn't require memory allocation to initialize and is generally faster than the existing PyThread_type_lock. The API is internal only for now. * _PyParking_Lot: A futex-like API based on the API of the same name in WebKit. Used to implement PyMutex. * _PyRawMutex: A word sized lock used to implement _PyParking_Lot. * PyEvent: A one time event. This was used a bunch in the "nogil" fork and is useful for testing the PyMutex implementation, so I've included it as part of the PR. * pycore_llist.h: Defines common operations on doubly-linked list. Not strictly necessary (could do the list operations manually), but they come up frequently in the "nogil" fork. ( Similar to https://man.freebsd.org/cgi/man.cgi?queue) --------- Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* gh-106213: Make Emscripten trampolines work with JSPI (GH-106219)Hood Chatham2023-09-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | There is a WIP proposal to enable webassembly stack switching which have been implemented in v8: https://github.com/WebAssembly/js-promise-integration It is not possible to switch stacks that contain JS frames so the Emscripten JS trampolines that allow calling functions with the wrong number of arguments don't work in this case. However, the js-promise-integration proposal requires the [type reflection for Wasm/JS API](https://github.com/WebAssembly/js-types) proposal, which allows us to actually count the number of arguments a function expects. For better compatibility with stack switching, this PR checks if type reflection is available, and if so we use a switch block to decide the appropriate signature. If type reflection is unavailable, we should use the current EMJS trampoline. We cache the function argument counts since when I didn't cache them performance was negatively affected. Co-authored-by: T. Wouters <thomas@python.org> Co-authored-by: Brett Cannon <brett@python.org>
* gh-109054: Don't use libatomic on cross-compilation (#109211)Victor Stinner2023-09-101-3/+4
| | | | | | | configure no longer uses libatomic by default when Python is cross-compiled. The LIBATOMIC variable can be set manually in this case: ./configure LIBATOMIC="-latomic" (...)
* gh-109054: configure checks if libatomic is needed (#109101)Victor Stinner2023-09-081-1/+61
| | | | | | | | | | | | | | | | Fix building the _testcapi extension on Linux AArch64 which requires linking to libatomic when <cpython/pyatomic.h> is used: the _Py_atomic_or_uint64() function requires libatomic __atomic_fetch_or_8() on this platform. The configure script now checks if linking to libatomic is needed and generates a new LIBATOMIC variable used to build the _testcapi extension. Building the _testcapi extension now uses the LIBATOMIC variable in its LDFLAGS, since Modules/_testcapi/pyatomic.c uses <cpython/pyatomic.h>. Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-108765: Python.h no longer includes <ieeefp.h> (#108781)Victor Stinner2023-09-021-1/+1
| | | | Remove also the HAVE_IEEEFP_H macro: remove ieeefp.h from the AC_CHECK_HEADERS() check of configure.ac.
* gh-108777: Split _PyTime tests from _testinternalcapi.c (gh-108787)Sam Gross2023-09-021-0/+1
|
* gh-108634: Py_TRACE_REFS uses a hash table (#108663)Victor Stinner2023-08-311-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python built with "configure --with-trace-refs" (tracing references) is now ABI compatible with Python release build and debug build. Moreover, it now also supports the Limited API. Change Py_TRACE_REFS build: * Remove _PyObject_EXTRA_INIT macro. * The PyObject structure no longer has two extra members (_ob_prev and _ob_next). * Use a hash table (_Py_hashtable_t) to trace references (all objects): PyInterpreterState.object_state.refchain. * Py_TRACE_REFS build is now ABI compatible with release build and debug build. * Limited C API extensions can now be built with Py_TRACE_REFS: xxlimited, xxlimited_35, _testclinic_limited. * No longer rename PyModule_Create2() and PyModule_FromDefAndSpec2() functions to PyModule_Create2TraceRefs() and PyModule_FromDefAndSpec2TraceRefs(). * _Py_PrintReferenceAddresses() is now called before finalize_interp_delete() which deletes the refchain hash table. * test_tracemalloc find_trace() now also filters by size to ignore the memory allocated by _PyRefchain_Trace(). Test changes for Py_TRACE_REFS: * Add test.support.Py_TRACE_REFS constant. * Add test_sys.test_getobjects() to test sys.getobjects() function. * test_exceptions skips test_recursion_normalizing_with_no_memory() and test_memory_error_in_PyErr_PrintEx() if Python is built with Py_TRACE_REFS. * test_repl skips test_no_memory(). * test_capi skisp test_set_nomemory().
* gh-108494: Don't build _testclinic_limited with TraceRefs (#108608)Victor Stinner2023-08-291-0/+1
| | | | | If Python is built with ./configure --with-trace-refs, don't build the _testclinic_limited extension. The limited C API (Py_LIMITED_API) is not compatible with Py_TRACE_REFS.
* gh-108465: Use compiler basename when determining compiler flags (#108392)John Micco2023-08-271-3/+6
| | | | | | Note: GNU Autoconf discourages the use of 'basename', and recommends 'expr' instead. Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-95855: Refactor platform triplet detection code, add detection for MIPS ↵Jeffery To2023-08-241-188/+4
| | | | | | | | | | | | | | | | | soft float and musl libc (#107221) - Move platform triplet detection code into Misc/platform_triplet.c - Refactor MIPS detection, use defined(__mips64) to detect MIPS64 - Compute libc values in separate section - Add detection for MIPS soft float - Add detection for musl musl supports SPE with its soft-float ABI: https://git.musl-libc.org/cgit/musl/commit/?id=7be59733d71ada3a32a98622507399253f1d5e48 Original patch by Christian Heimes. Co-authored-by: Christian Heimes <christian@python.org> Co-authored-by: Erlend E. Aasland <erlend@python.org>
* gh-108223: Add --disable-gil to configure (gh-108227)Sam Gross2023-08-211-0/+15
| | | | | The `--disable-gil` flags does not do anything yet other than define the Py_NOGIL macro. This is intended to support setting up additional buildbots.
* GH-107812: extend `socket`'s netlink support to FreeBSD (gh-107813)Mina Galić2023-08-101-1/+2
|
* gh-106881: Check for linux/limits.h before including it (#107397)justdan62023-07-281-1/+1
| | | | | * Check for linux/limits.h before including it Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-106962: Detect mpicc in configure.ac (#106961)Lukas van de Wiel2023-07-221-0/+3
| | | | Don't let autoconf mistake MPI compilers for Intel compilers; filter out the MPI case to prevent Intel specific options from being applied.
* gh-106123: Modules/_sha3 appears to no longer be necessary (#106124)Skip Montanaro2023-06-271-1/+0
|
* gh-101538: Add experimental wasi-threads build (#101537)YAMAMOTO Takashi2023-06-221-1/+17
| | | | Co-authored-by: Brett Cannon <brett@python.org> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-105875: Require SQLite 3.15.2 or newer (#105876)Erlend E. Aasland2023-06-181-3/+3
| | | SQLite 3.15.2 was released 2016-11-28.
* gh-89886: Use Autoconf quadrigraphs where appropriate (#105226)Erlend E. Aasland2023-06-071-44/+44
|
* gh-90005: Don't link with libbsd if not needed (#105236)Erlend E. Aasland2023-06-061-3/+2
| | | | The regression was introduced with commit 5b946cada. Restore pre gh-29696 behaviour.
* GH-89886: Bump to GNU Autoconf v2.71 (#104925)Erlend E. Aasland2023-06-011-2/+9
| | | Co-authored-by: Christian Heimes <christian@python.org>
* gh-89886: Rely on HAVE_SYS_TIME_H (#105058)Erlend E. Aasland2023-06-011-7/+3
| | | | | | | Quoting autoconf (v2.71): All current systems provide time.h; it need not be checked for. Not all systems provide sys/time.h, but those that do, all allow you to include it and time.h simultaneously.
* gh-89886: Properly quote Autoconf macro arguments (#105062)Erlend E. Aasland2023-05-301-683/+787
| | | Autoconf 2.70 macros are picky about argument quotation.
* gh-104773: PEP 594: Remove the audioop module (#104937)Victor Stinner2023-05-251-1/+0
|
* gh-104773: PEP 594: Remove the crypt module (#104908)Victor Stinner2023-05-251-48/+2
| | | | Remove the crypt module and its private _crypt extension, deprecated in Python 3.11.
* gh-104773: Fix PY_STDLIB_MOD_SET_NA() on macOS (#104901)Victor Stinner2023-05-241-0/+2
| | | The _scproxy is available on macOS: fix configure script.
* gh-104773: PEP 594: Remove the nis module (#104897)Victor Stinner2023-05-241-28/+2
|
* gh-104773: PEP 594: Remove the spwd module (#104871)Victor Stinner2023-05-241-6/+2
| | | Remove spwd from the configure script and Modules/Setup.
* gh-104773: Remove OSSAUDIODEV_LIBS variable (#104864)Victor Stinner2023-05-241-6/+0
| | | | Update configure script for ossaudiodev removal: remove the OSSAUDIODEV_LIBS variable.
* gh-104773: PEP 594: Remove the ossaudiodev module (#104862)Victor Stinner2023-05-241-5/+1
| | | | | * Remove ossaudiodev extension in configure.ac and regenerate the configure script. * Remove ossaudiodev in Modules/Setup and Modules/Setup.stdlib.in.
* gh-101282: Enclose BOLT_APPLY_FLAGS value in double quotes (gh-104752)Dong-hee Na2023-05-241-17/+17
|
* Python 3.13.0a0Thomas Wouters2023-05-221-2/+2
|
* gh-101282: Apply BOLT optimizations to libpython for shared builds (#104709)Gregory Szorc2023-05-221-7/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Apply BOLT optimizations to libpython for shared builds. Most of the C code is in libpython so it is critical to apply BOLT there fully realize BOLT benefits. This change also reworks how BOLT instrumentation is applied. It effectively removes the readelf based logic added in gh-101525 and replaces it with a mechanism that saves a copy of the pre-bolt binary and restores that copy when necessary. This allows us to perform BOLT optimizations without having to manually delete the output binary to force a new bolt run. Also: - add a clean-bolt target for purging BOLT files and hook that up to the clean target - .gitignore BOLT related files Before and after this refactor, `make` will no-op after a previous run. Both versions should also share common make DAG deficiencies where targets fail to trigger as often as they need to or can trigger prematurely in certain scenarios. e.g. after this change you may need to `rm profile-bolt-stamp` to force a BOLT run because there aren't appropriate non-phony targets for BOLT's make target to depend on. To make it easier to iterate on custom BOLT settings, the flags to pass to instrumentation and application are now defined in configure and can be overridden by passing BOLT_INSTRUMENT_FLAGS and BOLT_APPLY_FLAGS.
* gh-104487: PYTHON_FOR_REGEN must be minimum Python 3.10 (#104488)Erlend E. Aasland2023-05-151-1/+1
| | | Also include Python 3.12 in the list of accepted versions.
* gh-101282: move BOLT config after PGO (gh-104493)Gregory Szorc2023-05-151-62/+62
|
* gh-90656: Add platform triplets for 64-bit LoongArch (LA64) (#30939)Zhang Na2023-05-091-0/+14
| | | | Signed-off-by: Zhang Na <zhangna@loongson.cn> Co-authored-by: WANG Xuerui <git@xen0n.name>
* gh-103509: PEP 697 -- Limited C API for Extending Opaque Types (GH-103511)Petr Viktorin2023-05-041-0/+1
| | | | Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-101525: Fix make test if the --enable-bolt enabled (gh-103574)Dong-hee Na2023-04-171-0/+7
|
* gh-103326: Remove `Python/importlib.h` (GH-103331)Nikita Sobolev2023-04-121-1/+0
| | | | Co-authored-by: Brett Cannon <brett@python.org> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* gh-96821: Add config option `--with-strict-overflow` (#96823)Matthias Görgens2023-03-041-9/+45
| | | | | | Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Shantanu <hauntsaninja@gmail.com>
* gh-99108: Import MD5 and SHA1 from HACL* (#102089)Jonathan Protzenko2023-02-221-2/+6
| | | Replaces our fallback non-OpenSSL MD5 and SHA1 implementations with those from HACL* as we've already done with SHA2.
* gh-99942: correct the pkg-config/python-config flags for cygwin/androidEli Schwartz2023-02-161-1/+1
|
* gh-99108: Refactor _sha256 & _sha512 into _sha2. (#101924)Gregory P. Smith2023-02-161-10/+6
| | | | | | | | | This merges their code. They're backed by the same single HACL* static library, having them be a single module simplifies maintenance. This should unbreak the wasm enscripten builds that currently fail due to linking in --whole-archive mode and the HACL* library appearing twice. Long unnoticed error fixed: _sha512.SHA384Type was doubly assigned and was actually SHA512Type. Nobody depends on those internal names. Also rename LIBHACL_ make vars to LIBHACL_SHA2_ in preperation for other future HACL things.
* gh-99108: Import SHA2-384/512 from HACL* (#101707)Jonathan Protzenko2023-02-141-1/+3
| | | | | | Replace the builtin hashlib implementations of SHA2-384 and SHA2-512 originally from LibTomCrypt with formally verified, side-channel resistant code from the [HACL*](https://github.com/hacl-star/hacl-star/) project. The builtins remain a fallback only used when OpenSSL does not provide them.
* gh-92547: Purge sqlite3_enable_shared_cache() detection from configure (#101873)Erlend E. Aasland2023-02-131-1/+0
|
* gh-99108: Replace SHA2-224 & 256 with verified code from HACL* (#99109)Jonathan Protzenko2023-02-071-1/+4
| | | | | | | | | | | | | | | | | | | | | | replacing hashlib primitives (for the non-OpenSSL case) with verified implementations from HACL*. This is the first PR in the series, and focuses specifically on SHA2-256 and SHA2-224. This PR imports Hacl_Streaming_SHA2 into the Python tree. This is the HACL* implementation of SHA2, which combines a core implementation of SHA2 along with a layer of buffer management that allows updating the digest with any number of bytes. This supersedes the previous implementation in the tree. @franziskuskiefer was kind enough to benchmark the changes: in addition to being verified (thus providing significant safety and security improvements), this implementation also provides a sizeable performance boost! ``` --------------------------------------------------------------- Benchmark Time CPU Iterations --------------------------------------------------------------- Sha2_256_Streaming 3163 ns 3160 ns 219353 // this PR LibTomCrypt_Sha2_256 5057 ns 5056 ns 136234 // library used by Python currently ``` The changes in this PR are as follows: - import the subset of HACL* that covers SHA2-256/224 into `Modules/_hacl` - rewire sha256module.c to use the HACL* implementation Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-101524: Split Up the _xxsubinterpreters Module (gh-101526)Eric Snow2023-02-041-0/+2
| | | | | This is step 1 in potentially dropping all the "channel"-related code. Channels have already been removed from PEP 554. https://github.com/python/cpython/issues/101524
* gh-101278: Drop -gdwarf-4 flag from the BOLT build (gh-101280)Dong-hee Na2023-01-241-3/+0
|
* gh-101060: conditionally add `-fno-reorder-blocks-and-partition` (gh-101061)Gregory Szorc2023-01-241-1/+6
|
* gh-101047: Remove vestigial references to macOS libtool options (gh-101048)Gregory Szorc2023-01-221-76/+0
| | | | LIBTOOL_CRUFT and OTHER_LIBTOOL_OPT variables have been unused since commit 19199830f7f880b1e9cff5d92d30706fd8bb4700 in 2011.
* gh-100340: Allows -Wno-int-conversion for wasm (#100341)Kushal Das2023-01-181-0/+4
| | | Fixes #100340 allows -Wno-int-conversion for wasm