summaryrefslogtreecommitdiffstats
path: root/configure
Commit message (Collapse)AuthorAgeFilesLines
* gh-114099: Refactor configure and Makefile to accomodate non-macOS ↵Russell Keith-Magee2024-02-121-174/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | frameworks (#115120) Part of the PEP 730 work to add iOS support. This change lays the groundwork for introducing iOS/tvOS/watchOS frameworks; it includes the structural refactoring needed so that iOS branches can be added into in a subsequent PR. Summary of changes: * Updates config.sub to the 2024-01-01 release. This is the "as released" version of config.sub. * Adds a RESSRCDIR variable to allow sharing of macOS and iOS Makefile steps. * Adds an INSTALLTARGETS variable so platforms can customise which targets are actually installed. This will be used to exclude certain targets (e.g., binaries, manfiles) from iOS framework installs. * Adds a PYTHONFRAMEWORKINSTALLNAMEPREFIX variable; this is used as the install name for the library. This is needed to allow for iOS frameworks to specify an @rpath-based install name. * Evaluates MACHDEP earlier in the configure process so that ac_sys_system is available. * Modifies _PYTHON_HOST_PLATFORM evaluation for cross-platform builds so that the CPU architecture is differentiated from the host identifier. This will be used to generate a _PYTHON_HOST_PLATFORM definition that includes ABI information, not just CPU architecture. * Differentiates between SOABI_PLATFORM and PLATFORM_TRIPLET. SOABI_PLATFORM is used in binary module names, and includes the ABI, but not the OS or CPU architecture (e.g., math.cpython-313-iphonesimulator.dylib). PLATFORM_TRIPLET is used as the sys._multiarch value, and on iOS will contains the ABI and architecture (e.g., iphoneos-arm64). This differentiation hasn't historically been needed because while macOS is a multiarch platform, it uses a bare darwin as PLATFORM_TRIPLE. * Removes the use of the deprecated -Wl,-single_module flag when compiling macOS frameworks. * Some whitespace normalisation where there was a mix of spaces and tabs in a single block.
* GH-113632: update configure.ac for WebAssembly support tiers (#115192)Brett Cannon2024-02-091-4/+2
| | | Move WASI to tier 2 and drop Emscripten.
* gh-114883: Fix Makefile dependency tree for non-jit builds (GH-114884)Zachary Ware2024-02-031-0/+3
|
* gh-114875: Require getgrent for building the grp extension module (#114876)Malcolm Smith2024-02-021-1/+8
| | | Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
* gh-112606: Use pthread_cond_timedwait_relative_np() in parking_lot.c when ↵Matt Prodani2024-01-301-0/+6
| | | | | | | available (#112616) Add a configure define for HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP and replaces pthread_cond_timedwait() with pthread_cond_timedwait_relative_np() for relative time when supported in semaphore waiting logic.
* gh-85984: Add POSIX pseudo-terminal functions. (GH-102413)Soumendra Ganguly2024-01-291-0/+30
| | | | | Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com> Co-authored-by: Gregory P. Smith <greg@krypto.org> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* GH-113464: Add a JIT backend for tier 2 (GH-113465)Brandt Bucher2024-01-291-0/+31
| | | | | | | Add an option (--enable-experimental-jit for configure-based builds or --experimental-jit for PCbuild-based ones) to build an *experimental* just-in-time compiler, based on copy-and-patch (https://fredrikbk.com/publications/copy-and-patch.pdf). See Tools/jit/README.md for more information on how to install the required build-time tooling.
* gh-80532: Do not set ipv6type when cross-compiling (#17956)Zackery Spytz2024-01-051-1/+1
| | | Co-authored-by: Xavier de Gaye <xdegaye@gmail.com>
* gh-112536: Add support for thread sanitizer (TSAN) (gh-112648)Samet YASLAN2023-12-301-0/+25
|
* bpo-11102: Make configure enable major(), makedev(), and minor() on HP-UX ↵Zackery Spytz2023-12-281-0/+1
| | | | | | | (GH-19856) Always include <sys/types.h> before <sys/sysmacros.h>. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-110459: Make sure --with-openssl-rpath works on macOS (#113441)Ronald Oussoren2023-12-281-1/+6
| | | | | | | | * gh-110459: Make sure --with-openssl-rpath works on macOS On macOS the `-rpath` linker flag is spelled differently than on on platforms.
* gh-113117: Support posix_spawn in subprocess.Popen with close_fds=True (#113118)Jakub Kulík2023-12-171-0/+6
| | | | | | | | Add support for `os.POSIX_SPAWN_CLOSEFROM` and `posix_spawn_file_actions_addclosefrom_np` and have the `subprocess` module use them when available. This means `posix_spawn` can now be used in the default `close_fds=True` situation on many platforms. Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
* gh-76785: More Fixes for test.support.interpreters (gh-113012)Eric Snow2023-12-121-0/+29
| | | This brings the module (along with the associated extension modules) mostly in sync with PEP 734. There are only a few small things to wrap up.
* gh-112970: Detect and use closefrom() when available (#112969)Sam James2023-12-121-0/+6
| | | | | | | | | | | glibc-2.34 implements closefrom(3) using the same semantics as on BSD. Check for closefrom() in configure and use the check result in fileutils.c, rather than hardcoding a FreeBSD check. Some implementations of closefrom() return an int. Explicitly discard the return value by casting it to void, to avoid future compiler warnings. Signed-off-by: Sam James <sam@gentoo.org>
* gh-112532: Require mimalloc in `--disable-gil` builds (gh-112883)Sam Gross2023-12-121-0/+2
|
* gh-112779: Check 1-byte atomics in configure (gh-112819)Sam Gross2023-12-081-4/+14
|
* gh-105323: Remove `WITH_APPLE_EDITLINE` to use the same declaration for all ↵Tian Gao2023-12-051-17/+0
| | | | editline (gh-112513)
* gh-111863: Rename `Py_NOGIL` to `Py_GIL_DISABLED` (#111864)Hugo van Kemenade2023-11-201-1/+1
| | | Rename Py_NOGIL to Py_GIL_DISABLED
* gh-112088: Run autoreconf in GHA check_generated_files (#112090)Victor Stinner2023-11-151-60/+60
| | | | | | | | | | | The "Check if generated files are up to date" job of GitHub Actions now runs the "autoreconf -ivf -Werror" command instead of the "make regen-configure" command to avoid depending on the external quay.io server. Add Tools/build/regen-configure.sh script to regenerate the configure with an Ubuntu container image. The "quay.io/tiran/cpython_autoconf:271" container image (https://github.com/tiran/cpython_autoconf) is no longer used.
* gh-111460: Restore ncurses widechar support on macOS (#111878)Davide Rizzo2023-11-131-1/+1
|
* gh-90815: Add mimalloc memory allocator (#109914)Dino Viehland2023-10-301-89/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add mimalloc v2.12 Modified src/alloc.c to remove include of alloc-override.c and not compile new handler. Did not include the following files: - include/mimalloc-new-delete.h - include/mimalloc-override.h - src/alloc-override-osx.c - src/alloc-override.c - src/static.c - src/region.c mimalloc is thread safe and shares a single heap across all runtimes, therefore finalization and getting global allocated blocks across all runtimes is different. * mimalloc: minimal changes for use in Python: - remove debug spam for freeing large allocations - use same bytes (0xDD) for freed allocations in CPython and mimalloc This is important for the test_capi debug memory tests * Don't export mimalloc symbol in libpython. * Enable mimalloc as Python allocator option. * Add mimalloc MIT license. * Log mimalloc in Lib/test/pythoninfo.py. * Document new mimalloc support. * Use macro defs for exports as done in: https://github.com/python/cpython/pull/31164/ Co-authored-by: Sam Gross <colesbury@gmail.com> Co-authored-by: Christian Heimes <christian@python.org> Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-110828: AIX 32bit build needs -latomic for _testcapi module (#110962)Ayappan Perumal2023-10-221-1/+2
|
* gh-111046: for wasi-threads, export memory as well via the linker (GH-111099)YAMAMOTO Takashi2023-10-201-0/+5
|
* gh-104169: Refactor tokenizer into lexer and wrappers (#110684)Lysandros Nikolaou2023-10-111-0/+2
| | | | | | | | | | | * The lexer, which include the actual lexeme producing logic, goes into the `lexer` directory. * The wrappers, one wrapper per input mode (file, string, utf-8, and readline), go into the `tokenizer` directory and include logic for creating a lexer instance and managing the buffer for different modes. --------- Co-authored-by: Pablo Galindo <pablogsal@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
* gh-78469: Declare missing sethostname for Solaris 10 (#109447)Jakub Kulík2023-10-091-0/+9
| | | Add OS version specific macro for Solaris: Py_SUNOS_VERSION.
* gh-109191: Fix build with newer editline (gh-110239)Bo Anderson2023-10-091-0/+19
|
* gh-108277: Add os.timerfd_create() function (#108382)Masaru Tsuchiyama2023-10-071-0/+50
| | | | | | | | Add wrapper for timerfd_create, timerfd_settime, and timerfd_gettime to os module. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* gh-105323: Update readline module to detect apple editline variant (gh-108665)Donghee Na2023-09-291-0/+17
|
* gh-109740: Use 't' in `--disable-gil` SOABI (#109922)Sam Gross2023-09-271-31/+34
| | | | Shared libraries for CPython 3.13 are now marked with a 't' for threading. For example, `binascii.cpython-313t-darwin.so`.
* gh-108724: Add PyMutex and _PyParkingLot APIs (gh-109344)Sam Gross2023-09-191-4/+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-5/+2
| | | | | | | 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/+84
| | | | | | | | | | | | | | | | 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-6/+0
| | | | 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-5/+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/+44
| | | | | 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/+31
| | | | | 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-0/+15
|
* gh-106881: Check for linux/limits.h before including it (#107397)justdan62023-07-281-0/+6
| | | | | * 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/+20
| | | | 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-10/+10
| | | SQLite 3.15.2 was released 2016-11-28.
* gh-90005: Don't link with libbsd if not needed (#105236)Erlend E. Aasland2023-06-061-2/+6
| | | | 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-7232/+10291
| | | Co-authored-by: Christian Heimes <christian@python.org>
* gh-89886: Rely on HAVE_SYS_TIME_H (#105058)Erlend E. Aasland2023-06-011-9/+1
| | | | | | | 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-23/+11
| | | Autoconf 2.70 macros are picky about argument quotation.