Commit graph

701 commits

Author SHA1 Message Date
Erlend E. Aasland
6b3371914c
[3.12] gh-127614: Correctly check for ttyname_r() in configure (#128503) (#128599)
(cherry picked from commit e08b28235a)

PR #14868 replaced the ttyname() call with ttyname_r(), but the old
check remained.
2025-01-07 22:05:42 +00:00
Miss Islington (bot)
115d5043b1
[3.12] gh-128472: Add -skip-funcs to BOLT options to fix computed goto errors (gh-128511) (gh-128572)
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-07 14:21:43 +09:00
Miss Islington (bot)
90535fe021
[3.12] gh-128437: Add BOLT_COMMON_FLAGS with -update-debug-sections (gh-128455) (gh-128513)
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:23:04 +09:00
Zanie Blue
f2cc565b99
[3.12] gh-128354: Consistently use LIBS over LDFLAGS in library build… (#128466)
(cherry picked from commit b75ed951d4)
2025-01-04 00:47:08 +00:00
Miss Islington (bot)
d56e50229e
[3.12] gh-128456: Use '-reorder-functions=cdsort' for BOLT builds (GH-128457) (#128462)
'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:05 +01:00
Miss Islington (bot)
4ddee55c5c
[3.12] gh-128321: Set LIBS instead of LDFLAGS when checking sqlite3 requirements (GH-128322) (#128355)
(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:42:49 +00:00
Victor Stinner
288d6d04ae
[3.12] gh-93312: Include <sys/pidfd.h> to get PIDFD_NONBLOCK (#127593) (#127631)
gh-93312: Include <sys/pidfd.h> to get PIDFD_NONBLOCK (#127593)

(cherry picked from commit fcbe6ecdb6)
2024-12-05 09:59:53 +00:00
Erlend E. Aasland
b00887d176
[3.12] gh-89640: harden float word ordering (#125571 and #126387) (#126430)
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:19:13 +01:00
Miss Islington (bot)
fe4585a674
[3.12] gh-125698: Autoconf: Sync EXEEXT and ac_exeext (GH-125995) (#126007)
(cherry picked from commit 8b7cdc5e0c)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-10-26 15:27:38 +00:00
Victor Stinner
53af5b2dd2
[3.12] gh-123917: Fix crypt check in configure (#123952)
Use a global volatile variable and check if the function is not NULL
to use the variable. Otherwise, a compiler optimization can remove
the variable making the check useless.

Co-authored-by: Paul Smith <paul@mad-scientist.net>
2024-09-12 16:21:31 +02:00
Victor Stinner
8b16ec65a2
[3.12] Fix typos (#123775) (#123867)
Fix typos (#123775)

(cherry picked from commit 9017b95ff2)

Co-authored-by: algonell <algonell@gmail.com>
2024-09-09 13:22:13 +00:00
Serhiy Storchaka
e6878fc3c8
Revert "[3.12] gh-120713: Normalize year with century for datetime.strftime (GH-120820) (GH-121145)" (GH-122409)
This reverts commit 027902b56f.
2024-07-29 21:55:12 +03:00
Serhiy Storchaka
027902b56f
[3.12] gh-120713: Normalize year with century for datetime.strftime (GH-120820) (GH-121145)
(cherry picked from commit 6d34938dc8)

Co-authored-by: blhsing <blhsing@gmail.com>
2024-06-29 06:54:27 +00:00
Miss Islington (bot)
433a5f89c9
[3.12] gh-120671: Fix PY_CHECK_CC_WARNING() in configure.ac (GH-120822) (#120986)
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:11:22 +00:00
Miss Islington (bot)
a9f2daf1ab
[3.12] GH-115983: skip building shared modules for testing under WASI (GH-116528) (#120316)
GH-115983: skip building shared modules for testing under WASI (GH-116528)
(cherry picked from commit 8c094c3095)

Co-authored-by: Brett Cannon <brett@python.org>
2024-06-10 13:27:04 +00:00
Victor Stinner
315611aac8
[3.12] gh-120154: Fix Emscripten/WASI pattern in case statement for LDSHARED… (#120204)
gh-120154: Fix Emscripten/WASI pattern in case statement for LDSHARED (#120173)

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:49:54 +00:00
Miss Islington (bot)
a39e01dd09
[3.12] gh-117752: Autoconf: fix PGO builds for 'make -C build' incantations (GH-117803) (#117805)
(cherry picked from commit 1ddbeae040)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-04-12 10:07:42 +00:00
Miss Islington (bot)
3f2f0cff75
[3.12] gh-117752: Autoconf: fix -fno-semantic-interposition check (GH-117789) (#117800)
Force the compiler to issue an error if the flag is not supported.
(cherry picked from commit 49fc1414b5)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-04-12 07:53:22 +00:00
Miss Islington (bot)
c64b65e3aa
[3.12] gh-117752: Autoconf: store all LLVM profile data in the build directory (GH-117790) (#117795)
This prevents spurious 'env changed' and llvm-profdata merge errors.

(cherry picked from commit 396b831850)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-04-12 05:39:14 +00:00
Antoine Pitrou
2ac1b48a04
[3.12] gh-112536: Add support for thread sanitizer (TSAN) (gh-112648) (#116924)
* [3.12] gh-112536: Add support for thread sanitizer (TSAN) (gh-112648)
(cherry picked from commit 88cb972000)

* Remove doc for configure option (leave it hidden in this branch)

---------

Co-authored-by: Samet YASLAN <sametyaslan@gmail.com>
2024-03-17 16:33:35 +01:00
Brett Cannon
88fdb082d9
[3.12] GH-116313: get WASI builds to run under wasmtime 18 w/ WASI 0.2/preview2 primitives (GH-116327) (GH-116373) 2024-03-05 13:35:02 -08:00
Miss Islington (bot)
99d8dfd430
[3.12] gh-80532: Do not set ipv6type when cross-compiling (GH-17956) (#113740)
(cherry picked from commit 5e1916ba1b)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Xavier de Gaye <xdegaye@gmail.com>
2024-01-05 15:56:43 +00:00
Miss Islington (bot)
0e3cf5bcac
[3.12] bpo-11102: Make configure enable major(), makedev(), and minor() on HP-UX (GH-19856) (GH-113540)
Always include <sys/types.h> before <sys/sysmacros.h>.

(cherry picked from commit f108468970)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-28 11:12:16 +00:00
Miss Islington (bot)
72073ca560
[3.12] gh-110459: Make sure --with-openssl-rpath works on macOS (GH-113441) (#113535)
gh-110459: Make sure --with-openssl-rpath works on macOS (GH-113441)

* gh-110459: Make sure --with-openssl-rpath works on macOS

On macOS the `-rpath` linker flag is spelled differently
than on on platforms.
(cherry picked from commit cc13eabc7c)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2023-12-28 10:21:12 +01:00
Victor Stinner
a498433df2
[3.12] gh-112088: Run autoreconf in GHA check_generated_files (GH-112090) (#112159)
gh-112088: Run autoreconf in GHA check_generated_files (#112090)

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.

(cherry picked from commit d9fd33a869)
2023-11-16 15:55:40 +01:00
Miss Islington (bot)
d34650e740
[3.12] gh-111460: Restore ncurses widechar support on macOS (GH-111878) (gh-112034)
gh-111460: Restore ncurses widechar support on macOS (GH-111878)
(cherry picked from commit d2f305dfd1)

Co-authored-by: Davide Rizzo <sorcio@gmail.com>
2023-11-14 10:59:01 +09:00
Miss Islington (bot)
727f8ee31c
[3.12] gh-111046: for wasi-threads, export memory as well via the linker (GH-111099) (GH-111141)
gh-111046: for wasi-threads, export memory as well via the linker (GH-111099)
(cherry picked from commit 5dfa71769f)

Co-authored-by: YAMAMOTO Takashi <yamamoto@midokura.com>
2023-10-20 22:23:15 +00:00
Miss Islington (bot)
190660abe9
[3.12] gh-78469: Declare missing sethostname for Solaris 10 (GH-109447) (#110580)
Add OS version specific macro for Solaris: Py_SUNOS_VERSION.
(cherry picked from commit 3b1580af07)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2023-10-10 09:26:36 +00:00
Miss Islington (bot)
53122bcf82
[3.12] gh-109191: Fix build with newer editline (gh-110239) (gh-110562)
gh-109191: Fix build with newer editline (gh-110239)
(cherry picked from commit f4cb0d27cc)

Co-authored-by: Bo Anderson <mail@boanderson.me>
2023-10-09 23:01:00 +09:00
justdan6
80aebd54c8
[3.12] gh-106881: Check for linux/limits.h before including it (#107397) (#107414)
* Check for linux/limits.h before including it

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
(cherry picked from commit 11c055f5ff)
2023-07-28 16:29:31 -07:00
Miss Islington (bot)
d87d67b9e6
[3.12] gh-106962: Detect mpicc in configure.ac (GH-106961) (#107081)
Don't let autoconf mistake MPI compilers for Intel compilers;
filter out the MPI case to prevent Intel specific options from being applied.
(cherry picked from commit 9a6b278769)

Co-authored-by: Lukas van de Wiel <30800501+LukasvdWiel@users.noreply.github.com>
2023-07-23 00:01:44 +00:00
Miss Islington (bot)
e903c16a6c
[3.12] gh-101538: Add experimental wasi-threads build (GH-101537) (#106834)
(cherry picked from commit d8f87cdf94)

Co-authored-by: YAMAMOTO Takashi <yamamoto@midokura.com>
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-07-18 00:31:17 +02:00
Miss Islington (bot)
0efbe4d189
[3.12] gh-106123: Modules/_sha3 appears to no longer be necessary (GH-106124) (#106127)
Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
2023-06-26 22:49:32 -07:00
Erlend E. Aasland
c607551baf
[3.12] gh-89886: Use Autoconf quadrigraphs where appropriate (#105226) (#105423) 2023-06-07 07:41:17 +00:00
Erlend E. Aasland
6f3a4fd4f2
[3.12] gh-90005: Don't link with libbsd if not needed (#105236) (#105360)
The regression was introduced with commit 5b946cada.
Restore pre gh-29696 behaviour.
2023-06-06 10:58:13 +00:00
Erlend E. Aasland
83c7386cee
[3.12] GH-89886: Bump to GNU Autoconf v2.71 (#104925) (#105207)
Co-authored-by: Christian Heimes <christian@python.org>
2023-06-01 22:19:19 +00:00
Miss Islington (bot)
6375287b37
[3.12] gh-89886: Rely on HAVE_SYS_TIME_H (GH-105058) (#105192)
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.

(cherry picked from commit 9ab587b714)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-01 12:08:37 +00:00
Erlend E. Aasland
af7b55d37f
[3.12] gh-89886: Properly quote Autoconf macro arguments (#105062) (#105118)
Autoconf 2.70 macros are picky about argument quotation.
2023-05-30 21:54:31 +00:00
Dong-hee Na
b151660883
[3.12] gh-101282: Enclose BOLT_APPLY_FLAGS value in double quotes (gh… (gh-104853)
[3.12] gh-101282: Enclose BOLT_APPLY_FLAGS value in double quotes (gh-104752)
(cherry picked from commit c43785192c)
2023-05-24 10:47:07 +00:00
Gregory Szorc
5360cb3d56
gh-101282: Apply BOLT optimizations to libpython for shared builds (#104709)
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.
2023-05-22 13:45:20 +02:00
Erlend E. Aasland
146106a0f1
gh-104487: PYTHON_FOR_REGEN must be minimum Python 3.10 (#104488)
Also include Python 3.12 in the list of accepted versions.
2023-05-15 08:02:44 +00:00
Gregory Szorc
27d8ecd7f3
gh-101282: move BOLT config after PGO (gh-104493) 2023-05-15 04:29:44 +00:00
Zhang Na
03029ace92
gh-90656: Add platform triplets for 64-bit LoongArch (LA64) (#30939)
Signed-off-by: Zhang Na <zhangna@loongson.cn>
Co-authored-by: WANG Xuerui <git@xen0n.name>
2023-05-09 09:19:40 +00:00
Petr Viktorin
cd9a56c2b0
gh-103509: PEP 697 -- Limited C API for Extending Opaque Types (GH-103511)
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-05-04 09:56:53 +02:00
Dong-hee Na
5d9762e7cf
gh-101525: Fix make test if the --enable-bolt enabled (gh-103574) 2023-04-17 23:14:18 +09:00
Nikita Sobolev
7f3c106503
gh-103326: Remove Python/importlib.h (GH-103331)
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-04-12 11:27:14 -07:00
Matthias Görgens
eff9f43924
gh-96821: Add config option --with-strict-overflow (#96823)
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>
2023-03-04 13:39:52 -08:00
Jonathan Protzenko
fcadc7e405
gh-99108: Import MD5 and SHA1 from HACL* (#102089)
Replaces our fallback non-OpenSSL MD5 and SHA1 implementations with those from HACL* as we've already done with SHA2.
2023-02-22 13:18:43 -08:00
Eli Schwartz
226484e475
gh-99942: correct the pkg-config/python-config flags for cygwin/android 2023-02-16 17:57:59 +00:00
Gregory P. Smith
0b13575e74
gh-99108: Refactor _sha256 & _sha512 into _sha2. (#101924)
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.
2023-02-15 22:08:20 -08:00