Commit Graph

794 Commits

Author SHA1 Message Date
Sam Gross b21d15fa95
[3.13] gh-127081: use `getlogin_r` if available (gh-132751) (#135098)
The `getlogin` function is not thread-safe: replace with `getlogin_r` where
available.
(cherry picked from commit 1ffe913c20)

Co-authored-by: Duane Griffin <duaneg@dghda.com>
2025-06-03 14:41:26 -04:00
Erlend E. Aasland 436064afd8
[3.13] gh-127614: Correctly check for ttyname_r() in configure (#128503) (#128598)
(cherry picked from commit e08b28235a)

PR #14868 replaced the ttyname() call with ttyname_r(), but the old
check remained.
2025-01-11 11:47:49 +00:00
Miss Islington (bot) 692a955cea
[3.13] gh-128472: Add `-skip-funcs` to BOLT options to fix computed goto errors (gh-128511) (#128573)
gh-128472: Add `-skip-funcs` to BOLT options to fix computed goto errors (gh-128511)

* Add `-skip-funcs` to BOLT options to fix computed goto errors



* NEWS

---------

(cherry picked from commit 24b147a19b)

Co-authored-by: Zanie Blue <contact@zanie.dev>
Co-authored-by: Gregory Szorc <gregory.szorc@gmail.com>
2025-01-08 01:59:20 +09:00
Miss Islington (bot) 40fd466c97
[3.13] gh-128437: Add `BOLT_COMMON_FLAGS` with `-update-debug-sections` (gh-128455) (gh-128512)
gh-128437: Add `BOLT_COMMON_FLAGS` with `-update-debug-sections` (gh-128455)

Add `BOLT_COMMON_FLAGS` with `-update-debug-sections`

(cherry picked from commit b60044b838)

Co-authored-by: Zanie Blue <contact@zanie.dev>
Co-authored-by: Gregory Szorc <gregory.szorc@gmail.com>
2025-01-05 18:22:34 +09:00
Zanie Blue 855af3bbc6
[3.13] gh-128354: Consistently use LIBS over LDFLAGS in library build… (#128465)
(cherry picked from commit b75ed951d4)
2025-01-04 00:50:13 +00:00
Miss Islington (bot) b923f4879e
[3.13] gh-128456: Use '-reorder-functions=cdsort' for BOLT builds (GH-128457) (#128461)
'hfsort+' is deprecated in favor of 'cdsort'.

(cherry picked from commit 4974bbdb29)

Co-authored-by: Zanie Blue <contact@zanie.dev>
2025-01-04 00:49:21 +01:00
Miss Islington (bot) 5a892cbd46
[3.13] gh-128321: Set LIBS instead of LDFLAGS when checking sqlite3 requirements (GH-128322) (#128356)
(cherry picked from commit 81376fef76)

Co-authored-by: Zanie Blue <contact@zanie.dev>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-12-30 17:48:32 +00:00
Miss Islington (bot) 3e11b5c2ba
[3.13] gh-93312: Include <sys/pidfd.h> to get PIDFD_NONBLOCK (GH-127593) (#127630)
gh-93312: Include <sys/pidfd.h> to get PIDFD_NONBLOCK (GH-127593)
(cherry picked from commit fcbe6ecdb6)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-12-05 10:02:17 +00:00
Brett Cannon 9ecaee6a55
[3.13] GH-123877: make `wasm32-wasip1` the target triple for WASI (#126561) 2024-11-07 16:16:12 -08:00
Erlend E. Aasland 9dd3addc0c
[3.13] gh-89640: harden float word ordering (#125571 and #126387) (#126429)
Properly detect float word ordering on Linux (gh-125571)

autoconf-archive patch by Dan Amelang.

(cherry picked from commit 26d627779f)

Hardcode WASM float word ordering to little endian (gh-126387)

(cherry picked from commit 532fc08102)
2024-11-05 23:18:55 +01:00
Miss Islington (bot) f702ea24fa
[3.13] gh-125698: Autoconf: Sync EXEEXT and ac_exeext (GH-125995) (#126006)
(cherry picked from commit 8b7cdc5e0c)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-10-26 15:36:03 +00:00
Miss Islington (bot) 909d5ac295
[3.13] gh-115382: Fix cross compiles when host and target use same SOABI
Co-authored-by: Vincent Fazio <vfazio@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-10-20 08:20:34 +01:00
Miss Islington (bot) 8cf646adea
[3.13] gh-125269: Use `AC_LINK_IF_ELSE` to detect if `-latomic` is needed (GH-125416) (#125493)
gh-125269: Use `AC_LINK_IF_ELSE` to detect if `-latomic` is needed (GH-125416)

We previously used `AC_RUN_IF_ELSE` with a short test program to detect
if `-latomic` is needed, but that requires choosing a specific default
value when cross-compiling because the test program is not run.
Some cross compilation targets like `wasm32-emscripten` do not support
`-latomic`, while other cross compilation targets, like
`arm-linux-gnueabi` require it.
(cherry picked from commit 8d42e2d915)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-10-15 11:29:03 +02:00
Victor Stinner d432fa43b9
[3.13] Fix typos (#123775) (#123866)
Fix typos (#123775)

(cherry picked from commit 9017b95ff2)

Co-authored-by: algonell <algonell@gmail.com>
2024-10-07 23:44:31 +02:00
Miss Islington (bot) 8af2d18111
[3.13] gh-124043: Disallow mixing `--with-trace-refs` and `--disable-gil` (GH-124078) (#124138)
gh-124043: Disallow mixing `--with-trace-refs` and `--disable-gil` (GH-124078)

Tracing references is not currently thread-safe in the free-threaded build.
(cherry picked from commit 3b45df03a4)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2024-09-23 17:24:35 -07:00
Miss Islington (bot) e68f30ecd2
[3.13] gh-123716: Fix 'Bad substitution' syntax error in configure script for NetBSD compatibility (GH-123717) (#123752)
gh-123716: Fix 'Bad substitution' syntax error in configure script for NetBSD compatibility (GH-123717)
(cherry picked from commit 42f52431e9)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
2024-09-06 22:55:29 +02:00
Miss Islington (bot) 8ed77c1afc
[3.13] Ensure clang++ is autodetected on iOS. (gh-123749) (#123758)
Ensure clang++ is autodetected on iOS. (gh-123749)
(cherry picked from commit d359c7c47b)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2024-09-06 10:13:27 +08:00
Miss Islington (bot) 8a4f708220
[3.13] gh-122571: Remove duplicate definition of PY_BUILTIN_HASHLIB_HASHES in configure.ac (GH-122572) (#122763)
gh-122571: Remove duplicate definition of PY_BUILTIN_HASHLIB_HASHES in configure.ac (GH-122572)

The redefinition in confdefs.h can cause issues with the
AX_CHECK_COMPILE_FLAG macro.
(cherry picked from commit b5e142ba7c)

Co-authored-by: Jonathan Protzenko <protz@microsoft.com>
2024-09-02 12:52:21 +02:00
Miss Islington (bot) 42005c77a0
[3.13] gh-116622: Rename build variable MODULE_LDFLAGS back to LIBPYTHON (GH-122764) (GH-122842)
gh-116622: Rename build variable MODULE_LDFLAGS back to LIBPYTHON (GH-122764)

(LIBPYTHON was renamed MODULE_LDFLAGS in commit 7f5e3f04f.)
(cherry picked from commit 2f5c3b09e4)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
2024-08-09 14:45:04 -07:00
Serhiy Storchaka 9f6f8790ef
Revert "[3.13] gh-120713: Normalize year with century for datetime.strftime (GH-120820) (GH-121144)" (GH-122408)
This reverts commit 009618f112.
2024-07-29 21:55:28 +03:00
Miss Islington (bot) 587a8f84ed
[3.13] gh-120522: Apply App Store compliance patch during installation (GH-121947) (#122105)
gh-120522: Apply App Store compliance patch during installation (GH-121947)

Adds a --with-app-store-compliance configuration option that patches out code known to be an issue with App Store review processes. This option is applied automatically on iOS, and optionally on macOS.
(cherry picked from commit 728432c804)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2024-07-22 08:13:34 +08:00
Miss Islington (bot) f0e4b02c39
[3.13] gh-120522: Revert "Add a `--with-app-store-compliance` configure option to patch out problematic code" (GH-121844) (#121845)
This reverts commit 0dfb437a32 prior
to the release of 3.13.0b4 to allow for additional review time.
(cherry picked from commit f27593a87c)

Co-authored-by: Ned Deily <nad@python.org>
2024-07-16 11:14:19 +00:00
Miss Islington (bot) a1505afd39
[3.13] gh-120831: Increase the default minimum supported iOS version to 13.0 (GH-121250) (#121833)
gh-120831: Increase the default minimum supported iOS version to 13.0 (GH-121250)

Increases the default minimum iOS version to 13.0.

(cherry picked from commit 7e91e0dcfe)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-07-16 12:57:05 +08:00
Miss Islington (bot) 35f7155bc3
[3.13] gh-121103: Put free-threaded libraries in `lib/python3.14t` (GH-121293) (#121631)
On POSIX systems, excluding macOS framework installs, the lib directory
for the free-threaded build now includes a "t" suffix to avoid conflicts
with a co-located default build installation.
(cherry picked from commit e8c91d90ba)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2024-07-11 21:00:28 +00:00
Miss Islington (bot) 678fb82cd5
[3.13] gh-121201: Disable perf_trampoline on riscv64 for now (GH-121328) (#121336)
gh-121201: Disable perf_trampoline on riscv64 for now (GH-121328)

Disable perf_trampoline on riscv64 for now

Until support is added in perf_jit_trampoline.c

gh-120089 was incomplete.
(cherry picked from commit ca2e876500)

Co-authored-by: Stefano Rivera <stefano@rivera.za.net>
2024-07-04 08:57:52 +00:00
Miss Islington (bot) 82777cd024
[3.13] gh-113565: Improve and harden detection of curses dependencies (GH-119816) (#121202)
1. Use pkg-config to check for ncursesw/panelw. If that fails, use
   pkg-config to check for ncurses/panel.
2. Regardless of pkg-config output, search for curses/panel headers, so
   we're sure we have all defines in pyconfig.h.
3. Regardless of pkg-config output, check if libncurses or libncursesw
   contains the 'initscr' symbol; if it does _and_ pkg-config failed
   earlier, add the resulting -llib linker option to CURSES_LIBS.
   Ditto for 'update_panels' and PANEL_LIBS.
4. Wrap the rest of the checks with WITH_SAVE_ENV and make sure we're
   using updated LIBS and CPPFLAGS for those.

Add the PY_CHECK_CURSES convenience macro.
(cherry picked from commit f80376b129)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-07-01 08:35:38 +00:00
Miss Islington (bot) 0dfb437a32
[3.13] gh-120522: Add a `--with-app-store-compliance` configure option to patch out problematic code (GH-120984) (#121173)
gh-120522: Add a `--with-app-store-compliance` configure option to patch out problematic code (GH-120984)

* Add --app-store-compliance configuration option.

* Added blurb.

* Correct tab-vs-spaces formatting issue.

* Correct source file name in docs.



* Correct source code reference in Mac docs



* Only apply the patch forward, and ensure the working directory is correct.

* Make patching reslient to multiple builds.

* Documentation fixes found during review



* Documentation and configure.ac syntax improvements



* Regenerate configure script.

* Silence the patch echo output.

---------

(cherry picked from commit 48cd104b0c)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-06-30 09:10:34 +08:00
Miss Islington (bot) 009618f112
[3.13] gh-120713: Normalize year with century for datetime.strftime (GH-120820) (GH-121144)
(cherry picked from commit 6d34938dc8)

Co-authored-by: blhsing <blhsing@gmail.com>
2024-06-29 06:57:33 +00:00
Miss Islington (bot) d26ce50f7b
[3.13] gh-120671: Fix PY_CHECK_CC_WARNING() in configure.ac (GH-120822) (#120985)
gh-120671: Fix PY_CHECK_CC_WARNING() in configure.ac (GH-120822)

Add missing space in AS_VAR_APPEND() on CFLAGS.
(cherry picked from commit 2106c9bef0)

Co-authored-by: Michael Allwright <allsey87@gmail.com>
2024-06-25 08:17:53 +00:00
Miss Islington (bot) d73f856840
[3.13] gh-120400 :Support Linux perf profile to see Python calls on RISC-V architecture (GH-120089) (#120413)
gh-120400 :Support Linux perf profile to see Python calls on RISC-V architecture (GH-120089)
(cherry picked from commit 4b1e85bafc)

Co-authored-by: ixgbe00 <yangwang@iscas.ac.cn>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2024-06-14 17:03:24 +02:00
Miss Islington (bot) eb6a99485f
[3.13] gh-120154: Fix Emscripten/WASI pattern in case statement for LDSHARED (GH-120173) (#120199)
Fix Emscripten/WASI pattern in case statement for LDSHARED
(cherry picked from commit 47816f465e)

Co-authored-by: Michael Allwright <contact@allwright.io>
2024-06-07 09:16:43 +00:00
Miss Islington (bot) e370b642ea
[3.13] gh-115119: Fall back to bundled libmpdec if system libmpdec is not found (GH-119196) (#119217)
(cherry picked from commit 642b25b9a8)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-05-20 16:10:21 +00:00
Erlend E. Aasland 325a1da18d
gh-115119: Default to --with-system-libmpdec=yes (#118539)
Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
2024-05-06 21:16:08 +02:00
Davide Rizzo 08d169f14a
gh-109617: fix ncurses incompatibility on macOS with Xcode 15 (#111258)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2024-05-04 23:41:47 +02:00
Guido van Rossum a524152b8c
gh-118335: Make REGEN_JIT_COMMAND empty if tier2 interpreter enabled (#118493)
Also patch up news blurb for gh-118339
(add warning that PYTHON_UOPS is now PYTHON_JIT).
2024-05-01 16:36:29 -07:00
Malcolm Smith 75955110a6
gh-116622: Android sysconfig updates (#118352) 2024-05-01 16:47:54 +00:00
Guido van Rossum 7d83f7bcc4
gh-118335: Configure Tier 2 interpreter at build time (#118339)
The code for Tier 2 is now only compiled when configured
with `--enable-experimental-jit[=yes|interpreter]`.

We drop support for `PYTHON_UOPS` and -`Xuops`,
but you can disable the interpreter or JIT
at runtime by setting `PYTHON_JIT=0`.
You can also build it without enabling it by default
using `--enable-experimental-jit=yes-off`;
enable with `PYTHON_JIT=1`.

On Windows, the `build.bat` script supports
`--experimental-jit`, `--experimental-jit-off`,
`--experimental-interpreter`.

In the C code, `_Py_JIT` is defined as before
when the JIT is enabled; the new variable
`_Py_TIER2` is defined when the JIT *or* the
interpreter is enabled. It is actually a bitmask:
1: JIT; 2: default-off; 4: interpreter.
2024-04-30 18:26:34 -07:00
Malcolm Smith 3b268f4edc
gh-116622: Redirect stdout and stderr to system log when embedded in an Android app (#118063) 2024-04-30 16:00:31 +02:00
Erlend E. Aasland c7e7bfc4ca
gh-115119: Detect _decimal dependencies using pkg-config (#115406)
pkg-config is supported for libmpdec 4.0.0 and newer.
2024-04-29 08:58:57 +02:00
Eric Snow 03e3e31723
gh-76785: Rename _xxsubinterpreters to _interpreters (gh-117791)
See https://discuss.python.org/t/pep-734-multiple-interpreters-in-the-stdlib/41147/26.
2024-04-24 16:18:24 +00:00
Yichen Yan e17cd1fbfd
gh-116984: Install mimalloc headers (#116985)
- Install mimalloc header only when enabled
- Rename WITH_MIMALLOC to INSTALL_MIMALLOC
2024-04-23 09:56:00 +02:00
Joshua Root 8515fd79fe
gh-117845: Detect libedit hook function signature in configure (#117870)
Older libedit versions (like Apple's) use a different type signature
for rl_startup_hook and rl_pre_input_hook. Add a configure check to
determine which signature is accepted by introducing the
Py_RL_STARTUP_HOOK_TAKES_ARGS macro in pyconfig.h.
2024-04-17 11:26:10 +02:00
Victor Stinner 919784737c
gh-117645: Increase WASI stack size from 512 KiB to 8 MiB (#117674)
Increase also the initial memory from 10 MiB to 20 MiB.

Reenable test_dynamic on WASI build.
2024-04-16 23:26:54 +02:00
Erlend E. Aasland 0dcfd0d522
Autoconf: aarch64-apple-darwin/clang is now a tier 1 platform (#117861)
See also python/pep#3705
2024-04-14 09:21:29 +02:00
Erlend E. Aasland 3095d02642
gh-96398: Fix mpicc check in configure.ac (#117857) 2024-04-13 21:22:06 +00:00
Erlend E. Aasland c2a551a30b
gh-96398: Detect GCC compatible compilers in configure (#117825)
Introduce a cached variable $ac_cv_gcc_compat and set it to 'yes' if
the C preprocessor defines the __GNUC__ macro.
2024-04-13 09:05:07 +02:00
Erlend E. Aasland 4ce10da36f
gh-96398: Detect emcc and mpicc in compiler names in configure (#117819)
- emcc defines __EMSCRIPTEN__
- mpicc doesn't define anything in particular; detect it using basename
2024-04-12 16:33:29 +02:00
Erlend E. Aasland 1ddbeae040
gh-117752: Autoconf: fix PGO builds for 'make -C build' incantations (#117803) 2024-04-12 09:36:40 +00:00
Erlend E. Aasland 49fc1414b5
gh-117752: Autoconf: fix -fno-semantic-interposition check (#117789)
Force the compiler to issue an error if the flag is not supported.
2024-04-12 09:37:38 +02:00
Erlend E. Aasland 396b831850
gh-117752: Autoconf: store all LLVM profile data in the build directory (#117790)
This prevents spurious 'env changed' and llvm-profdata merge errors.
2024-04-12 07:23:39 +02:00